1 visual studio.net languages carlotta eaton associate professor of ist new river community college...

28
1 Visual Studio .NET Visual Studio .NET Languages Languages Carlotta Eaton Carlotta Eaton Associate Professor of Associate Professor of IST IST New River Community New River Community College College Dublin, VA Dublin, VA Slides by Microsoft Slides by Microsoft

Upload: sarah-douglas

Post on 27-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

11

Visual Studio .NET Visual Studio .NET LanguagesLanguages

Carlotta EatonCarlotta EatonAssociate Professor of ISTAssociate Professor of ISTNew River Community CollegeNew River Community CollegeDublin, VA Dublin, VA

Slides by MicrosoftSlides by Microsoft

22

AgendaAgenda

.NET Language Support.NET Language Support Visual BasicVisual Basic®® .NET .NET Visual C#Visual C#™ ™ .NET.NET Visual C++Visual C++® ® .NET.NET Visual J#Visual J#™ ™ .NET.NET

33

.NET Language Support .NET Language Support

Operating SystemOperating System

Common Language RuntimeCommon Language Runtime

Base Class LibraryBase Class Library

ADO .NET and XMLADO .NET and XML

ASP .NETASP .NETWeb Forms Web ServicesWeb Forms Web Services

Mobile Internet ToolkitMobile Internet Toolkit

WindowsWindowsFormsForms

Common Language SpecificationCommon Language Specification

VBVB C++C++ C#C# J#J# ……V

isua

l Stu

dio

.NE

TV

isua

l Stu

dio

.NE

T

44

.NET Language Support .NET Language Support OverviewOverview

Common Language RuntimeCommon Language Runtime

Base FrameworkBase Framework

ADO.NET: Data and XMLADO.NET: Data and XML

Web ServicesWeb Services User InterfaceUser Interface

VBVB C++C++ C#C#

ASP.NETASP.NET

J#J# COBOLCOBOL ……

55

.NET Language Support .NET Language Support IDE & CLRIDE & CLR

Integrated Development EnvironmentIntegrated Development Environment Single Solution Explorer, Toolbox, and Debugger Single Solution Explorer, Toolbox, and Debugger IntelliSenseIntelliSense®® statement completion and squigglies statement completion and squigglies Create multi-language solutionsCreate multi-language solutions

Common Language RuntimeCommon Language Runtime Microsoft: Visual BasicMicrosoft: Visual Basic®®, C#, C++, J#, JScript, C#, C++, J#, JScript®®

33rdrd Party: APL, Cobol, Component Pascal, Eiffel, Party: APL, Cobol, Component Pascal, Eiffel, Fortran, Haskell, Mercury, Oberon, Oz, Perl, Fortran, Haskell, Mercury, Oberon, Oz, Perl, Python, RPG, Scheme, Smalltalk, Standard MLPython, RPG, Scheme, Smalltalk, Standard ML

66

.NET Language Support .NET Language Support Increased ProductivityIncreased Productivity

Simplifies mixed-language developmentSimplifies mixed-language development RAD across the boardRAD across the board

Desktop Desktop WebWeb Server Server MobileMobile

End-to-end debugging support across End-to-end debugging support across Languages Languages ProjectsProjects ProcessesProcesses MachinesMachines

77

.NET Language Support .NET Language Support Language EnhancementsLanguage Enhancements Visual Basic .NETVisual Basic .NET

Fully object oriented, supports free threadingFully object oriented, supports free threading Structured exception handlingStructured exception handling

Visual C# .NETVisual C# .NET Increased productivity for C++ developer Increased productivity for C++ developer Component-oriented, type-safeComponent-oriented, type-safe

Visual C++ .NETVisual C++ .NET Attribute based programmingAttribute based programming Managed Extensions for C++Managed Extensions for C++

Visual J# .NETVisual J# .NET Java language for .NET PlatformJava language for .NET Platform

88

Visual Basic .NETVisual Basic .NET

99

Visual Basic .NET Visual Basic .NET OverviewOverview

Modern, Powerful, Modern, Powerful, True OOPTrue OOP Inheritance, overloading, shadowing, delegates, Inheritance, overloading, shadowing, delegates,

attributes, hierarchical name spacesattributes, hierarchical name spaces Robust Robust

Strict type checking, initialize variables at Strict type checking, initialize variables at declaration, variable declaration types fixed declaration, variable declaration types fixed

Consistent Consistent Single assignment operator, parenthesis use Single assignment operator, parenthesis use

simplifiedsimplified Simplified Simplified

Legacy constructs removedLegacy constructs removed

1010

Visual Basic .NET Visual Basic .NET Classes & InheritanceClasses & Inheritance

Inheritance supportedInheritance supported Derive from a single base classDerive from a single base class Implicitly inherits from Implicitly inherits from System.ObjectSystem.Object

Declarable classesDeclarable classes OverridingOverriding

New implementation for base class methodNew implementation for base class method OverridesOverrides keyword keyword MyBaseMyBase refers base class refers base class MeMe refers current class refers current class

OverloadingOverloading Multiple versions of a class memberMultiple versions of a class member Based on parameter typesBased on parameter types

1111

Demo 1: Visual Studio .NET Demo 1: Visual Studio .NET Integrated Development Integrated Development Environment Environment

1212

Visual C# .NET Visual C# .NET

1313

Visual C# .NET Visual C# .NET OverviewOverview

Strong C++ heritageStrong C++ heritage Immediately familiar to C++ and Java developersImmediately familiar to C++ and Java developers Allows C-style memory management and pointersAllows C-style memory management and pointers

First component-oriented language in C First component-oriented language in C familyfamily Properties, methods, indexers, delegates, eventsProperties, methods, indexers, delegates, events Design-time and runtime attributesDesign-time and runtime attributes

Enables one-stop programmingEnables one-stop programming No header files, IDLNo header files, IDL Embeddable in ASP .NETEmbeddable in ASP .NET

1414

Visual C# .NET Visual C# .NET Component-OrientedComponent-Oriented

What defines a component?What defines a component? Properties, methods, eventsProperties, methods, events Design-time and runtime informationDesign-time and runtime information Integrated help and documentationIntegrated help and documentation

First class support in C#First class support in C# Not naming patterns, adapters, etc.Not naming patterns, adapters, etc. Not external filesNot external files

Easy to build and consumeEasy to build and consume

1515

Visual C# .NET Visual C# .NET Comparison to Visual BasicComparison to Visual Basic

Syntactic DifferencesSyntactic Differences Visual Basic is NOT case sensitiveVisual Basic is NOT case sensitive

In C# but not in Visual BasicIn C# but not in Visual Basic Pointers, shift operators, inline documentationPointers, shift operators, inline documentation Overloaded operators, unsigned integersOverloaded operators, unsigned integers

In Visual Basic but not in CIn Visual Basic but not in C##

Select Case, Interface implementationSelect Case, Interface implementation Dynamic arrays, modules, optional parametersDynamic arrays, modules, optional parameters

for I = 1 To 10for I = 1 To 10 ‘ ‘ for loopfor loopNext INext I

