20.01.2015 Views

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Defining e.<strong>net</strong> solutions<br />

2.6.1.2. Major Components of .NET<br />

At the core of The .NET Framework is a component called the Common Language<br />

Runtime (CLR). The CLR can be thought of as a separate operating system that runs<br />

within the context of another operating system (such as Windows XP or Windows 2000).<br />

This idea is not something new. We have seen this with the Java Virtual Machine, as well<br />

as the environments of many interpreted languages such as BASIC and LISP which have<br />

been around for decades. The purpose of a middleware platform like the CLR is simply<br />

that a common OS like Windows is often too close to the hardware of a machine to retain<br />

the flexibility or agility required by software targeted for business on the Inter<strong>net</strong>.<br />

Software running on the CLR (referred to as Managed Code) has the needed flexibility and<br />

is exceptionally agile.<br />

Unlike interpreted languages, managed code runs in the native machine language of the<br />

system on which it is launched. In short, this is how the .NET process works:<br />

1. Developers write their code in a .NET enabled language.<br />

2. The compiler generates binary executable software in a p-code format called Common<br />

Intermediate Language (or CIL for short).<br />

3. When the software is launched, the CLR re-compiles or JIT-compiles (Just In Time) the<br />

CIL into native code such as x86 machine language.<br />

4. Then the code is then executed at full speed.<br />

Another component of the .NET Framework is the massive library of reusable object-types<br />

called the Framework Class Library or FCL. The FCL contains hundreds of classes that<br />

perform tasks ranging from file reads and writes to advanced cryptography and web<br />

services.<br />

The CLR is intrinsically object-oriented; even its CIL (the p-code, which can be viewed as<br />

a virtual assembly language) has instructions to manipulate objects directly. The<br />

Framework Class Library reflects the platform's object-oriented nature. For most<br />

programmers, the FCL is the most extensive and extendable class library that they will<br />

have ever worked with.<br />

Finally, the .NET Framework contains a collection of tools and compilers that help to<br />

make programming productive and enjoyable. Up until now we have not mentioned much<br />

about C# (pronounced See-Sharp) or Visual Basic.NET (we'll be programming in these<br />

languages later). The reason is that the real core of .NET is the CLR. However, over<br />

twenty language compilers are currently being used in the .NET Framework, including the<br />

original five .NET languages from Microsoft: Visual Basic, C#, C++, JavaScript and CIL.<br />

The CLR and the .NET Framework have been designed in such a way that code written in<br />

one language can not only seamlessly be used with another language, but it can also be<br />

naturally extended by code written in another programming language. This means that<br />

2–11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!