HND Computing & Systems Development

HND Computing & Systems Development

Unit: 42 Programming in .Net

Title: Theory and Evaluation of .Net





Tables of contents

1.0 Introduction

1.1 Principles, Characteristics and Features of Programming using the .NET Framework

1.2 Different types of .NET Framework Architecture

1.3 Evaluation of the Components that support the .NET Framework

1.4 Common Language Runtime

1.5 Framework Class Library

2.0 Conclusion

3.0 Bibliography

1.0 Introduction

.NET Framework is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It is a programming infrastructure created for building, deploying and running applications and services that use the .NET technologies such as desktop applications and web services.

The .NET Framework dates back to late 1990s when Microsoft started its development under the name of New Generation Windows Services (NGWS). In late 2000, the first versions of .NET 1.0 Framework were released. From the release of the first version to date, the development of the software framework has constantly been in progress with newer versions being released at every stage. The latest version is .NET 4.5 which was released on 15th August 2012. .NET 4.5 uses Visual Studio 2012 development tool and runs on Windows 8 and Windows Server 2012.

1.1 Principles, Characteristics and Features of Programming using the .NET Framework

Programs written in .NET Framework execute in a software environment as contrasted to hardware environment. The .NET Framework is a runtime execution environment that manages applications that target the .NET Framework. It consists of features which provides memory management and other system services, and which enables programmers to take advantage of robust, reliable code for all major areas of application development.

The .NET Framework is designed to fulfill a number of objectives which include: to provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely; to provide a code-execution environment that minimizes software deployment and versioning conflicts; to provide a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party; to provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments; to make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications; and to build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code.

To go a little deep into the understanding of the .NET Framework, it has two main components which are the Common Language Runtime (CLR) and the Framework Class Library (FCL). The Common Language Runtime is the foundation of the .NET Framework. It is an agent that manages code at execution time, providing core services such as memory management, thread management and remoting, while also enforcing strict type safety and other forms of code accuracy that promote security and robustness. The Framework Class Library is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services.

Microsoft Visual Studio is the development tool used for the .NET Framework. Visual Studio supports all the .NET Platform programming languages which include Visual Basic .NET, Visual C#, Visual C++, Managed Extensions for C++, Transact SQL, VBScript, Microsoft Jscript.NET, XML, Visual J++, F#, and other languages such as Python and Ruby among others.

When programming in Visual Studio, a number of .NET Framework tools make it easier for you to create, deploy, and manage applications and components that target the framework. These tools are automatically installed when you install Visual Studio. These include:

Build, deploy and configuration tool – these tools make it easier for you to build and deploy your .NET Framework applications. You can use these tools to generate portable executable (PE) and Microsoft intermediate language (MSIL) files, view and manipulate the global assembly cache, manage application and deployment manifests, and handle isolated stores and resource files. These include: Installer tools, Global Assembly cache tools, CorFlags Conversion tools, among others.

Debugging tools – these tools provide diagnostic services for .NET Framework applications and extensions for managed debugging. These include: Assembly binding log viewer, .NET Framework command-line debugger and SOS debugging extension.

Security tools – these are command-line tools that help you perform security-related tasks, such as configuring security policy, managing certificates, and digitally signing files. They enable you to test your components and applications before you deploy them. These include: Code access security policy tool, software publisher certificate test tool, Certificate manager tool among others.

Interop tools – these tools provided in this section simplify and reduce the amount of code required to perform interop tasks such as enabling COM clients to use .NET Framework classes that are dependent on the common language runtime. Among other things, these tools convert and generate type libraries and produce and register classes and assemblies. They enable developers to use existing design and programming methodologies, whether types are dependent on the common language runtime or on COM. These tools include: Windows forms ActiveX control importer, Management strongly typed class generator, Assembly registration tools among others.

Other miscellaneous development tools include code generation, accessibility testing, and type reflection utilities for .NET Framework applications, such as the Code generation tool and the Windows forms class viewer.

The power of the .NET Framework can also be reflected by looking at its features. The key features of the .NET Framework, which are briefly discussed below, make the framework to stand out and become the chosen development platform by many developers. These features include:

Cross language interoperability – this is the ability of code to interact with code that is written by using a different programming language. Language interoperability can help maximize code reuse and improve the efficiency of the development process.

