Presentation is loading. Please wait.

Presentation is loading. Please wait.

.NET Framework Overview Pingping Ma Nov 16 th, 2006.

Similar presentations


Presentation on theme: ".NET Framework Overview Pingping Ma Nov 16 th, 2006."— Presentation transcript:

1 .NET Framework Overview Pingping Ma Nov 16 th, 2006

2 .NET Framework A development and execution environment A development and execution environment Allow different programming languages & libraries to work together seamlessly to create Windows-based applications Allow different programming languages & libraries to work together seamlessly to create Windows-based applications Two main components: Two main components: The Common Language Runtime (CLR) The Common Language Runtime (CLR) The Framework Class Libraries (FCL) The Framework Class Libraries (FCL)

3 The Common Language Runtime The execution engine for.NET framework applications The execution engine for.NET framework applications Services includes: Services includes: Code management (loading and execution) Code management (loading and execution) Application memory isolation Application memory isolation Verification of type safety Verification of type safety Conversion of IL to native code Conversion of IL to native code Access to metadata (enhanced type information) Access to metadata (enhanced type information) Managing memory, including garbage collection Managing memory, including garbage collection Enforcement of code access security Enforcement of code access security

4 Key terminology Managed Code Managed Code Code written to target the services of CLR, such as safe execution and interoperability, by providing extra information (metadata) to the runtime Code written to target the services of CLR, such as safe execution and interoperability, by providing extra information (metadata) to the runtime Managed: C#, VB.NET, Jscript.NET Managed: C#, VB.NET, Jscript.NET Unmanaged: C++ Unmanaged: C++ Managed Data Managed Data Data that is allocated and de-allocated by CLR’s garbage collector. Data that is allocated and de-allocated by CLR’s garbage collector. Managed: C#, VB, Jscript.NET Managed: C#, VB, Jscript.NET Unmanaged: C++ Unmanaged: C++ Benefits and constraints Benefits and constraints

5 Key terminology Common Type System (CTS) Common Type System (CTS) A rich type system built into CLR, that supports the types and operations found in most programming languages. A rich type system built into CLR, that supports the types and operations found in most programming languages. Enable types in one language to interoperate with types in another language, including cross-language exception handling Enable types in one language to interoperate with types in another language, including cross-language exception handling Ensures that code doesn’t attempt to access memory that hasn’t been allocated to it (type- safe) Ensures that code doesn’t attempt to access memory that hasn’t been allocated to it (type- safe)

6 Key terminology Assembly Assembly The primary building block of a.NET Framework application. The primary building block of a.NET Framework application. A compiled and versioned collection of code and metadata that forms an atomic functional unit. A compiled and versioned collection of code and metadata that forms an atomic functional unit. Assemblies are self-describing by means of their manifest. Assemblies are self-describing by means of their manifest. Manifests contain the assembly name, version, and locale, list of files that form the assembly, dependencies the assembly has, features, and the permissions required Manifests contain the assembly name, version, and locale, list of files that form the assembly, dependencies the assembly has, features, and the permissions required

7 Compiler Microsoft Intermediate Language (MSIL) Microsoft Intermediate Language (MSIL) CPU-independent instruction set into which.Net program are compiled CPU-independent instruction set into which.Net program are compiled Combine MSIL with metadata and manifest, Portable Executables (PE) are obtained, which allows for true cross-language integration. Combine MSIL with metadata and manifest, Portable Executables (PE) are obtained, which allows for true cross-language integration. JIT compilation JIT compilation When get called, it gets compiled to native code; subsequent calls to the same method don't have to undergo the same compilation When get called, it gets compiled to native code; subsequent calls to the same method don't have to undergo the same compilation

8 Compiler JIT compilation JIT compilation Normal: optimize code, but processor and memory intensive Normal: optimize code, but processor and memory intensive EconoJIT: require less processor and memory but does not optimize code EconoJIT: require less processor and memory but does not optimize code Ngen: Some files are compiled ahead of time to reduce the start-up overhead. Ngen: Some files are compiled ahead of time to reduce the start-up overhead. Current implementation: Normal one Current implementation: Normal one

