.NET Over view BY: Suresh Chandra Sahu
What is .NET ?????? Microsoft® .NET is a platform for building, running and experiencing the next generation of distributed applications. It spans clients, servers and services and consists of: A programming model that enables developers to build XML Web services and applications A set of XML Web services, such as Microsoft .NET My Services (formerly code-named 'Hailstorm'), that helps developers deliver a simple and integrated user experience; A set of servers, including Windows® 2000, SQL Server™ and BizTalk™ Server, that integrates, runs, operates and manages XML Web services and applications
Abstraction of OS Effort to run a program on many different H/W or OS H/W level achieved through OS The problem at Operating System level “A tough computer problem can be solved by addition of a layer of Abstraction” Microsoft has done the same by layering CLR+System calls Library on top of Operating System
.NET Framework .NET Framework Operating System Hardware
Operating System
Hardware
Hardware
.NET abstracts operating systems, which are abstracting hardware.
This means that we can write software to target the CLR – and that software can run on any operating system or platform which implements the CLR.
.NET Framework
CLR (Common language Runtime)
.NET system Class Libraries
ASP+ (Web Forms)
ADO+
C# (C Sharp)
.NET Framework
CLR
Heart of the .NET Framework Provides an environment in which programs can run Support many programming languages in a common manner .NET applications are compiled to a common language known as Microsoft Intermediate Language, or "IL". The CLR, then, handles compiling the IL to machine language IL contains methods, properties and fields related to the components that are compiled
Compilation Great Flexibility
Root of many .NET capability MSIL – Microsoft Intermediate Language All languages that work with .NET have compilers that generate MSIL rather than machine code MSIL and Metadata will be compiled into machine code
Compilation …. Code
Compiler
IL
Metadata
JIT Compiler
Execution
Compilation Example A developer build an application in VB.NET Compilation process generates IL code rather than binary machine code When user actually runs the application, the CLR invokes a just-in time (JIT) compiler This compiler runs on the user’s computer to compile the IL to machine code
Metadata Provides an exact description of the component that were compiled to IL COM inability to describe the component Data is kept in XML so easily accessible and understandable Describe component’s interface and so can be created and called by any language Eliminates any reliance on the windows registry
Key design goals of CLR Simpler and Faster development Automatic Handling of memory Management and process communication Tool support Simple and safer deployment Cross Language integration Versioning and deployment support
Simple and Faster development Less code more reuse Provides rich set of functionality Programs in .NET use this functionality and so less handwritting
Memory management and Process communication
Unnecessary to use malloc to set aside space for an array in C++. Need to just simple declaration statement Handles references counting on instantiation Automatic garbage collection for collecting objects no longer referenced by the application
Tool support Designed to support multiple languages Furnishes a rich set of object models that are useful to tools like designers, wizards .. Third party tools can be easily incorporated Cross language integration
Simple and safer deployment Deployment is very easy because: Applications in .NET are composed of assemblies which contains IL and metadata as previously stated So both code and a complete descriptor of the code are in one package and self describing. So there is no need to register anything in the registry
Application produced in .NET framework can be easily copied and run using XCOPY
Cross Language Integration Enable code written in one language to integrate with code written in other language Include cross language inheritance, exception handling . This can be done because there is a need to get the reference of other component through Metadata and metadata is language independent
Versioning Services CLR supports side by side execution of multiple versions of the same component. If one program want to use the component with particular version that it can get it from the metadata information
Class Libraries
Class Libraries Base classes: input/output , string manipulation, security management, network communications, thread management, text management and other functions. Data classes support persistent data management and include SQL classes for manipulating persistent data stores through a standard SQL interface. XML classes enable XML data manipulation and XML searching and translations.
Class Libraries… Web Forms include classes that enable you to rapidly develop web GUI applications. Windows Forms support a set of classes that allow you to develop Windows GUI applications – facilitating drag-and-drop GUI development and providing a common, consistent development interface across all languages supported by the .NET Framework
Win Forms .NET provides a single, unified way to create user interfaces outside of a browser environment - Win Forms Win Forms provide a language-neutral way to create forms, add controls, and respond to the user's actions Win Forms are not based on ActiveX They are instances of classes in the .NET system class library.
Thank You.