What Is .NET?

At first glance, .NET might seem to be just a marketing concept, a way of avoiding yet another number at the end of Visual Basic, but it is much more than that. .NET represents an entire platform on which you can develop applications. Just as the operating system provides a level of base functionality to applications (such as the capability to read files from a hard drive or floppy disk), .NET is a layer that exists beneath your programs and provides a set of base services and functions. The .NET environment can be broken into these three key elements:

  • The Common Language Runtime (CLR)

  • The Common Type System (CTS)

  • The Microsoft Windows .NET Framework (no real acronym for this one)

The Common Language Runtime is the underlying system that takes the code you have written in Visual Basic .NET (or any other .NET language) and executes it within a controlled environment. The Common Type System enforces a set of types across any .NET compatible language, which allows easy interoperability between programs written in different languages (such as C# and Visual Basic .NET). The Framework includes a set of class libraries available to any .NET compatible programming language. These class libraries provide all of the base functionality that you need to write your applications (including data access, file IO, network communication, and so on). Code that is created to be executed by the CLR is also known as managed code, because it executes within a controlled environment whereby security, memory usage, and other aspects of the code's behavior can be monitored and constrained.

.NET BRINGS LANGUAGE INDEPENDENCE

The fact that your Visual Basic .NET code is compiled into IL, as is J# or C# code, means that once you have compiled your program it is no different than the output from the equivalent program written in another .NET language. The language a program was written in ceases to be relevant once it is compiled, a fact that is very important when you are dealing with multiple groups of developers using different languages. Although I would certainly suggest as much standardization as is feasible in your organization, a compiled .NET component, regardless of the language it was written in, can be used from another .NET project.


The CLR itself does not deal directly with Visual Basic .NET code. Instead, your code is first compiled into an Intermediate Language (IL). That IL is compiled into native machine code by the CLR when it needs to execute your program. IL sounds a lot like Java's bytecode concept, and there are many similarities between .NET's concept of managed code and Java's Virtual Machine technology (generally referred to as the JVM). There is no doubt that those similarities exist, but there is also a key difference. .NET code is actually compiled down to machine level instructions (assembly code) and then executed within a controlled environment, whereas Java bytecode is an interpreted language whereby each programming instruction is evaluated and executed by the JVM. The process whereby the IL for your program is turned into machine code right when it needs to be executed is known as just-in-time compiling and is often referred to as JIT.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.105.193