Introduction To .NET Framework 110770116004 SOCET(IT) Page 2
Introduction : The .NET framework is an integrated component of windows operating system that supports development and execution of next generation applications, Windows store apps and services. It acts as the framework for a number of programming languages which provide interoperability between them. It includes a .NET library which is available to all languages that it supports. Software programs written for .NET run in an environment called the Common Language Runtime (CLR) which is an application virtual machine providing memory management and exception handling. The .NET base class library delivers the database connectivity, data access, user interface, web application development, algorithms and network communications used by .NET programmers in conjunction with their custom software development. In short, .NET Framework provides an environment for building, developing and running Microsoft windows services and applications. It consists of three distinct technologies: 1. Common Language Runtime (CLR) 2. Framework Based Classes 3. User interface components (ASP.NET and Windows forms)
Figure 1.1 .NET framework overview
Introduction To .NET Framework 110770116004 SOCET(IT) Page 3
Components of .NET Framework Architecture :
Figure 1.2 Components of .NET Framework Architecture
The CLR manages memory, threat execution, and code execution softly verification, compilation (common concept) and other system services for managed code. The code that runs within the CLR runs in an encapsulation and managed environment, separate from other process on the machine. The runtime enforce code compactness by implementing a strict type and code verification infrastructure called the CTS. CTS are a universal type system for .NET framework. In Introduction To .NET Framework 110770116004 SOCET(IT) Page 4
addition to defining all types the CTS also stipulates the rules that the CLR fallows with regard to application declaring and using these types in the world of .NET everything in the CTS is an object. In fact, not only is everything an object but even more importantly all object, implicitly derived from a single base class defined as part of CTS. This base class called system object. CLS ensures seamless inter operability between CLS complaint Language and class Libraries. Because the same .NET base class libraries shared between all programming languages. A developer can take his or her knowledge of this library with him as he or she migrates from language to language. Thus run time accelerate development language of chaise yet take full advantage of runtime. Class library component written in other language other developers. All .NET programs are compiled to an intermediate language MSIL files, rather than to native code which can be understood by the computers processor. This MSIL code is then compiler to native code either when the application is installed or when the application is run, which is then executed by the machine processor since managed code is neighbor interpreted, thus run time enhance performance finally the runtime can be hosted by high performance server side applications such as Microsoft SQL server and internet information services (IIS).
Common Language Runtime (CLR) :
We can say CLR is the heart and soul of the .NET Framework. As the name suggests, CLR provides run time environment in which the program written in C# and other .NET languages are executed. It also supports cross language interoperability.
CLR supports a number of services as follows: 1. Loading and execution of the program 2. Memory isolation for application 3. Compilation of IL into native executable code 4. Memory management (automatic garbage collection) 5. Enforcement of security 6. Managing errors and exceptions 7. Support for tasks such as debugging and profiling Introduction To .NET Framework 110770116004 SOCET(IT) Page 5
8. Interoperability with other systems
Figure 1.3 Working of Common Language Runtime (CLR)
The .NET Framework provides multiple language support using the features known as Common Type System that build into the CLR. The CTS supports a variety of types and operations found in most programming languages and therefore calling one language from another does not require type conversions. We can build .NET program in a number of other languages including C++ and Visual Basic.
Common Language Specification (CLS) :
The CLS specification defines a set of rules that enables interoperability on the .NET platform. These rules guide the third party compiler designers and library builders. The CLS is a subset of CTS and therefore the language supporting the CLS can use each others' class libraries as if they are their own.
Microsoft Intermediate Language (MSIL) :
MSIL simply called IL is an instruction set into which all the .NET programs are compiled. It is akin to assembly language and contains instructions for loading, storing, initializing and Introduction To .NET Framework 110770116004 SOCET(IT) Page 6
calling methods. When we compile a C# program or any program written in a CLS compliant language, the code is compiled into MSIL.
The .NET Framework Class Library (FCL) :
.NET has an extensive library, offering literally thousands of reusable types. Organized into namespaces, the FCL contains code supporting all the .NET technologies, such as Windows Forms, Windows Presentation Foundation, ASP.NET, ADO.NET, Windows Workflow, and Windows Communication Foundation. In addition, the FCL has numerous cross-language technologies, including file I/O, networking, text management, and diagnostics. As mentioned earlier, the FCL has CLR support in the areas of built-in types, exception handling, security, and threading.
VB.NET : Visual Basic .NET (VB.NET) is an object-oriented computer programming language implemented on the .NET Framework. Although it is an evolution of classic Visual Basic language, it is not backwards-compatible with VB6, and any code written in the old version does not compile under VB.NET.
VB.NET is implemented by Microsoft's .NET framework. Therefore, it has full access to all the libraries in the .Net Framework. It's also possible to run VB.NET programs on Mono, the open-source alternative to .NET, not only under Windows, but even Linux or Mac OSX.
ASP.NET : Here are some points that give the quick overview of ASP.NET : 1. ASP.NET provides services to allow the creation, deployment, and execution of Web Applications and Web Services. 2. Like ASP, ASP.NET is a server-side technology and runs on Microsoft Internet Information Server (IIS). 3. Web Applications are built using Web Forms. ASP.NET comes with built-in Web Forms controls, which are responsible for generating the user interface. They mirror typical HTML widgets like text boxes or buttons. If these controls do not fit your needs, you are free to create your own user controls. Introduction To .NET Framework 110770116004 SOCET(IT) Page 7
Figure 1.4 ASP.NET ASP.NET was developed in direct response to the problems that developers had with classic ASP. Since ASP is in such wide use, however, Microsoft ensured that ASP scripts execute without modification on a machine with the .NET Framework. Thus, IIS can house both ASP and ASP.NET scripts on the same machine.
ADO.NET : ADO.NET is a large set of .NET classes that enable us to retrieve and manipulate data, and update data sources, in very many ways. As an integral part of the .NET framework, it shares many of its features; features such as multi-language support, garbage collection, just-in-time compilation, object-oriented design, and dynamic caching, and is far more than an upgrade of previous versions of ADO. It is a part of the .NET framework architecture. It is a model used by .NET applications to communicate with a database for retrieving, accessing, and updating data. ADO.NET is set to become a core component of any data-driven .NET application or Web Service, and understanding its power will be essential to anyone wishing to utilize .NET data support to maximum effect.