Connectez-vous pour commenter

Fundamentals of .Net

  • Swetha Y
  • Sep 23, 2019
  • 0 commentaires
  • 1133 Vues


.NET is a software framework which is designed and developed by Microsoft. The first version of .Net framework was 1.0 which came in the year 2002. .NET is a virtual machine for compiling and executing programs written in different languages like C#, VB.Net etc.


It is used to develop Form-based applications, Web-based applications, and Web services. There is a variety of programming languages available on the .Net platform, VB.Net and C# being the most common ones. It is used to build applications for Windows, phone, web etc. It provides a lot of functionalities and also supports industry standards.


.NET Framework supports more than 60 programming languages of which 11 programming languages are designed and developed by Microsoft. The remaining are Non-Microsoft Languages supported by .NET Framework but not designed and developed by Microsoft.


What is a .Net Assembly?

The .NET assembly is the standard for components developed with the Microsoft.NET. Dot NET assemblies may or may not be executable, i.e., they might exist as the executable (.exe) file or dynamic link library (DLL) file. All the .NET assemblies contain the definition of types, versioning information for the type, meta-data, and manifest. The designers of .NET have worked a lot on the component (assembly) resolution.

 There are two kinds of assemblies in .NET;

1.   private

2.   shared

Private assemblies are simple and copied with each calling assemblies in the calling assemblies folder.Shared assemblies (also called strong named assemblies) are copied to a single location (usually the Global assembly cache). For all calling assemblies within the same application, the same copy of the shared assembly is used from its original location. Hence, shared assemblies are not copied in the private folders of each calling assembly. Each shared assembly has a four-part name including its face name, version, public key token and culture information. The public key token and version information makes it almost impossible for two different assemblies with the same name or for two similar assemblies with a different version to mix with each other.


An assembly can be a single file or it may consist of the multiple files. In the case of multi-file, there is one master module containing the manifest while other assemblies exist as non-manifest modules. A module in .NET is a subpart of a multi-file .NET assembly. Assembly is one of the most interesting and extremely useful areas of .NET architecture along with reflections and attributes, but unfortunately, very few people take interest in learning such theoretical looking topics.



What are the basic components of .NET platform?


Common Language Runtime (CLR)

The most important part of the .NET Framework is the .Net Common Language Runtime (CLR) also called .Net Runtime in short. It is a framework layer that resides above the Operating System and handles/manages the execution of the .NET applications. Our .Net programs don't directly communicate with the Operating System but through CLR.


MSIL (Microsoft Intermediate Language) Code