Common Language Runtime (CLR) – this is a run-time environment called the common language runtime, which runs the code and provides services that make the development process easier.  All .NET programs execute under the supervision of the CLR, guaranteeing certain properties and behaviors in the areas of memory management, security, and exception handling.

Language independence – the .NET Framework introduces a Common Type System, or CTS. The CTS specification defines all possible data types and programming constructs supported by the CLR and how they may or may not interact with each other conforming to the Common Language Infrastructure (CLI) specification. Because of this feature, the .NET Framework supports the exchange of types and object instances between libraries and applications written using any conforming .NET language.

Base Class Library (BCL) – this is part of the Framework Class Library (FCL). BCL is a library of functionality available to all languages using the .NET Framework. It provides classes that encapsulate a number of common functions, including file reading and writing, graphic rendering, database interaction, XML document manipulation, and so on. It consists of classes, interfaces of reusable types that integrate with CLR.

Simplified deployment – the .NET Framework includes design features and tools which help manage the installation of computer software to ensure it does not interfere with previously installed software, and it conforms to security requirements.

Security – .NET Framework offers code access security and role-based security to help address security concerns about mobile code and to provide support that enables components to determine what users are authorized to do. These security mechanisms use a simple, consistent model so that developers familiar with code access security can easily use role-based security, and vice versa. Both code access security and role-based security are implemented using a common infrastructure supplied by the common language runtime.

Portability – Microsoft has engineered the .NET Framework to be platform-agnostic, and cross-platform implementations are available for other operating systems. Microsoft submitted the specifications for the Common Language Infrastructure, which includes the core class libraries, Common Type System, and the Common Intermediate Language, the C# language, and the C++ language to both ECMA and the ISO, making them available as official standards. This makes it possible for third parties to create compatible implementations of the framework and its languages on other platforms.

When programming on a .NET platform, program code can be classified into two categories. This are managed code and unmanaged code.

The code, which is developed in .NET framework, is known as managed code. This code is directly executed by CLR with help of managed code execution. That is, any language that is written in .NET Framework is managed code. Managed code uses CLR which in turns looks after your applications by managing memory, handling security, allowing cross – language debugging, and so on.

On the other hand, code which is developed outside .NET Framework is known as unmanaged code. Applications that do not run under the control of the CLR are said to be unmanaged, and certain languages such as C++ can be used to write such applications, which, for example, access low – level functions of the operating system. Background compatibility with code of VB, ASP and COM are examples of unmanaged code.

1.2 Different types of .NET Framework Architecture

The .NET Framework architecture can be described in different ways depending on the concept to be achieved. From the general point of view of the framework, a layered concept can be employed to describe the different architecture of the .NET Framework and also show how they relate to, and depend on, each other.

A simple to understand 6 layers concept can be used to illustrate and compare the different .NET Framework architectures. In this architecture, the .NET platform programming languages are at the top and the Common Language Runtime at the bottom. In between are layers that connect the two.

The top layer: Programming languages – these are all the programming languages that are supported by the .NET Framework including VB.NET, C#, Managed C++, J#, F#, Jscript, etc.

The second layer: User and program interface – this layer consists of application programs that are used to develop .NET applications on the Visual Studio Integrated Development Environment (IDE). These include ASP.NET Web Form, ASP.NET MVC, ASP.NET AJAX, Windows Forms, WPF and Silverlight.

The third layer: WCF and WWF – this layer consist of Windows Communication Foundation (WCF) and Windows Workflow Foundation (WWF). WCF is a tools often used to implement and deploy Service Oriented Architecture (SOA). WWF, on the other hand, is a Microsoft technology that provides an API, in-process workflow engine, and a rehostable designer to implement long-running processes as workflows within .NET applications. This layer is known as the Communication and Workflow tier.

Fourth layer: Data Tier – this layer contains database access capabilities, ADO.NET, LINQ, LINQ-to-SQL and entity framework, and a strong support for XML.

Fifth layer: Base Class Library (BCL) – this layer contains BCL which is a Common Language Infrastructure (CLI) standard library available to all CLI languages. CLI includes the BCL in order to encapsulate a large number of common functions, such as file reading and writing, graphic rendering, database interaction, and XML document manipulation, which makes the programmer’s job easier.

Sixth layer: Common Language Runtime (CLR) – the last layer in the .NET Framework architecture is the CLR which is responsible for managing the execution of .NET programs and in addition providing services including memory management, type safety and exception handling.

