Friday, March 5, 2010

What is CLR?

The common language runtime (CLR) is just what its name says it is: a runtime that is usable by different and variant programming languages. The core features of the CLR (such as memory management, assembly loading, security, exception handling and thread synchronization) are available to any and all programming languages that target the runtime also get errors reported via exceptions. Another example is that the runtime also allows us to create a thread, so any language that targets the runtime can create a thread.
In fact at runtime the CLR has no idea which programming language the developer used for the source code. This means that you should choose whatever programming language allows you to express our intentions most easily. We can develop our code in any programming language we desired as long as the compiler we use to compile our code targets the CLR.
The Common Language Runtime (CLR) is the environment where all programs in .NET are run. It provides various services, like memory management and thread management. Programs that run in the CLR need not manage memory, as it is completely taken care of by the CLR. For example, when a program needs a block of memory, CLR provides the block and releases the block when program is done with the block.
In addition to simplifying the designing of Web applications, the .NET CLR offers many advantages. Some of these advantages are listed as follows.
•    Improved performance: The ASP.NET code is a compiled CLR code instead of an interpreted code. The CLR provides just – in – time compilation, native optimization, and caching. Here, it is important to note that compilation is a two – stage process in the .NET Framework. First, the code is compiled into the Microsoft Intermediate Language (MSIL). Then, at the execution time, the MSIL is compiled into native code. Only the portions of the code that are actually needed will be compiled into native code. This is called Just In Time compilation. These features lead to an overall improved performance as ASP.NET applications.
•    Flexibility: The entire .NET class library can be accessed by ASP.NET applications. We can use the language that best applies to the type of functionality we want to implement, because ASP.NET is language independent.
•    Configuration settings: The application-level configuration settings are stored in an Extensible Markup Language (XML) format. The XML format is a hierarchical test format, which is easy to read and write. This format makes it easy to apply new settings to applications without the aid of any local administration tools.
•    Security: ASP.NET applications are secure and use a set of default authorization and authentication schemes. However, we can modify these schemes according to the security needs of an application.

No comments:

Post a Comment