Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
At the heart of the .NET Framework and the whole .NET initiative is the common language runtime. Now this functionality manages almost everything that we know as .NET. It manages the memory in a .NET environment; it does this through managing object references and the destruction of those references, it automatically handles it for us. It handles thread execution in our applications, it handles the actual code execution and we'll talk about exactly what's going on with that a little bit later. It takes care of code safety. Because our applications now are divided up into security areas based on application domains. The objects themselves are no longer inherently separated from one another. And so the common language runtime has to make sure that the code runs only what it's supposed to run. Compilation, the common language runtime takes care of compiling our code and getting it ready to run and then a vast array of other system services. Let's look at some of the features of the common language runtime, and I know this is all just kind of information, but just kind of push it into your head for now. And it will all start to make sense a little bit later on. First of all, there is a class loader, and this handles loading our classes into memory and prepares it for execution or for the instantiation of objects and so forth. There is an MSIL to Native compiler and we'll talk about that in the next video. But this converts what's called MSIL, or intermediate language, Microsoft intermediate language to native code. We'll talk about what's happening there a little bit later. The code manager itself manages the actual execution of the code and how it is sent to the processor and handled. Garbage collection, this is a huge one, this is automatic life time management of objects. So when we instantiate objects we don't have to explicitly destroy those objects when we are through with them. The garbage collector will look at these and we had no longer have references pointing to those objects will automatically clear them out for us. Now there are certain issues that we have to deal with and we'll talk about those in a later video. There is a security engine in the common language runtime and this is really neat. It provides security based on the origin of the code or the user executing the code, and it can also execute security based on roles that the user is in. And we'll discuss that a little later. The debug engine - we got enhanced debugging in .NET and this is where the common language runtime comes into play there. It provides the debugging and tracing capabilities that we need. There is a type checker and this works to prevent us from having these surprise errors when we are trying to convert data from one data type to another, and sometimes this is not even intentional it just kind of happens when our code gets a little sloppy. But this disallows unsafe casts or uninitialized variables. And we know about that with the option explicit setting in VB6, we can't use a variable until we have first instantiated a variable or set up a variable. But this goes one step further and says you can't convert variable type say from integer to string or from a large integer down to a smaller one. If it looks unsafe, it's going to give you an error and it won't even let you get up to compile time. It will give you an error at design and compile time. And that's neat. And exception manager provides structured exception handling; we'll talk about that quite a bit a little later on. Thread support is handled by the common language runtime; it provides the classes and interfaces you need for multi-threaded programming. You don't have to understand all this stuff, you just have to know which classes and methods to use. And a lot of the complexity of this is abstracted away from you the developer and of course the user. One of the last pieces of the common language runtime is the com-marshaler. Now com is virtually gone in .NET, we don't use this component object model any more. But the real world is that there is a lot of com objects out there that we are going to continue to have to integrate with and associate with, we have to have a method to move our data from the .NET environment over into com environment and vice versa. There is a com-marshaler built in. We won't get into this particular aspect in this course, but again go out to the SDK and read and you can see some of that stuff. Now that's all what the common language runtime does. In the next video, even though it's about Microsoft intermediate language, you'll kind of see how the common language runtime fits into the overall picture of .NET with one of the graphics that we show there. So let's go to that video next, the MSIL video. Kind of start to put some of the pieces together.
| Course: | Microsoft Visual Basic .NET |
| Author: | Mark Long |
| SKU: | 33433 |
| ISBN: | 1932072349 |
| Release Date: | 2003-05-27 |
| Duration: | 6 hrs / 87 lessons |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |