Upload
brian-spencer
View
215
Download
3
Embed Size (px)
Citation preview
What is .Net
Gary Devendorf
.Net Framework• .Net framework works like the Domino Objects only
much lower level and very complete• It is part of the OS (or can be added)• Replaces win32 API calls - mostly• Decoupled from OS• Supports many programming languages with the CLR
(Common Language Runtime)
.NET Framework Design Goals
• Unifies programming models• Dramatically simplifies development• Provides robust execution
environment• Supports multiple programming
languages• Natively supports XML Web Services
Robust Environment• Automatic lifetime management
• All objects are garbage collected
• Exception handling• Error handling 1st class and mandatory
• Type-safety• No buffer overruns, No unsafe casts,
uninitialized variables
• Deployment and management• Assemblies, side-by-side execution• No more DLL hell!
Terminology "ABC"
• CLR: Common Language Runtime• One runtime for many programming languages
• Intermediate Language (IL)• One intermediate, high-level assembly-style
language that is emitted by language compilers
• Assembly• Container for code, metadata and resources – your
new term for what you used to call "D-L-L"
• Metadata• Information that describes the shape of data and the
runtime behavior of a program
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 ……V
isua
l Stu
dio
.NE
TV
isua
l Stu
dio
.NE
T
Framework, Languages, And Tools
Multi-Language Platform• The .NET Platform is language neutral
• All .NET languages are first class players• Complete cross-language integration• Highly leveraged tools
• Microsoft is providing• Visual Basic®, C++, C#, Java, JScript®
• Industry and academia• APL, COBOL, Eiffel, Fortran, Haskell, ML, Perl, Python,
RPG, Scheme, Smalltalk, …
Common Language Runtime (CLR)
• Execution Environment for "managed code"• Managed?
• Code resides on disk as IL• Must be translated into machine code
• Code references other code• Other code residing in other Assemblies must be found
• Memory must be managed• Server applications must be 100% leak free• .NET employs a Garbage Collector to do that job
• Execution must be as secure as possible
AssemblyAssembly
CLR Execution Model: Conceptual
Source Source CodeCode
Language Language CompilerCompiler
CompilationCompilation
Before installation or Before installation or the first time each the first time each method is calledmethod is called
ExecutionExecution
JIT JIT CompilerCompiler
NativeNative
CodeCode
Code (IL)Code (IL)
MetadataMetadata
Global Assembly Cache (GAC)•Used as a centralized repository to store all shared assemblies
•Used to store the code downloaded from the Internet
•Repository for prejitted code
•gacutil /i BookFlight.dll
Side by Side Execution
ApplicationBookFlightV 1.0.0.5
ApplicationBookFlightV 1.0.1.9
ApplicationBookFlightV 2.0.0.0
GACGACPrivatePrivate
PolicyPolicy
Travel Portal (.asmx)Reference: BookFlight, v 1.0.0.5Travel Portal (.asmx)Reference: BookFlight, v 1.0.0.5
IBookflightIBookflight
IDispatchIDispatch
IUnknownIUnknown
COM CallableCOM CallableWrapperWrapper
COM Interoperability
BookFlightBookFlight
IBookFlightIBookFlight
Common Language RuntimeCommon Language Runtime
ISeatResISeatRes
SeatRes
Runtime CallableRuntime CallableWrapperWrapper
LegacyClient
Summary
• Unifies programming models• Dramatically simplifies development• Provides robust execution
environment• Supports multiple programming
languages• Natively supports XML Web Services
Read More at
• http://www.microsoft.com/net/basics/