Ticker

6/recent/ticker-posts

Component of .net framework

 


The main two components of .NET Framework are:

Ø  Common Language Runtime (CLR)

Ø  Base Class Library (BCL)/ Framework Class Library(FCL)

1. Common Language Runtime (CLR)

The CLR is the execution engine for .NET applications and serves as the interface between .NET application and the operating system. It provides an environment to run all the .Net Programs. The code which runs under the CLR is called as Managed Code. Programmers need not worry on managing the memory if the programs are running under the CLR as it provides memory management and thread management. The CLR provides many services such as:

Ø  Load and execute code.

Ø  Manages memory and object

Ø  Convert intermediate language into native code.

Ø  Exception handling.

Common Language Specification

Common Language Specification (CLS) is a set of basic language features that .Net Languages needed to develop Applications and Services, which are compatible with the .Net Framework. When there is a situation to communicate Objects written in different .Net Complaint languages, those objects must expose the features that are common to all the languages. Common Language Specification (CLS) ensures complete interoperability among applications, regardless of the language used to create the application.

Common language specification provides a syntactical rule to a programming language to develop and create applications. .Net has several languages such as C#, VB.net, VC++ etc. Here each and every language will follow its own syntax. One language cannot understand another language syntax. For example in C# statements are always end with a semicolon ( ;)  terminator but in VB.net it should not end with a semicolon (;). But CLR can understand all the language syntax because it follows its own CLS. CLR will have its own language specification.

So that whatever might be language each and every language will be converted into the intermediate language with respect to the compiler. When a program is written in C# language, the CSC compiler covert the C# code into the intermediate language which is common to all language and that intermediate language will be understood by CLR (because CLR will have its own specification.)

Common Type System

Common Type System (CTS) describes a set of types that can use different .Net languages have in common, which ensure that objects written in different languages can interact with each other For Communicating between programs written in any .NET compliant language, the types have to be compatible on the basic level. These types can be Value Types or Reference Types. The Value Types are passed by values and stored in the stack. The Reference Types are passed by references and stored in the heap. Common Type System (CTS) provides a base set of Types that is responsible for cross-language integration. The Common Language Runtime (CLR) can load and execute the source code written in any .Net language, only if the type is described in the Common Type System (CTS)

It deals with data types, here .NET have several languages, each and every language have its own data type. One language data type cannot be understandable by the other language data type. But CLR can understand all the language data types because CLR has its own data type. For example in C# integer variable represented using the keyword "int"  but in  VB.NET it is represented by the keyword  "Integer". so that compiler of both languages converts it into "INT32" which is recognized by CLR to represent integer variable.  Hence CTS provides data type rules and regulation to the languages.

2. .Net Framework Class Library (FCL)

The .Net Framework class library (FCL) provides the core functionality of .Net Framework architecture. The .Net Framework Class Library (FCL) includes a huge collection of reusable classes, interfaces, and value types that expedite and optimize the development process and provide access to the system functionality.

The .Net Framework class library (FCL) organized in a hierarchical tree structure and it is divided into Namespaces and assembly which is also called a user-defined class library. A namespace is a logical grouping of types for the purpose of identification. Framework class library (FCL) provides the consistent base types that are used across all .NET enabled languages. The Classes are accessed by namespaces, which reside within Assemblies. A user-defined library is called assembly where the user is or programmer is going to create class and method. The assembly consists of a .dll or .exe file. The .dll (dynamic linking library) is used for reusability purposes and cannot open because it cannot contain the main function. The .exe(executable file ) is used for output purposes and can be easily opened because it contains the main method.

The System Namespace is the root of types in the .NET Framework. The .Net Framework class library (FCL) classes are managed classes that provide access to System Services. The .Net Framework class library (FCL) classes are object-oriented and easy to use in program developments. Moreover, third-party components can integrate with the classes in the .NET Framework


Post a Comment

0 Comments