Microsoft .NET is one of the latest and new technologies introduced by Microsoft Corporation. Nowadays, we use to connect to the internet using a computer and a remote computer responses via a web page and a collection of web pages are called as Web Sites.
The concept in .NET is that these websites can integrate with other sites and services using standard protocols like HTTP.
Microsoft .NET Platform comprises of four core components such as
(1) .NET building block services such as file storage, calendar called Passport. NET
(2) .NET device software which will run on latest Internet devices like mobile phones
(3) .NET user experience such as integrating this technology to user created documents (integrates with XML). For example, if you code XML via a .NET Language, it will automatically create XML document
(4) .NET infrastructure which includes .NET Framework (Common Language Runtime and .NET Framework class libraries)
(5) Microsoft Visual Studio .NET such as Visual Basic .NET ,Visual C++ .NET etc, .NET Enterprise Servers and
Microsoft Windows .NET
We can build robust, scalable, distributed applications with the help of .NET and the part that helps us to develop these applications is called the .NET Framework. The .NET Framework contains Common Language Runtime (CLR) and the .NET Framework class libraries also called as Base Class Libraries.
All the .NET languages (like C-sharp, VisualBasic.NET, Visual C++. NET etc) have the .NET Framework class libraries built into them. The .NET class Libraries also supports File I/O, database operations, XML (Extensible Markup Language) and SOAP (Simple Object Access Protocol). For example you can develop XML Pages by using C-sharp language.
When someone talks about .NET development, then you should understand that they are talking about .NET Framework. It includes a Runtime environment and a set of Class Libraries which is being used by a new language called C-sharp abbreviated as C# (more or less similar to C/C++/Java family of languages) and all other .NET Languages. Simply speaking C-sharp is a new language for developing custom solutions for Microsoft’s .NET Platform.
The runtime which we discussed just now is also used by Visual Studio .NET. Visual Studio .NET Provides us with a visual environment to design and develop .NET Applications. Every language in Visual Studio .NET uses this runtime to execute its applications. Moreover these languages compiles its source code into an Intermediate language upon compilation. Hence you can very well use a module written using C-sharp in a Visual Basic Application. For example you can design a user interface with Visual Basic .NET and write a DLL function using C-sharp.
.NET Framework Process
Terms Associated with .NET
Common Language Runtime
Common Language Runtime also called CLR Provides a universal execution engine for developers code. It generates SOAP when it makes remote procedure calls. CLR is independent and is provided as part of the .NET Framework.
The main features of CLR are as follows
(1) Managed Code
(2) Automatic application installation
(3) Memory Management
(4) Automatic Garbage Collection
(5) Very high level of Security while executing
.NET Framework Class Libraries
These class libraries works with any language under the common language runtime environment. It includes Visual Studio.NET, C-Sharp. Therefore if you are familiar with one .NET language then you can easily migrate to other .NET Languages. The figure given below shows the .NET Framework hierarchy
(1) All namespaces should have to be called in your Program by applying the keyword ‘using’. For example, if your programs needs to call System namespace, then it should be applied in the program as
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">using System
(2) Classes cannot be called along with the using directive.
(3) The using directive applies only to namespaces, just like importing packages in Java. Hence, the following code will result in compilation error.
However, you can create an alias like the following
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">using mysys = System.Console;
Then you have to apply the alias in your program as follows:
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">mysys.writeLine("Hello C#");
Common Language Specification (CLS)
It is a set of rules that a language compiler must adhere to in order to create .NET Applications that run in the CLR. If you are going to create a compiler for .NET, you have to adhere to the rules enumerated in the common language specification and this enables us to create a club of CLS Compliant languages.
Each member of this club enjoys two benefits
(a) Complete access to .NET Framework functionality
(b) High level of interoperability with other compliant languages
For example, a Visual Basic class can inherit from a C# Class
You should note that the syntaxes and other programming structures differ from each of these languages. The only difference is that a developer well versed with a language such as C-sharp can easily program in Visual Basic .NET or Visual C++ .NET without investing a lot or spending too long to learn a new language.