When we compile our .Net Program using any .Net compliant language like (C#, VB.NET, C++.NET) it does not get converted into the executable binary code but to an intermediate code, called MSIL or IL in short, understandable by CLR. MSIL is an OS and H/w independent code. When the program needs to be executed, this MSIL or intermediate code is converted to binary executable code, called native code. The presence of IL makes it possible the  Cross Language Relationship as all the .Net compliant languages produce the similar standard IL code.


Just In Time Compilers (JITers)

When our IL compiled code needs to be executed, CLR invokes JIT compilers which compile the IL code to native executable code (.exe or .dll) for the specific machine and OS. JITers in many ways is different from traditional compilers as they, as their name suggests, compile the IL to native code only when desired e.g., when a function is called, IL of function's body is converted to native code; just in time of need. So, the part of code that is not used by particular run is not converted to native code. If some IL code is converted to native code then the next time when it is needed to be used, the CLR uses the same copy without re-compiling. So, if a program runs for some time, then it won't have any just-in-time performance penalty.


Framework Class Library (FCL)

.NET Framework provides a huge set of Framework (or Base) Class Library (FCL) for common, usual tasks. FCL contains thousands of classes to provide access to Windows API and common functions like String Manipulation, Common Data Structures, IO, Streams, Threads, Security, Network Programming, Windows Programming, Web Programming, Data Access, etc. It is simply the largest standard library ever shipped with any development environment or programming language.


Common Language Specification (CLS)

Earlier we used the term '.NET Compliant Language' and stated that all the .NET compliant languages can make use of CLR and FCL. But what makes a language '.NET compliant language'? The answer is Common Language Specification (CLS). Microsoft has released a small set of specification that each language should meet to qualify as a .NET Compliant Language. As IL is a very rich language, it is not necessary for a language to implement all the IL functionality, rather it meets the small subset of it, CLS, to qualify as a .NET compliant language, which is the reason why so many languages (procedural and OO) are now running under .Net umbrella.


Common Type System (CTS)

.NET also defines a Common Type System (CTS). Like CLS, CTS is also a set of standards. CTS defines the basic data types that IL understands. Each .NET compliant language should map its data types to these standard data types. This makes it possible for the 2 languages to communicate with each other by passing/receiving parameters to/from each other. For example, CTS defines a type Int32, an integral data type of 32 bits (4 bytes) which is mapped by C# through int and VB.Net through its Integer data type.


Garbage Collector (GC)

CLR also contains Garbage Collector (GC) which runs in a low-priority thread and checks for un-referenced dynamically allocated memory space. If it finds some data that is no more referenced by any variable/reference, it re-claims it and returns the occupied memory back to the Operating System; so that it can be used by other programs as necessary. The presence of standard Garbage Collector frees the programmer from keeping track of dangling data.




Object-Oriented: Everything that you see in the .NET framework is an object. It is the same for what you write within the framework. This means that you get a powerful tool to not just access but also control your apps. This also makes it simpler for you to respond to recurring events.

Caching: The caching system that .NET includes is extremely robust and easy-to-use.

Easy Maintenance: Pages, with .NET, are extremely simple to write and maintain. This is because the source code and HTML are both together. In addition to that, the source code executes on the server. What does this mean? This makes your web pages more powerful and flexible.


Time-Saving: Time is money, and .NET helps you save a lot of that. The way it is developed .NET removes a large part of the coding requirement. This means that the developers save time, and the app’s time-to-market can be shortened considerably.


Simplicity: Performing common tasks with .NET are extremely simple and straight forward. Submission of forms is a breeze and so is site configuration, deployment, and client authentication.


Feature-Rich: There is a range of features that can be explored by the developers in order to create powerful apps. Consider the case of its rich toolbox as also the designer in the visual studio. They let you access such features as automatic deployment, WYSIWYG editing, and drag-and-drop controls.


Consistency: The management and monitoring of all the processes are performed by the framework. If one of the processes is dead, a new process can be created just as easily. This lets your app be consistently available for handling requests.


Monitoring: Finally, .NET also stands for automatic monitoring. It will promptly notify any problems like infinite loops, memory leaks, etc. Not just this, it will also destroy these activities automatically and restart itself.

In conclusion, there are tons of advantages that .NET offers. These features make it popular among clients as well as programmers.


Limited Object-Relational (OR) support

It is found to be limited at times because such support is generally available with entity framework only.

Slower than Native Code

Managed code that you run with .NET can be slower than native code.

Vendor lock-in

The framework involves Vendor lock-in. This can mean that future development will be only dependent on Microsoft.


In some cases, migration of apps to .NET can turn out to be expensive. However, these are all just minor draw-backs when compared to the large range of advantages offered by the framework.


·     It significantly decreases the quantity of code necessary in large web applications which are developed in .NET framework.

·       Web applications developed in ASP.NET are secure as Windows confirmation and configuration can be attained for every application.

·       This development provides WYSIWYG (What You See Is What You Get).

·        It provides server controls and blueprints with the capability of drag and drop and involuntary operation.

HTML code and source code are separated so changes can be done easily in ASP.NET framework.



Since its original release in 2002, the .NET Framework has become the foundation for a majority of new Windows applications. Judging from the evidence so far, it has surely been a success for Microsoft and for its customers. While the move to the .NET environment forces developers to climb a long learning curve, the benefits appear to be worth the effort. For the people who use it, this technology qualifies as one more step toward the ultimate goal: producing the best possible software in the least amount of time.

The Internet is a ubiquitous network to which scores of people have access. Until now, there has not really been a way to use the Internet as a software platform. However, the technology is now in place to make that happen, and ASP.NET makes it that much easier to manage Web programming. ASP.NET keeps all the good features of classic ASP (in process performance, a well-established syntax, the ability to add executable blocks to your Web page) and improves on them (e.g., by providing a more granular HTTP request handling model, providing a compilation model for Web pages, and organizing the parts of a Web page into classes and making those classes available through the CLR type system). ASP.NET will undoubtedly be the tool of choice for most Web developers for the next five to ten years.



Bharani G R






Connectez-vous pour commenter

( 0 ) commentaires