9 Language Neutrality Achieved through the Common Type System (CTS). Achieved through the Common Type System (CTS). The CTS defines how classes are defined. It describes features a class can have: The CTS defines how classes are defined. It describes features a class can have: member functions (methods), member variables ("fields"), events, and properties member functions (methods), member variables ("fields"), events, and properties different kinds of "visibility" that these items can have different kinds of "visibility" that these items can have all classes must ultimately derive from System.Object all classes must ultimately derive from System.Object Only single inheritance is supported. Only single inheritance is supported. Compatibility and Interoperability Compatibility and Interoperability

10 Safety The language changed most is C++ The language changed most is C++ The security is enforced by the examination of the call stack. The security is enforced by the examination of the call stack.

11 Class libraries.NET provides a single-rooted hierarchy of classes..NET provides a single-rooted hierarchy of classes. The root of the namespace is called System; this contains basic types and objects. The root of the namespace is called System; this contains basic types and objects. All objects derive from System.Object. All objects derive from System.Object. The set of classes is pretty comprehensive, providing collections, file, screen, and network I/O, threading, and so on, as well as XML and database connectivity. The set of classes is pretty comprehensive, providing collections, file, screen, and network I/O, threading, and so on, as well as XML and database connectivity.

12 .NET vs. J2EE Comparison of.NET and J2EE Comparison of.NET and J2EE Language neutral Language neutral The class libraries have a fair degree of commonality. The class libraries have a fair degree of commonality. Compilation: JVM either interpret the bytecode directly or compile the bytecode into native code and run..NET uses the second techniques. Compilation: JVM either interpret the bytecode directly or compile the bytecode into native code and run..NET uses the second techniques. There are differences in the nature of the intermediate languages. There are differences in the nature of the intermediate languages. IL is more generic IL is more generic

13 .NET Framework 3.0 It combines the power of the.NET Framework 2.0 with four new technologies: It combines the power of the.NET Framework 2.0 with four new technologies: Windows Presentation Foundation (WPF), Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF) Windows Communication Foundation (WCF) Windows Workflow Foundation (WF) Windows Workflow Foundation (WF) Windows CardSpace (WCS) Windows CardSpace (WCS)

14 .NET Framework 3.0 Windows Presentation Foundation (WPF) Windows Presentation Foundation (WPF) the graphical subsystem feature of the.NET the graphical subsystem feature of the.NET provide a clear separation between the UI and the business logic provide a clear separation between the UI and the business logic Enable richer control, design, and development of the visual aspects of Windows programs. Enable richer control, design, and development of the visual aspects of Windows programs. Windows Communication Foundation(WCF) Windows Communication Foundation(WCF) Is a set of technologies for building and running connected systems. Is a set of technologies for building and running connected systems. Is a new breed of communications infrastructure built around the Web services architecture. Is a new breed of communications infrastructure built around the Web services architecture.

15 .NET Framework 3.0 Windows Workflow Foundation(WF) Windows Workflow Foundation(WF) Is the programming model, engine and tools for quickly building workflow enabled applications on Windows. Is the programming model, engine and tools for quickly building workflow enabled applications on Windows. Windows CardSpace (WCS) Windows CardSpace (WCS) Securely store digital identities of a person Securely store digital identities of a person Provides a unified interface for choosing the identity for a particular transaction, such as logging in to a website. Provides a unified interface for choosing the identity for a particular transaction, such as logging in to a website. A central part of Microsoft's effort to create an Identity Metasystem, or a unified, secure and interoperable identity layer for the Internet. A central part of Microsoft's effort to create an Identity Metasystem, or a unified, secure and interoperable identity layer for the Internet.

16 Reference Microsoft.NET home Microsoft.NET home Microsoft.NET home Microsoft.NET home Microsoft.NET overview by Ars Technica Microsoft.NET overview by Ars Technica Microsoft.NET overview by Ars Technica Microsoft.NET overview by Ars Technica.NET framework developer center.NET framework developer center.NET framework developer center.NET framework developer center


Download ppt ".NET Framework Overview Pingping Ma Nov 16 th, 2006."

Similar presentations


Ads by Google