Components of Microsoft .NET

Let's talk about .NET Framework more and discuss the key components of this amazing framework. Microsoft .NET has the following four key components:

  1. Common Language Specification
  2. Framework Class Libraries
  3. Common Language Runtime - CLR
  4. .NET Tools

Common Language Specification-  Uptil now, It must be clear to all my viewers that a software developed in .NET Framework may contain many components developed in different languages. A question which must arise in your mind is "How these objects communicate with each other". The dev folks of .NET found it better to have a common type system (CTS), which is a set of types common to all languages of .NET framework. In order to communicate with others, the objects expose the features that are common to all languages of .NET framework. This point explains the concept of Common Language Specification,  which is a basic feature of all the applications and services made for the .NET framework.  

Framework Class Library-  We have already seen while writing software/programs that we need file input-output (IO), database handling, exception handling, cryptography, multithreading and so on in C#, which requires the use of System.IO, System.Text, System.Collections, System.Threading and so on. Here, System is a namspace consisting of many classes. This set of reusable classes is contained in what is called as framework class library (FCL).  It contains more than 7000 classes, interfaces, and value types, These class libraries are extremely helpful in IO, gathering information about types, security checks, exception handling, and so on. These classes can be used directly or derived as per the needs of the application.

You must also know that .NET framework types use a dot syntax naming scheme. This technique clusters related types into namespaces, which makes it easy to find the required class. For example, System.Collections.Generic.List represents a list type that belongs to System.Collections namespace. This naming scheme makes it easy for developers to use the in-built capabilities of .NET framework by consuming the framework class libraries.

Common Language Runtime-  Common language runtime (CLR) converts common language infrastructure (CLI) into machine-specific code. CLR is defined by CLI and is used by .NET Framework. It is a stack-based, object oriented assembly language. CLR was originally called MSIL, the renaming has been done post standardization of CLI and C#.

Some of the function performed by CLR consists of:

  • Object management
  • Code and Access Security management
  • Exception Handling
  • Type Checking
  • Debugging

.NET Tools- Often we face some tasks, which don't ask to write code from scratch rather we can use some tools to accomplish these tasks quickly and without investing any time in building things from scratch. There are various tools available for a .NET developer to write unit test, documentation, code generation etc.

Here's a list of Scott Hanselman's favourite tools! It should also be noted that its not a good practice to develop whole projects using tools alone, as it may lead to unlearning of the programming concepts.

So, until next time that's all from my side! Feel free to reach out to me @Nowayhecodes

You can read more on .NET fromm my earlier posts: Concepts of Software Framework and Basics of .NET Framework.