What Is .NET?Since Microsoft first announced and released .NET, people have been trying to figure out what exactly this new 'thing' is. According to the marketing that Microsoft was pushing, it would revolutionize computing as we know it. That's an awfully big promise to keep, and it's still too early to tell if it really will accomplish its goals. However, it is well on its way to doing so. When people talk about .NET, you can never be sure which "component" of .NET they're talking about. No other "product" or "idea" released by Microsoft has taken on so many different forms. There are products, services, and even concepts that are tagged with the .NET moniker, so it's hard to figure out what exactly .NET is.
When .NET is discussed in this book, it will be in reference to the new development languages and runtime available with the .NET Framework SDK (which is included on the
Figure 1.1. The Global Assembly Cache.
One of the most common misconceptions people have about running .NET code is that the code being executed is "interpreted," much like Java byte code or the old visual basic
This IL will be compiled into native code at one of two points. At the installation time of the code, a process called
ngen
(short for
native generation
) can be performed. This compiles the IL directly into native code, and stores the compiled native code in a special place in the GACthe native assembly cache. Assuming the code wasn't compiled at installation time, it must be compiled before the first execution. During startup of the application, a special feature of the .NET Runtime called the JIT (Just In Time) compiler
You can imagine that in the latter case, the startup time of your application could be negatively affected because of this compilation happening behind the scenes. If startup time is important to your application (which it should be if you're writing
|
What Is Managed Code?
Managed code
will be mentioned quite often during the course of this book. The API that will be used throughout the book is called Managed DirectX, and it's not uncommon at all to hear the .NET languages called the
managed languages
. The
managed
In the "old days" (you remember, just a few
The C and C++ languages have a reputation of being "hard"
With the release of the first version of the .NET Runtime, much of this changed. Microsoft went back to the drawing board, designed an entirely new API, and tried to make sure developers' concerns were addressed. This new Runtime had to be easy to use, it had to be fast, and it had to eliminate the headaches of memory management. Throughout this book, you will see how well they actually achieved these goals. |