Features of .NET
While reading the introduction chapter of the book, I found some features of .NET that I would like to mention here.
Interoperability with existing code:
The .NET code can interop with the existing COM libraries, so there is no need to rewrite the existing code. Only the new code needs to be written in .NET. Also the existing COM components can call a .NET component through CCW (COM Callable Wrapper)
Language Independence:
The .NET code is language independent. This is possible because the code is compiled into MSIL, not the native language. There is a separate source code to MSIL compiler for each .NET language. The CLR (Common Language Runtime) compiles the MSIL code to native code while executing the application. (This looks like java bytecode and JVM) The benefit over java is that other classes can inherit from code in MSIL (not in bytecode).
Common Type System (CTS):
All the .NET languages share the same data type. Like int in C# is the same as Integer in VB.NET and string in C# is the same as String in VB.NET. This requires no conversion of data from one type to another while communicating between two applications written in different .NET languages. int/Integer is System.Int32 and string/String is System.String
Object oriented base classes:
The FxCL (Framework Class Library) provided with .NET is object oriented. It hides the complexities of OS API behind those objects and their methods.
End to DLL Hell! :
With .NET the deployment is very easy. There are many ways of deploying applications developed in .NET. .NET applications do not need to make entries in the Windows registry and also allows multiple .DLLs of the same name, co-exist on the same instance of the OS. This is because of the structure of GAC that the shared assemblies of different versions can also co-exist (I will discuss the structure of GAC later on).