An Overview of .NET: An Overview of .NET Edmund Quek
Developer & Platform Evangelism
Microsoft APAC & GC Region
.NET – what is it?: Microsoft .NET is a set of software technologies designed to connect your world of information, people, systems, and devices. .NET – what is it?
No really – what is it?: The .NET Framework is a component of the Windows operating system that provides the programming model for building, deploying and running Web-based applications, smart client applications and XML Web services. No really – what is it?
.NET for Developers: .NET for Developers Productivity
The most productive development environment
The most productive language – Visual Basic .NET
.NET Framework
Better Web Development
Better Forms Development
Better Integration
Robustness
Common Language Runtime: Managed Code
Automatic lifetime management
Side-by-side versioning
Exception handling
The Future
Windows Codename “Longhorn”: the next major platform update.
Simplified development: Simplified development HWND hwndMain = CreateWindowEx(
0, "MainWinClass", "Main Window",
WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
(HWND)NULL, (HMENU)NULL, hInstance, NULL);
ShowWindow(hwndMain, SW_SHOWDEFAULT);
UpdateWindow(hwndMain); Form form = new Form();
form.Text = "Main Window";
form.Show(); Windows API .NET Framework
What is the .NET Framework?: What is the .NET Framework? The Common Language Runtime
Managed execution environment
Memory management
Debugging/profiling support
Code access security
…
Framework Class Library
.NET application foundation classes
.NET Framework Schematic: .NET Framework Schematic
Slide8: Framework Class Library
CLR Execution Model: VB Source code Compiler C++ C# Compiler Compiler Assembly
IL Code Assembly
IL Code Assembly
IL Code Operating System Services - Windows Common Language Runtime JIT Compiler Native Code Managed
code Unmanaged
Component CLR Execution Model Class Loading and Layout
Execution support
Garbage Collection
Security
Formal CLR goals: Formal CLR goals Multi-language, secure, mobile code
Interoperability with existing systems
Integrated tools support
Simplified programming model
Scalable from server to small device
Side-by-side versioning
What does MSIL look like?: What does MSIL look like? .method private hidebysig static void Main(string[] args) cil managed
{
.entrypoint
// Code size 24 (0x18)
.maxstack 2
.locals init (int32 V_0)
IL_0000: ldc.i4.0
IL_0001: stloc.0
IL_0002: br.s IL_0012
IL_0004: ldstr "Hello world!"
IL_0009: call void [mscorlib]System.Console::WriteLine(string)
IL_000e: ldloc.0
IL_000f: ldc.i4.1
IL_0010: add
IL_0011: stloc.0
IL_0012: ldloc.0
IL_0013: ldc.i4.s 10
IL_0015: blt.s IL_0004
IL_0017: ret
} // end of method class1::Main
.NET Languages: .NET Languages The .NET Platform is multi-language
Benefits:
Make code modules reusable
Complete cross-language integration
Make API access the same for all languages
Let developers use the right language for the task and share the code
All .NET languages are first-class players
Performance roughly equal
Can use all .NET features
.NET Languages (cont…): .NET Languages (cont…) Microsoft is providing:
Visual Basic
Visual C++
Visual C#
Visual J# and JScript®
Industry and Academia
APL, AsmL, COBOL, Eiffel, F#, Forth, Fortran, Haskell, Java, Mercury, ML, Mondrian, Oberon, P#, Pascal, Perl, Powerbuilder, Python, RPG, Ruby, S#, Scheme, Smalltalk
Windows FormsRich smart-client application development made easy: Windows Forms Rich smart-client application development made easy Framework for building Windows client applications that utilize the common language runtime.
System.Windows.Forms namespace.
Can be written in any language that CLR supports.
RAD simplicity inherited from VB 6.0 paradigm
Improved versioning and deployment
Takes full advantage of the security features of the common language runtime
Better graphics – GDI+ (alpha blending, texture brushes, advance transforms)
ASP.NETSimplified development of scalable Web applications: ASP.NET Simplified development of scalable Web applications A complete environment for building, deploying and running .NET Web applications
Flexible language options
Web Forms – System.Web.UI namespace
Separates UI and code with Server Controls
Supports compiled code rather than scripts
Easy and familiar development model
Rich class framework
Target any browser on any platform
Improved reliability, performance and scalability
New application models
XML Web Services
ASP.NET Mobile controls
.NET Compact FrameworkMobile and smart device development: .NET Compact Framework Mobile and smart device development Small footprint, binary compatible version of the .NET Framework, designed for small mobile devices.
Enables RAD development for devices
Design and code editing customized for devices
Integrated device support
High fidelity device emulation
Rich debugging in the emulator or on device
Same C# and Visual Basic compiler
Enables devices to interoperate easily with XML Web services.
ASP.NET Benchmarks: ASP.NET Benchmarks 2400 1200 1600 800 400 2800 2000 PC Magazine - Nile Application Test WebSphere 3.5 JSP RH Linux 7.0 Oracle 8i Microsoft ASP (VBScript) SQL Server 2000 Microsoft ASP.NET (Visual C#) SQL Server 2000 1000 789 603 8 CPU
4 CPU
2 CPU 330 748 637 Pages Served per Sec
.NET Pet ShopWindows 2000 vs. Windows Server 2003 Benchmark: .NET Pet Shop Windows 2000 vs. Windows Server 2003 Benchmark http://www.middleware-company.com/documents/j2eedotnetbenchmark.pdf Ç91% Ç34% Ç70%
Developer Productivity: Developer Productivity Productivity: One third the code
Performance: 28 times faster
Scalability: 6 times more users See www.gotdotnet.com
Visual Studio .NET: Visual Studio .NET Comprehensive best-of-breed tool for building connected applications based on .NET for Windows and the Web
All languages under one roof
All application types under one roof
Consistent programming model for all application types
Enterprise Lifecycle Support (ACT, VSS, Visio, Enterprise Templates)
Developer Productivity Features: Developer Productivity Features Increased IDE Performance
Startup time reduced
Improved IntelliSense®
Dynamic help faster
Object browser faster
Code editor drop-down menus faster
Enhanced “Add Web Reference” dialog
Code editor enhancements
New components
Debugging enhancements
Designer enhancements
Schema designer zoom
Mobile Web form designer
Integrated community search
Run multiple version of Visual Studio side-by-side:
Visual Studio 6.0
Visual Studio .NET 2002
Visual Studio .NET 2003
Upgrade from Visual Studio .NET 2002 to Visual Studio
Only the project files are updated
Doesn’t change any of your source files Visual Basic .NET
Fully object-oriented
Free threading, structured exception handling
Host VB6.0 controls in WinForms applications Improved IntelliSense and debugger
Variable declaration in loops
Bitshift operators
Mobile applications
Microsoft® Visual C++® .NET
Managed extensions for C++
ISO C++ conformance
Windows Forms designer
Enhanced floating point performance optimizations
P4 targeting
Microsoft® Visual C# ® .NET
Component-oriented, type-safe
Improved IntelliSense
Custom build steps
Code insertion for common tasks
Mobile applications Microsoft® Visual J#™ .NET
Java-language syntax
Full integration with Visual Studio .NET
Easy way to move Java-language skills,
Full access to the .NET Framework
demo: demo Introduction to Visual Studio .NET