What is the Microsoft.net Framework?

What is the Microsoft.net Framework?
Page content

What is Programming and What Problems are associated With it?

Programming is the science of writing executable code that guides the computer to perform certain tasks. That sounds easy enough, but in actuality it is one of the most difficult jobs that can be undertaken. Writing code involves setting up a series of instructions that tell the computer to do one thing and one thing only. It has to be understood by the computer, it must be fast, and it must be free of collateral operations or unintended consequences.

Take two very common tasks on a computer, printing and saving.

For printing one tells the computer,

  • print this
  • print this at this location
  • print it now
  • print one copy.

For saving you have a similar set of operations

  • Save this file
  • Save it to this location
  • Save it now
  • Allow me to retrieve it whenever I want
  • And I want to retrieve it in the same condition that I saved it in.

All of those tasks have to be programmed. But as the users expectations have changed over time, those expectations have led to more complex computer operations. Because of that there is always the problem of duplication of effort, that is code that was written once for one project and which can be used again is not used, so the code is re-written. Writing bloated code, that is code that should take only sixty lines for example may take 200 lines. Other problems are errors in the code and having to spend too much time on debugging or trying to fix the code.

How do you fix the problems?

One way to fix problems is to remove areas where coding issues like errors or duplication can be avoided. To that end, one of the most common programming tools are the libraries. These are specially coded programs that developers can use that take much of the duplication out of their hands. They also provide uniformity and consistency. Programmers that rely, for example on video or audio, can access the library, and not have to rewrite the code for accessing those features. This means that the code will work for any type of audio or video component that the programmer may need.

Another way of eliminating programming problems is by designing the code to not only be more flexible, but also to operate in a strict environment. One way to do this is to force the programmer to use only certain tools and use these tools only in restrictive ways. Some methodologies were created for just that purpose. One is object oriented programming. The other was modular programming.

In object oriented programming, the programmer has to create certain objects, but they can then be used again and again. Here the focus is on the data, not the function.

Another form of programming is modular programming. It focused on the function of a module, rather than the data. It also allowed for reusable units of programming logic and code.

Both of these approaches were concerned with quality. Each wanted to guarantee that the approach to programming would be as smooth and without problems.

Another problem involves code as it affects memory management. All programs have to access memory; they use it to store the results of CPU processes and to prepare data for processing. Memory has to be freed to allow other programs or applications to access it, but sometimes thay don’t do that.

A New Programming Environment

These competing methodologies offered similar solutions, but they worked too much in isolation. The cost of programming kept increasing as the programs got larger and more sophisticated. There had to be a method to unify the different elements into one working environment.

That is how the .net environment came to be. It is a programming environment designed to unify different programming methodologies into one area. The coding is simplified. Debugging tools are made available. Resources to help the programmer code faster and more efficiently are provided. Only certain set languages are used such as C# (C Sharp), VB (Visual Basic), and J# (Java Sharp).

The .Net Framework

The .NET Framework has two main components: the common language runtime (CLR) and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. It manages code at execution time, allowing the core services to work such as memory management, thread management, and remoting. It also enforces type control and code accuracy. Think of code management as the basic operational principle of the CLR

Many new programming features are constantly being developed such as XML Web Services and Web Forms To keep up with these innovations, there has to be a repository that allows these changes to be updated and stored for use as they are needed. That is the job of the class library. This is the other main component of the .NET Framework. It is essentially a collection of object-oriented reusable types where developers can develop a wide range collection of applications like command-line or GUI based applications to applications based on the latest innovations. The library is the storage locker for new programs and innovations.

The-Dot-NetFramework

Image Credit: Microsoft

Credit: https://mono-project.com/.NET_Framework_Architecture

Main Elements of the .NET Framework

Framework

The .NET Framework provides a variety of services including:

Software control:

  • Code management including loading and execution.
  • Support for developer services like profiling and debugging.
  • Interoperation between managed code, and unmanaged code and data.
  • Automation of object layout.
  • Access to metadata such as enhanced type information.
  • Exception handling including cross-language exceptions.

Hardware control:

  • Memory Application isolation

  • Managing memory for managed objects

  • Type safety verification

  • Code access security enforcement

.Net-Various Versions

Image Credit: https://www.codersource.net/basics_dot_net_framework.html

What are the Benefits of Using the .Net Framework Environment?

The Windows operating system has many features and technical elements. But it still leaves a vacuum when it comes to managing software components. This is mainly due to the fact that software elements change with every application; they access different resources, different hardware, use different amounts of the CPU and memory.

The .NET Framework provides features and functions that can be used by programs which run through Windows. It provides extra functionality that is not included in the basic operating system. So it provides a stable environment for developing and running applications. The hardware elements are controlled by the .Net Framework, and not by the programs or applications themselves.

In addition, .NET applications do have some advantages for the end user. The program code is isolated so as not to crash the computer or make it less stable. It is essentially a sandbox, a self-contained unit. Program installation is simpler causing fewer software conflicts or problems. The applications come with all of the supporting components, so there are fewer problems caused by missing components.