Date post: | 15-Jan-2016 |
Category: |
Documents |
View: | 218 times |
Download: | 0 times |
DEV200 DEV200
.NET Framework Overview.NET Framework Overview
Chris AndersonChris AndersonSoftware Architect, .NET ClientSoftware Architect, .NET ClientMicrosoft CorporationMicrosoft Corporation
.NET Framework .NET Framework Design GoalsDesign Goals
Dramatically simplifies development Dramatically simplifies development and deploymentand deployment
Unifies programming modelsUnifies programming models Provides robust and secure execution Provides robust and secure execution
environmentenvironment Supports multiple programming Supports multiple programming
languageslanguages
Framework, Languages, Framework, Languages, And ToolsAnd Tools
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# JScriptJScript J#J#
Visu
al S
tud
io.N
ET
Visu
al S
tud
io.N
ET
One Lap Around .NETOne Lap Around .NET
demodemo
Demo: One Lap Around .NETDemo: One Lap Around .NET
Create a simple Web ServiceCreate a simple Web Service Test it in Internet ExplorerTest it in Internet Explorer Add data logic to itAdd data logic to it Build a smart client for itBuild a smart client for it Show seamless and safe deployment Show seamless and safe deployment
of the smart clientof the smart client
Framework, Languages, And ToolsFramework, Languages, And Tools
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# JScriptJScript J#J#V
isua
l Stu
dio
.NE
TV
isua
l Stu
dio
.NE
T
The .NET EvolutionThe .NET Evolution
Before COM, applications were Before COM, applications were completely separate entities completely separate entities with little or no integrationwith little or no integration
ApplicatioApplicationn
Code and Code and data data
structuresstructures
The .NET EvolutionThe .NET Evolution
COM provides a way for COM provides a way for components to integrate; components to integrate; However, each However, each component must provide component must provide the “plumbing” and the “plumbing” and objects cannot objects cannot directly interactdirectly interact
The .NET EvolutionThe .NET Evolution
With the .NET Framework With the .NET Framework common language runtime, common language runtime, components are built on a components are built on a common substrate; No common substrate; No “plumbing” is needed and “plumbing” is needed and objects can directly interactobjects can directly interact
AssemblyAssembly
Compilation And ExecutionCompilation And Execution
Source Source CodeCode
Language Language CompilerCompiler
CompilationCompilation
At installation or the At installation or the first time each first time each
method is calledmethod is calledExecutionExecution
JIT JIT CompilerCompiler
NativeNative
CodeCode
Code (IL)Code (IL)
MetadataMetadata
Simplify DevelopmentSimplify Development
Completely eliminates COM plumbingCompletely eliminates COM plumbing No more…No more…
RegistrationRegistration GUIDsGUIDs .IDL files.IDL files HRESULTsHRESULTs IUnknownIUnknown AddRef/ReleaseAddRef/Release CoCreateInstanceCoCreateInstance
=>self described apps=>self described apps
=>hierarchical namespaces=>hierarchical namespaces
=>unified object model=>unified object model
=>structured exceptions=>structured exceptions
=>common root object=>common root object
=>garbage collector=>garbage collector
=>”new” operator=>”new” operator
Simplify DevelopmentSimplify Development
Common Type SystemCommon Type System Common instance and type definitionCommon instance and type definition
Enables clean OO programmingEnables clean OO programming Classes and interfacesClasses and interfaces Constructors, properties, methods, eventsConstructors, properties, methods, events Cross language inheritanceCross language inheritance
Built-in interoperabilityBuilt-in interoperability With COMWith COM With native (Win32With native (Win32®® style) DLLs style) DLLs
Everything Is An ObjectEverything Is An Object
Traditional views of primitive typesTraditional views of primitive types C++, JavaC++, Java™™: They’re “magic”: They’re “magic” Smalltalk, Lisp: They’re full-blown objectsSmalltalk, Lisp: They’re full-blown objects
.NET Framework solution: Value types.NET Framework solution: Value types unifies with no performance costunifies with no performance cost Deep simplicity throughout systemDeep simplicity throughout system
Improved extensibility and reusabilityImproved extensibility and reusability New primitive types: Decimal, SQL…New primitive types: Decimal, SQL… Collections, etc., work for all typesCollections, etc., work for all types
Everything Is An ObjectEverything Is An Object
BoxingBoxing Allocates box, copies value into itAllocates box, copies value into it
UnboxingUnboxing Checks type of box, copies value outChecks type of box, copies value out
Dim i As Integer = 123Dim i As Integer = 123Dim o As Object = iDim o As Object = iDim j As Integer = CInt(o)Dim j As Integer = CInt(o)
123123i
o
123123
System.Int32System.Int32
123123j
int i = 123;int i = 123;object o = i;object o = i;int j = (int)o;int j = (int)o;
Robust EnvironmentRobust Environment
Automatic lifetime managementAutomatic lifetime management All objects are garbage collectedAll objects are garbage collected
Exception handlingException handling Error handling first class and mandatoryError handling first class and mandatory
Type-safetyType-safety No buffer overruns, No unsafe casts, No buffer overruns, No unsafe casts,
Uninitialized variablesUninitialized variables
Secure EnvironmentSecure Environment
Security designed-in Security designed-in Code access security enforcement Code access security enforcement
Security based on the identity of code Security based on the identity of code Administratively configurable via policyAdministratively configurable via policy
ASP.NET integrated authentication ASP.NET integrated authentication of user of user Windows identity, PassportWindows identity, Passport®®, forms-based, … , forms-based, …
Cryptography library with XML Cryptography library with XML DSIG support DSIG support Digital signature for XML (Digital signature for XML (
www.w3.org/signaturewww.w3.org/signature) )
Simplify Deployment Simplify Deployment And ManagementAnd Management Zero-impact installZero-impact install
Applications and components can be Applications and components can be shared or privateshared or private
Side-by-side executionSide-by-side execution Multiple versions of the same component Multiple versions of the same component
can co-exist on a systemcan co-exist on a system
Assemblies Assemblies Contain dependency informationContain dependency information
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# JScriptJScript J#J#V
isua
l Stu
dio
.NE
TV
isua
l Stu
dio
.NE
T
Framework, Languages, And ToolsFramework, Languages, And Tools
Unify Programming ModelsUnify Programming Models
Windows APIWindows API
.NET Framework.NET Framework
Consistent API availability regardless ofConsistent API availability regardless oflanguage and programming modellanguage and programming model
ASPASP
Stateless,Stateless,Code embeddedCode embeddedin HTML pagesin HTML pages
MFC/ATLMFC/ATL
Subclassing,Subclassing,Power,Power,
ExpressivenessExpressiveness
VB FormsVB Forms
RAD,RAD,Composition,Composition,
DelegationDelegation
How Much Simpler?How Much Simpler?
Windows APIWindows APIHWND hwndMain = CreateWindowEx(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, CW_USEDEFAULT, CW_USEDEFAULT,CW_USEDEFAULT, CW_USEDEFAULT, (HWND)NULL, (HMENU)NULL, hInstance, NULL); (HWND)NULL, (HMENU)NULL, hInstance, NULL); ShowWindow(hwndMain, SW_SHOWDEFAULT); ShowWindow(hwndMain, SW_SHOWDEFAULT); UpdateWindow(hwndMain);UpdateWindow(hwndMain);
.NET Framework.NET Framework
Dim Dim form form As NewAs New Form() Form()form.Text = "Main Window"form.Text = "Main Window"form.Show()form.Show()
Factored And ExtensibleFactored And Extensible
The Framework is not a “black box”The Framework is not a “black box” Any .NET class is available for you to Any .NET class is available for you to
extend through inheritanceextend through inheritance Gives developers much more head roomGives developers much more head room
Plug and Play components Plug and Play components and subsystemsand subsystems
The .NET Framework LibraryThe .NET Framework Library
Base Class LibraryBase Class Library
ADO.NET and XMLADO.NET and XML
Web Forms Web ServicesWeb Forms Web ServicesMobile Internet ToolkitMobile Internet Toolkit
WindowsWindowsFormsForms
ASP.NETASP.NET
System System
System.DataSystem.Data System.XmlSystem.Xml
System.WebSystem.Web
GlobalizationGlobalization
DiagnosticsDiagnostics
ConfigurationConfiguration
CollectionsCollections
ResourcesResources
ReflectionReflection
NetNet
IOIO
ThreadingThreading
TextText
ServiceProcessServiceProcess
SecuritySecurity
CommonCommon
OleDbOleDb
SQLTypesSQLTypes
SqlClientSqlClient
XPathXPath
XSLTXSLT
RuntimeRuntimeInteropServicesInteropServices
RemotingRemoting
SerializationSerialization
SerializationSerialization
ConfigurationConfiguration SessionStateSessionState
CachingCaching SecuritySecurity
ServicesServicesDescriptionDescription
DiscoveryDiscovery
ProtocolsProtocols
UIUIHtmlControlsHtmlControls
WebControlsWebControls
System.DrawingSystem.Drawing
ImagingImaging
Drawing2DDrawing2D
TextText
PrintingPrinting
System.Windows.FormsSystem.Windows.Forms
DesignDesign ComponentModelComponentModel
The .NET Framework LibraryThe .NET Framework Library
Base FrameworkBase FrameworkSystemSystem
ThreadingThreading
TextText
ServiceProcessServiceProcess
SecuritySecurity
ResourcesResources
ReflectionReflection
NetNet
IOIO
GlobalizationGlobalization
DiagnosticsDiagnostics
ConfigurationConfiguration
CollectionsCollections
RuntimeRuntime
SerializationSerialization
RemotingRemoting
InteropServicesInteropServices
Data And XMLData And XMLSystem.DataSystem.Data
System.XmlSystem.Xml
SQLTypesSQLTypes
SQLClientSQLClient
CommonCommon
OleDbOleDb
SerializationSerialization
XPathXPath
XSLTXSLT
ASP.NETASP.NET
System.WebSystem.Web
CachingCaching
ConfigurationConfiguration
ServicesServices UIUI
SessionStateSessionState
HtmlControlsHtmlControls
WebControlsWebControls
DescriptionDescription
DiscoveryDiscovery
SecuritySecurity
ProtocolsProtocols
WindowsWindows®® Forms Forms
System.DrawingSystem.Drawing
Drawing2DDrawing2D
ImagingImaging
PrintingPrinting
TextText
System.Windows.FormsSystem.Windows.Forms
DesignDesign ComponentModelComponentModel
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# JScriptJScript J#J#V
isua
l Stu
dio
.NE
TV
isua
l Stu
dio
.NE
T
Framework, Languages, And ToolsFramework, Languages, And Tools
LanguagesLanguages
The .NET Platform is language neutralThe .NET Platform is language neutral All .NET languages are first class playersAll .NET languages are first class players You can leverage your existing skillsYou can leverage your existing skills
Common language specificationCommon language specification Set of features guaranteed to be in all languagesSet of features guaranteed to be in all languages
We are providingWe are providing Visual BasicVisual Basic®®, C++, C#, J#, JScript, C++, C#, J#, JScript®®
Third-parties are buildingThird-parties are building APL, COBOL, Delphi, Pascal, Eiffel, Haskell, ML, APL, COBOL, Delphi, Pascal, Eiffel, Haskell, ML,
Oberon, Perl, Python, Scheme, Smalltalk…Oberon, Perl, Python, Scheme, Smalltalk…
StandardizationStandardization
A subset of the .NET Framework and A subset of the .NET Framework and C# submitted to ECMAC# submitted to ECMA Adopted as International standards in Adopted as International standards in
Dec. 2001Dec. 2001 In the ISO fast-track process nowIn the ISO fast-track process now Co-sponsored with Intel, Hewlett-PackardCo-sponsored with Intel, Hewlett-Packard
Common language infrastructureCommon language infrastructure Based on common language runtime and Based on common language runtime and
base frameworkbase framework Layered into increasing levels Layered into increasing levels
of functionalityof functionality
Additional ResourcesAdditional Resources
Learn about Web development with .NETLearn about Web development with .NET DEV334: Introduction to Web FormsDEV334: Introduction to Web Forms
Learn about client development with .NETLearn about client development with .NET DEV350: Building Smart Client ApplicationsDEV350: Building Smart Client Applications
Learn about Network class libraries Learn about Network class libraries DEV342: The .NET Framework Net Class LibrariesDEV342: The .NET Framework Net Class Libraries
Get the Deep Technical Drill Down Get the Deep Technical Drill Down DEV366: .NET Framework Under the HoodDEV366: .NET Framework Under the Hood
Learn how to Architect an applicationLearn how to Architect an application DEV310: Architecting Enterprise Applications with DEV310: Architecting Enterprise Applications with
Visual Studio .NETVisual Studio .NET DEV358: Architecting N-Tier .NET ApplicationsDEV358: Architecting N-Tier .NET Applications DEV402: Design Choices for Implementing Distributed DEV402: Design Choices for Implementing Distributed
Applications in .NETApplications in .NET
SummarySummary
The .NET FrameworkThe .NET Framework Dramatically simplifies development Dramatically simplifies development
and deploymentand deployment Unifies programming modelsUnifies programming models Provides robust and secure execution Provides robust and secure execution
environmentenvironment Supports multiple programming Supports multiple programming
languageslanguages
DiscussionDiscussion
Resources from Microsoft PressResources from Microsoft Press
For more information please visit the TechEd Bookshop.For more information please visit the TechEd Bookshop.www.microsoft.com/mspresswww.microsoft.com/mspress
MICROSOFT .NET FRAMEWORK
Don’t forget to complete the Don’t forget to complete the on-line Session Feedback form on-line Session Feedback form on the Attendee Web siteon the Attendee Web site
https://web.mseventseurope.com/teched/https://web.mseventseurope.com/teched/