Code Management in the .NET Framework

The Microsoft .NET Framework has two main components: the Common Language Runtime (CLR) and the .NET Framework class library.

Tim Huckaby

February 11, 2002

3 Min Read
ITPro Today logo in a gray background | ITPro Today

The Microsoft .NET Framework has two main components: the Common Language Runtime (CLR) and the .NET Framework class library. The CLR, which is the foundation of the .NET Framework, is a negotiator that manages code at execution time. The concept of code management is a fundamental principle of the CLR, and applications that the CLR manages are called "managed applications" or "managed code."

When it compiles a managed application, the CLR's language compiler (e.g., Visual Basic .NET, C#) translates source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that the language compiler then efficiently converts to native code. Before you can execute the code, you must convert MSIL to CPU-specific code, usually by using a just-in-time (JIT) compiler. JIT compilation takes into account that the a specific CPU might not ever call some code during execution. Therefore, rather than using processing time and memory to convert all the MSIL to native code, the JIT compiler converts the MSIL on an as-needed basis during execution. When the JIT compiler converts MSIL, the compiler stores the resulting native code so that it's accessible for subsequent calls. Because the CLR supplies JIT compilers for each computer architecture that CLR supports, you can use them to compile and execute the same set of MSIL code on any supported architecture.

Managed-application compilation raises an intriguing question. If you can use JIT compilers to compile and execute MSIL on any supported architecture, what's preventing Microsoft (or any other software vendor) from creating a CLR that runs on IBM or Sun Microsystems machines, for example? My company has many enterprise clients with huge investments in IBM and Sun hardware. These investments are costly because of their software licensing. But what if you could run Windows (or IIS), whose licensing model is dramatically less expensive, on those machines? The possibilities are mind-boggling!

Class libraries, the second .NET Framework component, provide standard functionality such as I/O, string manipulation, security management, network communications, thread management, and text management. Data classes let you use standard interfaces to manipulate Microsoft SQL Server and XML data. For example, you can use XML Web-service classes to develop distributed components that work across firewalls and Network Address Translation (NAT) software. Web Forms include classes that let you develop Web GUI applications and provide a common development interface across all the languages that the .NET Framework supports.

Microsoft's successful 2-year .NET Framework and Visual Studio .NET beta program was the largest in the company's history. But with so little time and so much to do, many companies didn't even consider .NET let alone install it in beta environments—until its ship date a few weeks ago. And let's face it: A large contingent of companies won't consider installing and leveraging the .NET Framework for months, possibly years. Many companies have decided that the software's deployment costs (even though the product is free), the costs of the learning curve (on both the development and the infrastructure sides of the house), and the fear of putting new software into production are too significant. However, some companies put the software into production in beta forms—within or outside Microsoft's Early Adopter Program (EAP). Companies such as the Home Shopping Network (HSN), Merrill Lynch, and Verizon Communications have stepped on stages across the country at various Microsoft events and boldly proclaimed their successes with .NET. And now that .NET Framework is shipping, many technologists aren't so reticent to install it and put it through its paces.

This week should be interesting. Microsoft's official Visual Studio .NET launch event is scheduled for February 13 in San Francisco, and Microsoft Chairman and Chief Software Architect Bill Gates will present the keynote address. Local Microsoft offices around the world are planning similar events on or around the February 13 date; some will show the keynote address in a live or taped format. I'll be attending the San Francisco event, so look for my report in the next installment.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like