ppt title - New River Community College

Download Report

Transcript ppt title - New River Community College

Visual Studio .NET
Languages
Carlotta Eaton
Associate Professor of IST
New River Community College
Dublin, VA
Slides by Microsoft
1
Agenda





2
.NET Language Support
Visual Basic® .NET
Visual C#™ .NET
Visual C++® .NET
Visual J#™ .NET
.NET Language Support
VB
C++
C#
…
J#
Common Language Specification
Web Forms Web Services
Mobile Internet Toolkit
Windows
Forms
ADO .NET and XML
Base Class Library
Common Language Runtime
Operating System
3
Visual Studio .NET
ASP .NET
.NET Language Support
Overview
VB
C++
C#
J#
Web Services
COBOL
User Interface
ASP.NET
ADO.NET: Data and XML
Base Framework
Common Language Runtime
4
…
.NET Language Support
IDE & CLR

Integrated Development Environment




Common Language Runtime


5
Single Solution Explorer, Toolbox, and Debugger
IntelliSense® statement completion and squigglies
Create multi-language solutions
Microsoft: Visual Basic®, C#, C++, J#, JScript®
3rd Party: APL, Cobol, Component Pascal, Eiffel,
Fortran, Haskell, Mercury, Oberon, Oz, Perl,
Python, RPG, Scheme, Smalltalk, Standard ML
.NET Language Support
Increased Productivity


Simplifies mixed-language development
RAD across the board





End-to-end debugging support across




6
Desktop
Web
Server
Mobile
Languages
Projects
Processes
Machines
.NET Language Support
Language Enhancements

Visual Basic .NET



Visual C# .NET




Attribute based programming
Managed Extensions for C++
Visual J# .NET

7
Increased productivity for C++ developer
Component-oriented, type-safe
Visual C++ .NET


Fully object oriented, supports free threading
Structured exception handling
Java language for .NET Platform
Visual Basic .NET
8
Visual Basic .NET
Overview

Modern, Powerful, True OOP


Robust


Single assignment operator, parenthesis use
simplified
Simplified

9
Strict type checking, initialize variables at
declaration, variable declaration types fixed
Consistent


Inheritance, overloading, shadowing, delegates,
attributes, hierarchical name spaces
Legacy constructs removed
Visual Basic .NET
Classes & Inheritance

Inheritance supported




Declarable classes
Overriding





New implementation for base class method
Overrides keyword
MyBase refers base class
Me refers current class
Overloading


10
Derive from a single base class
Implicitly inherits from System.Object
Multiple versions of a class member
Based on parameter types
Demo 1: Visual Studio .NET
Integrated Development
Environment
11
Visual C# .NET
12
Visual C# .NET
Overview

Strong C++ heritage



First component-oriented language in C
family



Properties, methods, indexers, delegates, events
Design-time and runtime attributes
Enables one-stop programming


13
Immediately familiar to C++ and Java developers
Allows C-style memory management and pointers
No header files, IDL
Embeddable in ASP .NET
Visual C# .NET
Component-Oriented

What defines a component?




First class support in C#



14
Properties, methods, events
Design-time and runtime information
Integrated help and documentation
Not naming patterns, adapters, etc.
Not external files
Easy to build and consume
Visual C# .NET
Comparison to Visual Basic

Syntactic Differences

Visual Basic is NOT case sensitive
for I = 1 To 10
‘ for loop
Next I

In C# but not in Visual Basic



Pointers, shift operators, inline documentation
Overloaded operators, unsigned integers
In Visual Basic but not in C#


15
for (i=1;i<11;i++) {
// for loop
}
Select Case, Interface implementation
Dynamic arrays, modules, optional parameters
Visual C++ .NET
16
Visual C++ .NET
Compiler & Language

Optimizations




Runtime checks




Buffer Overrun
Stack Corruption
Shortened Converts
Attributes – domain specific programming


17
Whole Program Optimization
Optimized inline assembly integration
Loop unrolling heuristics
Radically simplifies COM+ and IDL
Integrated with .NET Framework attributes
model
Visual C++ .NET
Managed Extensions


Full access to the .NET Framework from C++
It’s still C++



Enables incremental migration to .NET



18
All enhancements are compatible extensions
Nothing from C++ has been changed or removed
Existing code can be recompiled as IL
Mix managed code within existing applications
Power to drop “to the metal” when needed
Visual C++ .NET
Native Libraries

MFC/ATL




ATL Server



ATL framework for Web Services and Web
applications
Stencil-based UI generation with integrated
XML/HTML designer
Enhanced STL

19
Improved MFC/ATL integration
Integrated Web Service client
Windows® XP, GDI+, Crypto, NT Security,
Perfmon, Accessibility

Better conformance and error messages
Significantly improved documentation
Visual J# .NET
20
Visual J# .NET
Java-language for .NET



Native support for XML Web services
Fully integrated with Visual Studio .NET
development environment
Full access to the .NET Framework



Protection of existing investments


21
ASP .NET, ADO .NET, Windows Forms
Integration with >20 other languages
Use java language syntax on .NET
Move applications and skills forward
Visual J# .NET
Java-language Support
Java
Binary
Legacy Java
Source
Binary
Converter
MSIL
Java Source
targeting .NET
Source
Converter
MSIL
Subset of JDK 1.1.4 & VJ++ 6.0 Libraries
.NET Runtime
22
Win32
MSIL
.NET Frameworks
Visual J# .NET
.NET Extensions


To be CLS compliant
Syntax extensions required for CLS



Support for consuming .NET constructs:

23
ubyte
@attribute – For attaching .NET attributes
Properties, Events, Delegates, Value types, Enums
Summary

.NET Language Support


Visual Basic .NET


Productivity for the C developer
Visual J# .NET

24
Power and flexibility for managed, native code
Visual C# .NET


More power, more productivity
Visual C++ .NET


Multi-language platform, 22 supported
Java language support for .NET Platform
Resources






www.gotdotnet.com/team/csharp
www.gotdotnet.com/team/vb
www.gotdotnet.com/team/cplusplus
www.microsoft.com/seminar
msdn.microsoft.com
Microsoft Tech·Ed 2002



25
New Orleans, LA
April 9 – 13, 2002
msdn.microsoft.com/events/teched
Questions?
26
© 2001 Microsoft Corporation. All rights reserved.
27
Continue to
.NET Framework
Presentation
© 2001 Microsoft Corporation. All rights reserved.
28