This can be further illustrated using the diagram below:

Programming languages

User and program interface

WCF and WWF (Communication and Workflow Tier)

WCF and WWF (Communication and Workflow Tier)

ADO.NET, LINQ, XML… (Data Tier)

Base Class Library (BCL)

Common Language Runtime (CLR)

Figure 1: .NET Framework Architecture

1.3 Evaluation of the Components that support the .NET Framework

The .NET Framework consists of two major components which include the Common Language Runtime (CLR) and the Framework Class Library (FCL).

1.4 Common Language Runtime

The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime.

With regards to security, managed components are awarded varying degrees of trust, depending on a number of factors that include their origin (such as the Internet, enterprise network, or local computer). This means that a managed component might or might not be able to perform file-access operations, registry-access operations, or other sensitive functions, even if it is being used in the same active application.

The runtime enforces code access security. For example, users can trust that an executable embedded in a Web page can play an animation on screen or sing a song, but cannot access their personal data, file system, or network. The security features of the runtime thus enable legitimate Internet-deployed software to be exceptionally feature-rich.

The runtime also enforces code robustness by implementing a strict type-and-code-verification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing. The various Microsoft and third-party language compilers generate managed code that conforms to the CTS. This means that managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety.

In addition, the managed environment of the runtime eliminates many common software issues. For example, the runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references.

The runtime also accelerates developer productivity. For example, programmers can write applications in their development language of choice, yet take full advantage of the runtime, the class library, and components written in other languages by other developers. Any compiler vendor who chooses to target the runtime can do so. Language compilers that target the .NET Framework make the features of the .NET Framework available to existing code written in that language, greatly easing the migration process for existing applications.

While the runtime is designed for the software of the future, it also supports software of today and yesterday. Interoperability between managed and unmanaged code enables developers to continue to use necessary COM components and DLLs.

The runtime is designed to enhance performance. Although the common language runtime provides many standard runtime services, managed code is never interpreted. A feature called just-in-time (JIT) compiling enables all managed code to run in the native machine language of the system on which it is executing. Meanwhile, the memory manager removes the possibilities of fragmented memory and increases memory locality-of-reference to further increase performance.

Finally, the runtime can be hosted by high-performance, server-side applications, such as Microsoft SQL Server and Internet Information Services (IIS). This infrastructure enables you to use managed code to write your business logic, while still enjoying the superior performance of the industry’s best enterprise servers that support runtime hosting.

1.5 Framework Class Library

The .NET Framework class library is a collection of reusable types that tightly integrate with the common language runtime. The class library is object-oriented, providing types from which your own managed code can derive functionality. This not only makes the .NET Framework types easy to use, but also reduces the time associated with learning new features of the .NET Framework. In addition, third-party components can integrate seamlessly with classes in the .NET Framework.

For example, the .NET Framework collection classes implement a set of interfaces that you can use to develop your own collection classes. Your collection classes will blend seamlessly with the classes in the .NET Framework.

As you would expect from an object-oriented class library, the .NET Framework types enable you to accomplish a range of common programming tasks, including tasks such as string management, data collection, database connectivity, and file access. In addition to these common tasks, the class library includes types that support a variety of specialized development scenarios.

2.0 Conclusion

Microsoft .NET Framework is a huge success from of company and also a reliable tool for both Developer and IT Professionals. But this does not mean that the framework is error proof, or error free. .NET Framework also has its short comings with start from the fact that the multi-platform version of the framework is not available from Microsoft, and neither is it available straight after installing Visual Studio. Another problem comes with managed code, which is run on the .NET framework, that it is slower than unmanaged code.

From a technical view, another limitation in the framework can be noticed with the garbage-collector, which is integrated into the environment and can introduce unanticipated delays of execution over which the developer has little direct control, and it can cause runtime memory size to be larger than expected.

Other than the few criticisms that it receives, the .NET Framework is a success. The .NET framework really improves the experience of Developers by putting all the tools they need, including a web browser, in one single development environment – Visual Studio.


Wikipedia online free encyclopedia. 2013. .NET Framework [Online]. (Last updated 18th January 2013) Available at: [Accessed 19th January 2013].

Microsoft MSDN. 2012. Overview of the .NET Framework [Online]. Available at: [Accessed 19th January 2013].

Microsoft MSDN. 2012. .NET Framework Tools [Online]. Available at: [Accessed 19th January 2013].