A Guide On The .NET Architecture

1. Introduction

Microsoft’s .NET is a software development framework that is specially built for developers. The initial edition of the .NET framework 1.0, was released in 2002. .NET framework Architecture creates a great space for constructing and running codes written in various programming languages. To build .NET applications you need to have a .NET framework installed on Windows.

It is used to construct Form-based Web service programs. The .NET framework consists of several programming languages are accessible, with VB.NET and C# seem to be the most popular .NET programming languages. They are used by the .NET development companies to create programs for Windows and mobile devices. The .NET framework comes with many different features that can help developers meet industry requirements for their clients. In this blog, we will have a look at .NET architecture and its features along with its benefits.

2. What is .NET Framework?

.NET Framework is used by software development companies as it enables them to create and run applications on Windows. This Microsoft product comes with various developer tools, programming languages, and libraries that enable development for both desktop and web apps.

The features of this framework enables development of both Form-based and Web-based apps while supporting languages like Visual Basic, C#, and F#. Also supports many development tools like Visual Studio Integrated Development environment (IDE).

3. .Net Framework Architecture

.NET framework offers controlled performance setting, production, and implementation along with a programming model architecture. Here we will learn more about the fundamental components of .NET framework architecture.

  1. CLS- Common Language Specification
  2. CTS- Common Type Specification
  3. FCL- .NET Framework Class Library
  4. CLR- Common Language Runtime
  5. CLI- Common Language Infrastructure

Let’s discuss all key components in brief!

3.1 CLS- Common Language Specification

CLS- Common Language Specification

CLS or Common Language Specification, is a collection of methods that define a .NET language. CLS is the abbreviation for applications built utilizing multiple programming languages, such as C# and VB.NET.

Code Manager

Class loader is invoked by the code management for execution. .NET offers two types of programming:

  1. Managed Code
  2. Unmanaged Code

Managed Code

Within your software’s domain, the resource is considered as managed code and is the fastest. The code produced using the .NET framework is referred to as managed code. This code is performed directly by CLR using managed code execution. Program developed in any language supported by the.NET Framework is managed code.

Managed code utilizes the Common Language Runtime (CLR), which manages resources, handles privacy, permits cross-language debugging, etc. for your applications.

Unmanaged Code

The code produced outside of the.NET Framework is referred to as unmanaged code. Unmanaged programs are those that don’t operate under the supervision of the Common Language Runtime (CLR). Particular languages, like C++, can be leveraged to create unmanaged apps that, for instance, utilize low-level operating system services. Unmanaged code includes compliance with the VB, ASP, and COM source code.

  • Unmanaged code may consist of both source code and compilation code.
  • Execution of unmanaged code is facilitated via wrapper classes.
  • 2 categories of wrapper classes exist CCW (COM callable wrapper) and RCW (Runtime Callable Wrapper).
  • The wrapper is used to conceal the differences between CCW and RCW.

3.2 Common Type Specification (CTS)

Common Type Specification (CTS)

CLS or Common Language Specification, is a collection of methods that define a .NET language. CLS is the abbreviation for applications built utilizing multiple  programming languages, such as C# and VB.NET.

//C#integer
int nVar=0;
' VB..NET
dim nVar as integer=0

Ideally, one should utilize the syntax of the programming language and not the object type, allowing .NET the freedom to pick the most suitable type and size for the operating system.

The common type specification is likely to be a pyramid with System. Object on the top.

There are different values and reference types for .NET types that are separated. Value types taken from System.ValueType are the most primary ones while reference types are derived directly or indirectly.

Value types are objects with a brief lifetime that are created on the heap. In essence, reference types are pointers that are created on the controlled heap. The Garbage Collector governs the lifespan of reference types. Value types can be transformed to reference types and likewise using the boxing and unpacking operations, correspondingly. When a programmer has to modify an object’s memory, boxing is useful.

CTS’s services extend much beyond the specifications of standard data types. CTS facilitates type safety, improves language compatibility, facilitates the separation of application fields, and more. Throughout just-in-time compilation, type inspection guarantees that MSIL properly reads memory and verifies that no action is made to retrieve a memory that was not previously described in metadata. If that’s so, the program is classified as malicious software. CTS offers a shared type base for the .NET language, hence improving language interoperability.

Finally, .NET adds app domains, which are compact operations. App domains are subprocesses. Standard Win32 programs are less flexible and more costly than app domains. .NET must monitor application domains to ensure that they are respectful neighbors. Code validation, type safety, and CTS all contribute to the safety of application domains.

3.3 FCL- .Net Framework Class Library

FCL- .Net Framework Class Library

The framework class library (FCL) comprises all class modules, services, and techniques that may be integrated with CLR. They are viable and also referred to as “Assemblies.” It is comparable to the header files in C or C++ and Java modules. The FCL includes many types of characters, calendars, and integers, among others. In addition, the class library includes APIs for accessing and editing files, database interfaces, and graphics user interface.

There is, for example, a class library with several ways of managing all filesystems. It indicates that there is a method to read data from a folder. Similarly, there is a mechanism for writing text to a drive.

Typically, .NET applications are created in the C# or Visual basic programming languages. In addition, the code is merged into the language-neutral Common Intermediate Language.

3.4 CLR- Common Language Runtime

CLR- Common Language Runtime