for (i=1;i<11;i++) {for (i=1;i<11;i++) {// for loop// for loop}}

1616

Visual C++ .NETVisual C++ .NET

1717

Visual C++ .NET Visual C++ .NET Compiler & LanguageCompiler & Language

OptimizationsOptimizations Whole Program OptimizationWhole Program Optimization Optimized inline assembly integrationOptimized inline assembly integration Loop unrolling heuristicsLoop unrolling heuristics

Runtime checksRuntime checks Buffer OverrunBuffer Overrun Stack CorruptionStack Corruption Shortened ConvertsShortened Converts

Attributes – domain specific programmingAttributes – domain specific programming Radically simplifies COM+ and IDLRadically simplifies COM+ and IDL Integrated with .NET Framework attributes Integrated with .NET Framework attributes

modelmodel

1818

Visual C++ .NET Visual C++ .NET Managed ExtensionsManaged Extensions

Full access to the .NET Framework from C++Full access to the .NET Framework from C++ It’s still C++It’s still C++

All enhancements are compatible extensionsAll enhancements are compatible extensions Nothing from C++ has been changed or removedNothing from C++ has been changed or removed

Enables incremental migration to .NETEnables incremental migration to .NET Existing code can be recompiled as ILExisting code can be recompiled as IL Mix managed code within existing applicationsMix managed code within existing applications

Power to drop “to the metal” when neededPower to drop “to the metal” when needed

1919

Visual C++ .NET Visual C++ .NET Native LibrariesNative Libraries

MFC/ATLMFC/ATL Improved MFC/ATL integrationImproved MFC/ATL integration Integrated Web Service clientIntegrated Web Service client WindowsWindows®® XP, GDI+, Crypto, NT Security, XP, GDI+, Crypto, NT Security,

Perfmon, AccessibilityPerfmon, Accessibility ATL ServerATL Server

ATL framework for Web Services and Web ATL framework for Web Services and Web applicationsapplications

Stencil-based UI generation with integrated Stencil-based UI generation with integrated XML/HTML designerXML/HTML designer

Enhanced STLEnhanced STL Better conformance and error messagesBetter conformance and error messages Significantly improved documentationSignificantly improved documentation

2020

Visual J# .NET Visual J# .NET

2121

Visual J# .NET Visual J# .NET Java-language for .NETJava-language for .NET

Native support for XML Web services Native support for XML Web services Fully integrated with Visual Studio .NET Fully integrated with Visual Studio .NET

development environmentdevelopment environment Full access to the .NET FrameworkFull access to the .NET Framework

ASP .NET, ADO .NET, Windows FormsASP .NET, ADO .NET, Windows Forms Integration with >20 other languagesIntegration with >20 other languages

Protection of existing investmentsProtection of existing investments Use java language syntax on .NETUse java language syntax on .NET Move applications and skills forwardMove applications and skills forward

2222

Visual J# .NET Visual J# .NET Java-language SupportJava-language Support

.NET Runtime

Win32Win32

SourceSourceConverterConverter

Legacy Java Legacy Java SourceSource

BinaryBinaryConverterConverter

JavaJava BinaryBinary

MSIL MSIL

Java Source Java Source targeting .NETtargeting .NET

MSIL

.NET FrameworksSubset of JDK 1.1.4 & VJ++ 6.0 LibrariesSubset of JDK 1.1.4 & VJ++ 6.0 Libraries

2323

Visual J# .NET Visual J# .NET .NET Extensions.NET Extensions

To be CLS compliantTo be CLS compliant Syntax extensions required for CLSSyntax extensions required for CLS

ubyteubyte @attribute – For attaching .NET attributes@attribute – For attaching .NET attributes

Support for consuming .NET constructs:Support for consuming .NET constructs: Properties, Events, Delegates, Value types, EnumsProperties, Events, Delegates, Value types, Enums

2424

SummarySummary

.NET Language Support.NET Language Support Multi-language platform, 22 supportedMulti-language platform, 22 supported

Visual Basic .NET Visual Basic .NET More power, more productivityMore power, more productivity

Visual C++Visual C++ .NET.NET Power and flexibility for managed, native codePower and flexibility for managed, native code

Visual C#Visual C# .NET.NET Productivity for the C developerProductivity for the C developer

Visual J#Visual J# .NET.NET Java language support for .NET PlatformJava language support for .NET Platform

2525

ResourcesResources

www.gotdotnet.com/team/csharpwww.gotdotnet.com/team/csharp www.gotdotnet.com/team/vbwww.gotdotnet.com/team/vb www.gotdotnet.com/team/cpluspluswww.gotdotnet.com/team/cplusplus www.microsoft.com/seminarwww.microsoft.com/seminar msdn.microsoft.commsdn.microsoft.com Microsoft Tech·Ed 2002Microsoft Tech·Ed 2002

New Orleans, LANew Orleans, LA April 9 – 13, 2002 April 9 – 13, 2002 msdn.microsoft.com/events/techedmsdn.microsoft.com/events/teched

2626

Questions?Questions?

2727© 2001 Microsoft Corporation. All rights reserved.© 2001 Microsoft Corporation. All rights reserved.

2828© 2001 Microsoft Corporation. All rights reserved.© 2001 Microsoft Corporation. All rights reserved.

Continue to Continue to .NET Framework .NET Framework PresentationPresentation