320 likes | 603 Views
Seminarium on Component -based Software Engineering. Microsoft .NET Framework Overview Abidi Mahmoud. ERP & Billing. Plant Operations. .NET Enterprise Vision. Users Any device, Any place, Any time. Roles/Experiences Get the right info To the right user At the right time. Sales. Supply.
E N D
Seminarium onComponent-based Software Engineering Microsoft .NET Framework OverviewAbidi Mahmoud
ERP & Billing Plant Operations .NET Enterprise Vision UsersAny device,Any place,Any time Roles/ExperiencesGet the right infoTo the right userAt the right time Sales Supply Customer Engineering Operations XML Web ServicesIntegrate and orchestrate business applications and processes Authentication Scheduling Notification Back OfficeHeterogeneous application and server infrastructure Customer Service
What is .NET? • A generic term for the MS vision • The successor to WinDNA • Sometimes applied to product names • Such as Windows .NET Server • A specific software framework • Includes a common runtime • Common across OS and dev language • Includes baseline dev tools in an SDK • Includes powerful dev environment • Visual Studio .NET
.NET FrameworkStandard programming platform • Common programming language • C# “C Sharp” • Standardized as ECMA-334 • Similar to Java (simplified C++) • Common Language Infrastructure (CLI) • Standardized as ECMA-335 • Defines classes, types, and techniques • Internationalization (I18N) support
The structure of the .NET Framework VB C# J#... Common language specification (CLS) ASP.NET Windows Forms Web Forms XML Web services ADO.NET and XML .NET Framework classes Common language runtime (CLR) COM+ services Windows System services Win32 API and COM+ services
The structure of the .NET Framework VB C# J#... Common language specification (CLS) ASP.NET Windows Forms Web Forms XML Web services ADO.NET and XML .NET Framework classes Common Language Runtime (CLR) COM+ services Windows Microsoft implimentation of CLI and support for COM and platform interoperation
What is the CLR? • CLR = Common Language Runtime • Microsoft’s implementation of CLI (ECMA 335) • For Windows environments • Plus extensions for Windows • Wintel PC, Wintel server, WinCE, WinXPE, … • Most extensions are in the class library • CLI-compliant code runs on CLR
What is the CLI? • CLI = Common Language Infrastructure • Language-neutral platform • Provides a specification for executable code and the execution environment in which it runs • Executable code is presented to the VES as modules. • CLI comprise the specification of : • Execution engine (loader,JIT,garbage- collecting) • Common Type System (CTS) • Common Language Specification (CLS)
Common Type System (CTS) • Types describe values and specify a contract that all values of that type shall support. • CTS supports (OOP) as well as functional and procedural PL • Values are simple bit patterns for things like integers and floats…; • Objects Each object is self-typing, that is, its type is explicitly stored in its representation.
Common Language Specification (CLS) • The CLS is a set of rules that apply to generated assemblies. • The CLS is an agreement between language designers and framework (that is, class library) designers. • The CLS specifies a subset of the CTS and a set of usage conventions. • For more info… • http://msdn.microsoft.com/net/ecma • http://www.ecma.ch/
CLR Features • All code is compiled, not interpreted • Assembliesare deployed in intermediate language (IL, also called CIL or MSIL) • Converted to native machine code at run time (via JIT compiler) • Static code management • Versioning, localizing, and signing • Configurable assembly resolver • Global assembly cache (GAC) • Dynamic code management • Memory allocation with garbage collection • Lifecycle management via reference tracking • Thread pooling
CLR Features • Fine-grained code access security • Augments OS security • Ensures that code only performs operations allowed by policies set by user or administrator • Based on code source, publisher signature, and other evidence • Flexible remoting • Includes XML/SOAP and binary • Remoting model is easily extended • Integrates with web services
Base Class Library Thread Manager COM Marshaler Type Checker Exception Manager Security Services Debug Services IL to Native Compilers Code Manager Garbage Collector Class Loader CLR Internals
Assemblies(CLI deployment units) • Set of files in a derectory • It can be single or multi file • Assemblies are composed of • Manifest • Metadata that describes the assemblies • Metada • Machine-readable information about a resource • In .NET metadata includes type definition, version information, external assemby references • Code IL • Code that CLR executes at runtime
Global Assembly Cache • GAC = database of shared assemblies • Each assembly must have strong name • Similar to GUID, but much more detailed • Includes text name, version, culture, digital signature, and public key • Keys created by SN (strong name) utility • Nobody can use your names because they are based on your private key • GAC assemblies can only refer to other strong-named assemblies
Code Source Code Language Compiler Metadata Execution Native Code JIT Compiler Compilation & Execution AssemblyUnit of deployment, similar to DLL or EXE with added metadata Compilation Saved in cache An assembly can also be pre-compiled as part of deployment Before installation or the first time each method is called
The structure of the .NET Framework Provide classes that can be called from any .NET-enabled PL VB C# J#... Common language specification (CLS) ASP.NET Windows Forms Web Forms XML Web services Frameworks make use of sealed classes(do not permit any subclassing) ADO.NET and XML .NET Framework classes Common Language Runtime (CLR) COM+ services Windows
Framework Foundation System.Web System.WinForms Services UI Design ComponentModel Description HtmlControls Discovery WebControls Protocols System.Drawing Drawing Caching Security Drawing2D Printing Text Configuration SessionState Imaging System.Data System.Xml DOM Data (Dataset) SQL XSLT Serialization Reader/Writers Design SQLTypes XPath System Collections IO Configuration Runtime InteropServices Security Net ServiceProcess Remoting Text Reflection Diagnostics Serialization Globalization Resources Threading
Framework support (configuration,globalization, and management) System.Web System.WinForms Services UI Design ComponentModel Description HtmlControls Discovery WebControls Protocols System.Drawing Drawing Caching Security Drawing2D Printing Text Configuration SessionState Imaging System.Data System.Xml DOM Data (Dataset) SQL XSLT Serialization Reader/Writers Design SQLTypes XPath System Collections IO Configuration Runtime InteropServices Security Net ServiceProcess Remoting Text Reflection Diagnostics Serialization Globalization Resources Threading
Framework support (platform acces and COM interoperation) System.Web System.WinForms Services UI Design ComponentModel Description HtmlControls Discovery WebControls Protocols System.Drawing Drawing Caching Security Drawing2D Printing Text Configuration SessionState Imaging System.Data System.Xml DOM Data (Dataset) SQL XSLT Serialization Reader/Writers Design SQLTypes XPath System Collections IO Configuration Runtime InteropServices Security Net ServiceProcess Remoting Text Reflection Diagnostics Serialization Globalization Resources Threading
Framework support (I/O, messaging, remoting, and serialization) System.Web System.WinForms Services UI Design ComponentModel Description HtmlControls Discovery WebControls Protocols System.Drawing Drawing Caching Security Drawing2D Printing Text Configuration SessionState Imaging System.Data System.Xml DOM Data (Dataset) SQL XSLT Serialization Reader/Writers Design SQLTypes XPath System Collections IO Configuration Runtime InteropServices Security Net ServiceProcess Remoting Text Reflection Diagnostics Serialization Globalization Resources Threading
Framework support (debugging, compilation, and code generation) System.Web System.WinForms Services UI Design ComponentModel Description HtmlControls Discovery WebControls Protocols System.Drawing Drawing Caching Security Drawing2D Printing Text Configuration SessionState Imaging System.Data System.Xml DOM Data (Dataset) SQL XSLT Serialization Reader/Writers Design SQLTypes XPath System Collections IO Configuration Runtime InteropServices Security Net ServiceProcess Remoting Text Reflection Diagnostics Serialization Globalization Resources Threading
Framework support (web protocol, web sever acces,and XML standards,…) System.Web System.Windows.Forms Services UI Design ComponentModel Description HtmlControls Run Time Discovery WebControls Protocols System.Drawing Drawing (subset) Caching Security Drawing2D Printing Text Configuration SessionState Imaging System.Data System.Xml DOM Data (Dataset) SQL XSLT Serialization Reader/Writers Design SQLTypes XPath System Collections IO Configuration Runtime InteropServices Security Net ServiceProcess Remoting Text Reflection Diagnostics Serialization Globalization Resources Threading
Framework support (component classes, web server support… ) System.Web System.Windows.Forms Services UI Design ComponentModel Description HtmlControls Run Time Discovery WebControls Protocols System.Drawing Drawing (subset) Caching Security Drawing2D Printing Text Configuration SessionState Imaging System.Data System.Xml DOM Data (Dataset) SQL XSLT Serialization Reader/Writers Design SQLTypes XPath System Collections IO Configuration Runtime InteropServices Security Net ServiceProcess Remoting Text Reflection Diagnostics Serialization Globalization Resources Threading
The structure of the .NET Framework ADO.NET is a set of classes that provide data access support for the .NET Framework VB C# J#... Common language specification (CLS) ASP.NET Windows Forms Web Forms XML Web services ADO.NET and XML .NET Framework classes ADO.NET is based on ADO but is designed to work with XML and to work in a disconnected environment Common Language Runtime (CLR) COM+ services Windows
The structure of the .NET Framework VB C# J#... ASP.NET Including Web Forms And XML Web services Common language specification (CLS) ASP.NET Windows Forms Web Forms XML Web services ADO.NET and XML .NET Framework classes Traditional client application that use windows Forms Common Language Runtime (CLR) COM+ services Windows
The structure of the .NET Framework VB C# J#... Common language specification (CLS) ASP.NET Windows Forms Web Forms XML Web services CLS set of rules that a CLS-compliant language needs to follow ADO.NET and XML .NET Framework classes Common Language Runtime (CLR) COM+ services Windows Language that follow the CLS C#, VB, J# …
Classic MS languages • VB – gains many OO features • VC++ – gains managed code features • VJ# – replaces VJ++ (not J2EE) • C# – new language
C# (C Sharp) Overview • C# is a new language, crafted specifically to work well within the .NET Framework • C# do not support • Templates • Multiple Inheritance • Global Functions • Preprocessor Macros • C# support • Operator Overloading • …
Summary • .NET Framework provides… • Common platform for all .NET languages • Sophisticated code management • Fine-grained security • .NET Framework fixes… • Object life-cycle problems, especially COM • Weak support for enterprise features • COM+, WMI, MSMQ, … • DLL hell and other deployment problems