.NET Developer Tip
(Receive this column in your inbox,
click Edit your Profile to subscribe.)
The common language runtime
Peter G. Aitken and Phil Syme
If you haven't done any development for the .NET environment, chances are that you need to understand some basic terms about the concept. This tip, excerpted from InformIT, offers some definitions and explanations about the common language runtime (CLR) in the .NET framework.
The common language runtime (CLR) is the infrastructure that .NET uses to execute all your applications. The CLR includes a huge set of class libraries that you can use in your applications. Some interesting non-Internet–related classes include utilities that allow you to manipulate the Windows NT event log, Active Directory, cryptographic services, performance counters, COM+ services, object serialization, and Windows native services.
The CLR also takes care of compiling "intermediate language," or IL, code into native machine code. The basic process works as follows:
The Visual Basic compiler converts your code into IL. In terms of functionality and language complexity, IL is somewhere between assembly language and C. IL is optimized for quick compilation into machine code. Normally, you won't deal with IL in any of your development efforts. You can think of IL as an intermediate product of the compilation process.
To continue reading for free, register below or login
To read more you must become a member of SearchSOA.com
');
// -->

Your Internet application is called by a user, or more precisely, by the Web server in response to a user's request.
The CLR takes over and compiles the IL into machine code. This happens function by function. If a function is used, it's compiled into machine code. If not, it remains as IL. The odds of an error occurring during this process are extremely small, equivalent to a compiler crash.
If this process seems roundabout and destined to make your application too slow, please suspend judgment until you've worked with .NET for a little while. You should be pleasantly surprised. At the minimum, this process makes development much faster, as the first step is much faster than other methods. You can also compile your .NET code directly into machine code by using standard tools installed with the .NET Framework.
The CLR contains other services, including support for running multiple .NET applications inside one process with a guarantee that they won't interfere with each other. This is a result of a concept called type safety. Any .NET language must guarantee type-safe code, which ensures that arrays and collections will never be accessed incorrectly, among other things. The Visual Basic compiler always enforces type safety when it compiles your code into IL.
To read the article from which this tip is excerpted, click over to InformIT. You have to register there, but the registration is free.
For More Information: