DEV200.NET Framework Overview Chris Anderson Software Architect,.NET Client Microsoft Corporation
.NET Framework Design Goals Dramatically simplifies development and deployment Dramatically simplifies development and deployment Unifies programming models Unifies programming models Provides robust and secure execution environment Provides robust and secure execution environment Supports multiple programming languages Supports multiple programming languages
Framework, Languages, And Tools Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms Web Services Mobile Internet Toolkit WindowsForms Common Language Specification VBC++C#JScriptJ# Visual Studio.NET
One Lap Around.NET demo demo
Demo: One Lap Around.NET Create a simple Web Service Create a simple Web Service Test it in Internet Explorer Test it in Internet Explorer Add data logic to it Add data logic to it Build a smart client for it Build a smart client for it Show seamless and safe deployment of the smart client Show seamless and safe deployment of the smart client
Framework, Languages, And Tools Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms Web Services Mobile Internet Toolkit WindowsForms Common Language Specification VBC++C#JScriptJ# Visual Studio.NET
The.NET Evolution Before COM, applications were completely separate entities with little or no integration Applicatio n Code and data structures
The.NET Evolution COM provides a way for components to integrate; However, each component must provide the “plumbing” and objects cannot directly interact
The.NET Evolution With the.NET Framework common language runtime, components are built on a common substrate; No “plumbing” is needed and objects can directly interact
Assembly Compilation And Execution Source Code Language Compiler Compilation At installation or the first time each method is called Execution JIT Compiler NativeCode Code (IL) Metadata
Simplify Development Completely eliminates COM plumbing Completely eliminates COM plumbing No more… No more… Registration GUIDs .IDL files HRESULTs IUnknown AddRef/Release CoCreateInstance =>self described apps =>hierarchical namespaces =>unified object model =>structured exceptions =>common root object =>garbage collector =>”new” operator
Simplify Development Common Type System Common Type System Common instance and type definition Enables clean OO programming Enables clean OO programming Classes and interfaces Constructors, properties, methods, events Cross language inheritance Built-in interoperability Built-in interoperability With COM With native (Win32 ® style) DLLs
Everything Is An Object Traditional views of primitive types Traditional views of primitive types C++, Java ™ : They’re “magic” Smalltalk, Lisp: They’re full-blown objects.NET Framework solution: Value types.NET Framework solution: Value types unifies with no performance cost Deep simplicity throughout system Improved extensibility and reusability Improved extensibility and reusability New primitive types: Decimal, SQL… Collections, etc., work for all types
Everything Is An Object Boxing Boxing Allocates box, copies value into it Unboxing Unboxing Checks type of box, copies value out Dim i As Integer = 123 Dim o As Object = i Dim j As Integer = CInt(o) 123 i o 123 System.Int j int i = 123; object o = i; int j = (int)o;
Robust Environment Automatic lifetime management Automatic lifetime management All objects are garbage collected Exception handling Exception handling Error handling first class and mandatory Type-safety Type-safety No buffer overruns, No unsafe casts, Uninitialized variables
Secure Environment Security designed-in Security designed-in Code access security enforcement Code access security enforcement Security based on the identity of code Administratively configurable via policy ASP.NET integrated authentication of user ASP.NET integrated authentication of user Windows identity, Passport ®, forms-based, … Cryptography library with XML DSIG support Cryptography library with XML DSIG support Digital signature for XML (
Simplify Deployment And Management Zero-impact install Zero-impact install Applications and components can be shared or private Side-by-side execution Side-by-side execution Multiple versions of the same component can co-exist on a system Assemblies Assemblies Contain dependency information
Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms Web Services Mobile Internet Toolkit WindowsForms Common Language Specification VBC++C#JScriptJ# Visual Studio.NET Framework, Languages, And Tools
Unify Programming Models Windows API.NET Framework Consistent API availability regardless of language and programming model ASPStateless, Code embedded in HTML pages MFC/ATLSubclassing,Power,Expressiveness VB Forms RAD,Composition,Delegation
How Much Simpler? Windows API HWND hwndMain = CreateWindowEx( 0, "MainWClass", "Main Window", 0, "MainWClass", "Main Window", WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, (HWND)NULL, (HMENU)NULL, hInstance, NULL); (HWND)NULL, (HMENU)NULL, hInstance, NULL); ShowWindow(hwndMain, SW_SHOWDEFAULT); UpdateWindow(hwndMain);.NET Framework Dim form As New Form() form.Text = "Main Window" form.Show()
Factored And Extensible The Framework is not a “black box” The Framework is not a “black box” Any.NET class is available for you to extend through inheritance Any.NET class is available for you to extend through inheritance Gives developers much more head room Plug and Play components and subsystems Plug and Play components and subsystems
The.NET Framework Library Base Class Library ADO.NET and XML Web Forms Web Services Mobile Internet Toolkit WindowsForms ASP.NET
System System.DataSystem.Xml System.Web Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text ServiceProcess Security Common OleDb SQLTypes SqlClient XPath XSLT Runtime InteropServices Remoting Serialization Serialization ConfigurationSessionState CachingSecurity Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Text Printing System.Windows.Forms DesignComponentModel The.NET Framework Library
Base Framework System Threading Text ServiceProcess Security Resources Reflection Net IO Globalization Diagnostics Configuration Collections Runtime Serialization Remoting InteropServices
Data And XML System.Data System.Xml SQLTypes SQLClient Common OleDb Serialization XPath XSLT
ASP.NET System.Web Caching Configuration ServicesUI SessionState HtmlControls WebControls Description Discovery Security Protocols
Windows ® Forms System.Drawing Drawing2D Imaging Printing Text System.Windows.Forms DesignComponentModel
Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms Web Services Mobile Internet Toolkit WindowsForms Common Language Specification VBC++C#JScriptJ# Visual Studio.NET Framework, Languages, And Tools
Languages The.NET Platform is language neutral The.NET Platform is language neutral All.NET languages are first class players You can leverage your existing skills Common language specification Common language specification Set of features guaranteed to be in all languages We are providing We are providing Visual Basic ®, C++, C#, J#, JScript ® Third-parties are building Third-parties are building APL, COBOL, Delphi, Pascal, Eiffel, Haskell, ML, Oberon, Perl, Python, Scheme, Smalltalk…
Standardization A subset of the.NET Framework and C# submitted to ECMA A subset of the.NET Framework and C# submitted to ECMA Adopted as International standards in Dec In the ISO fast-track process now Co-sponsored with Intel, Hewlett-Packard Common language infrastructure Common language infrastructure Based on common language runtime and base framework Layered into increasing levels of functionality
Additional Resources Learn about Web development with.NET Learn about Web development with.NET DEV334: Introduction to Web Forms Learn about client development with.NET Learn about client development with.NET DEV350: Building Smart Client Applications Learn about Network class libraries Learn about Network class libraries DEV342: The.NET Framework Net Class Libraries Get the Deep Technical Drill Down Get the Deep Technical Drill Down DEV366:.NET Framework Under the Hood Learn how to Architect an application Learn how to Architect an application DEV310: Architecting Enterprise Applications with Visual Studio.NET DEV358: Architecting N-Tier.NET Applications DEV402: Design Choices for Implementing Distributed Applications in.NET
Summary The.NET Framework The.NET Framework Dramatically simplifies development and deployment Unifies programming models Provides robust and secure execution environment Supports multiple programming languages
Discussion
Resources from Microsoft Press For more information please visit the TechEd Bookshop. MICROSOFT.NET FRAMEWORK
Don’t forget to complete the on-line Session Feedback form on the Attendee Web site