160 likes | 331 Views
. NET Framework Overview. Pingping Ma Nov 16 th , 2006. . NET Framework. A development and execution environment Allow different programming languages & libraries to work together seamlessly to create Windows-based applications Two main components: The Common Language Runtime (CLR)
E N D
.NET Framework Overview Pingping Ma Nov 16th, 2006
.NET Framework • A development and execution environment • Allow different programming languages & libraries to work together seamlessly to create Windows-based applications • Two main components: • The Common Language Runtime (CLR) • The Framework Class Libraries (FCL)
The Common Language Runtime • The executionengine for .NET framework applications • Services includes: • Code management (loading and execution) • Application memory isolation • Verification of type safety • Conversion of IL to native code • Access to metadata (enhanced type information) • Managing memory, including garbage collection • Enforcement of code access security
Key terminology • Managed Code • 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 Unmanaged: C++ • Managed Data • Data that is allocated and de-allocated by CLR’s garbage collector. • Managed: C#, VB, Jscript .NET Unmanaged: C++ • Benefits and constraints
Key terminology • Common Type System (CTS) • 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 • Ensures that code doesn’t attempt to access memory that hasn’t been allocated to it (type-safe)
Key terminology • Assembly • The primary building block of a .NET Framework application. • A compiled and versioned collection of code and metadata that forms an atomic functional unit. • 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
Compiler • Microsoft Intermediate Language (MSIL) • 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. • 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
Compiler • JIT compilation • Normal: optimize code, but processor and memory intensive • 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. • Current implementation: Normal one
Language Neutrality • Achieved through the Common Type System (CTS). • The CTS defines how classes are defined. It describes features a class can have: • member functions (methods), member variables ("fields"), events, and properties • different kinds of "visibility" that these items can have • all classes must ultimately derive from System.Object • Only single inheritance is supported. • Compatibility and Interoperability
Safety • The language changed most is C++ • The security is enforced by the examination of the call stack.
Class libraries • .NET provides a single-rooted hierarchy of classes. • The root of the namespace is called System; this contains basic types and objects. • 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.
.NET vs. J2EE • Comparison of .NET and J2EE • Language neutral • 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. • There are differences in the nature of the intermediate languages. • IL is more generic
.NET Framework 3.0 • It combines the power of the .NET Framework 2.0 with four new technologies: • Windows Presentation Foundation (WPF), • Windows Communication Foundation (WCF) • Windows Workflow Foundation (WF) • Windows CardSpace (WCS)
.NET Framework 3.0 • Windows Presentation Foundation (WPF) • the graphical subsystem feature of the .NET • provide a clear separation between the UI and the business logic • Enable richer control, design, and development of the visual aspects of Windows programs. • Windows Communication Foundation(WCF) • Is a set of technologies for building and running connected systems. • Is a new breed of communications infrastructure built around the Web services architecture.
.NET Framework 3.0 • Windows Workflow Foundation(WF) • Is the programming model, engine and tools for quickly building workflow enabled applications on Windows. • Windows CardSpace (WCS) • 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. • A central part of Microsoft's effort to create an Identity Metasystem, or a unified, secure and interoperable identity layer for the Internet.
Reference • Microsoft .NET home • Microsoft .NET overview by Ars Technica • .NET framework developer center