.NET Common Language Runtime is the primary main virtual machine (VM) component of the .NET framework. It offers the runtime environment for applications within the .NET framework. Thus, it facilitates the development process for its consumers. Also, it provides a handful of other offerings such as internet support, type-safety, waste control, endurance, etc. It is accountable for controlling the execution of .NET code regardless of the .NET programming language used.

3.5 CLI- Common Language Infrastructure

CLI- Common Language Infrastructure

CLI or Microsoft intermediate language is a language-independent framework for the creation and execution of applications. It also offers functions for managing exceptions, garbage collection, privacy, etc.

The CLI possesses the following important attributes:

Handling Anomaly – Anomalies are faults or problems that occur during software operation.

The following are examples of oddities or exceptions:

  • In the event that a program attempts to open a file that does not exist on the local system.
  • In the event that the program attempts to get data from records, but the database access becomes incorrect.

Garbage Collection – It is the activity of removing unneeded materials.

Examples of garbage collecting include the following:

  • A file handle that is now obsolete. If all actions on a file have been finished by the program, the file handle could no longer be relevant.
  • Here, developers no longer use database connection. If all data activities have been finished by software, the database connection could be useless.

Using a variety of languages:

Language – The first level contains the programming language, with VB.NET and C# being the most prevalent.

Compiler – The compiler present here may be distinct for each programming language. Therefore, the VB.NET programming language will have its own compiler. It is probable that C# programmers will have accessibility to a second compiler.

The CLI is the final layer of the internet foundation. This would be advantageous for running any computing language-based .NET app. Therefore, the subsequent compiler will transmit the code to the CLI layer in order to execute the .NET application.

4. .Net Framework Design Principle

The .Net Framework is useful for developing web-based applications due to the following design concepts.

.Net Framework Design Principle

1. Interoperability – Net Framework has an extensive reverse ability. Imagine your own software created utilizing an older release of the. Net Framework, perhaps 2.0. And if you attempt to run the same program on a system with more advanced knowledge, it will fail, for example, 3.5. The application is operational. Microsoft guarantees that previous framework versions are more compatible with each new edition.

2. Portability – Applications developed on .Net Framework are compatible with all Windows platforms. Microsoft is also exploring collaborating with other operating systems.

3. Security – The .Net Framework possesses an appropriate security solution. A built-in security mechanism facilitates application validation and verification. Each program is able to clearly specify its security system and grant net architecture access permissions to codes or programs in execution.

4. Memory Management – The CLR performs all tasks and controls memory. The .Net Framework includes the ability to inspect resources that are not utilized by running programs. Then, you will generate the corresponding resources. This is performed by the “Garbage Collector” program, which is a component of the .Net Framework. Additionally, it operates at periodic intervals and remains to evaluate unused system resources and release them accordingly.

5. Simplified Deployment – .Net Framework additionally contains tools for packaging applications developed on .Net Framework. The client’s system can then receive packages and then these packages install the software immediately.

5. Features of .Net

Here we will have a look at some of the top features of .NET that grab developers’ attention – 

5.1 Cross-Platform Interoperability

One of the main features of the .NET framework is language interoperability due to which many developers tend to use this cross-platform framework for software development. It has the ability to code and interact with another code written using a different programming language. It allows software development to maximize code reusability and enhance the overall efficiency of the development process.

5.2 Security

The Common Language Runtime manages system security through user and code identity coupled with permission checks. We know that managed components are awarded varying degrees of trust based on multiple factors. This type of security is one of the major features of the .NET framework as it provides support for role-based security, code access security, and encryption.

5.3 Portable

The applications that are developed using the capabilities of .NET are portable. When the application’s source code written in a CLR-compliant language compiles and generates a machine-independent code.

5.4 Simplified Development

With installing or uninstalling the .NET framework, a window-based application is a matter of duplicating or removing files. This can only be done because .NET components are not referenced in the registry.

6. Advantages of .Net

Below are some of the advantages of .NET that make it popular –

6.1 Improved Performance

One of the main reasons why the .Net framework is gaining huge popularity is its performance. Using .Net frameworks and tools offers excellent performance to its developers. The .Net development team is working on enhancing its existing features and functionalities. The latest .Net framework release and updates provide a great user experience with better reliability and performance.

6.2 High Quality

.Net has greater code access than ever before as it allows software developers to develop higher-quality applications with fewer mistakes and better speed. This framework is based on open-source technology so you can access more libraries and focus on what makes your product distinctive rather than recreating the wheel.

6.3 Multi-Language Support

We all know that the .NET framework is gaining immense popularity since its inception as it provides ease of programming and execution to users. Software developed using the capabilities of the .NET framework allows you to craft remarkable applications using various languages such as C#, F#, and Visual Basic. With the use of this approach, developers can write applications for database management tools and gaming software.

7. Conclusion

Microsoft has created the Net programming language. It was intended to enable the creation of Windows-compatible applications. Net may be utilized to develop Forms-based apps, Custom web applications, and Online services. On the Microsoft .Net foundation platform, a range of programming languages is accessible to developers. The two most prevalent are VB.Net and C#.

Along with the framework, in this article, we specifically focused on the .NET architecture. If you have any doubt, please drop your query in the comment box.

profile-image
Itesh Sharma

Itesh Sharma is core member of Sales Department at TatvaSoft. He has got more than 6 years of experience in handling the task related to Customer Management and Project Management. Apart from his profession he also has keen interest in sharing the insight on different methodologies of software development.

Comments

  • Leave a message...