Grounding.co.za

Technology information for IT specialists
Welcome to Grounding.co.za Sign in | Join | Help
in Search

Tech Talk with Brett Maytom

Introducing the Common Language Runtime (CLR)

Abstract

In order to use and develop in .NET, there are several topics that need to be understood as this foundation will allow you to understand the strategy behind .NET.  This article aims to discuss an overview of the Common Language Runtime.

 Introduction

The common language runtime (CLR) is an execution engine for .NET applications. The .NET Framework provides a large library of classes, interfaces and data types.

image

The common language runtime provides many benefits that make the technology choice attractive to system designers.  Some of these benefits are

  • the ability to run applications of different operating systems
  • the ability to run applications on different hardware architectures
  • freedom of programming language choice
  • ease of data integration through the common type system
  • language neutral component development
  • full object orientation
  • large framework for developing services, components, form and web based applications.
  • powerfully debugging environment
  • integration with legacy components in an unmanaged mode.
  • large commercial vendor component base
  • large community skill base
  • memory management

We will now enter into a discussion around all the features of .NET CLR

Compilers and programming languages

.NET achieves this by allowing you to choose a language where you are familiar with the general syntax.  Many .NET languages have evolved to take full advantage .NET and object orientation.  However by choosing a language you are already familiar with cuts down the learning curve.  Currently there are 17 languages supported, some are

  • Visual Basic .NET
  • Visual C++ Managed Code
  • C#
  • J# (Java)
  • COBOL .NET
  • Python.NET
  • Delphi.NET
  • Eiffel
  • Perl
  • APL
  • Pascal
  • Haskell
  • ML
  • Oberon
  • Scheme
  • Smalltalk.
  • Microsoft Intermediary Language

Assemblies, Microsoft Intermediary Language and the Just-In-Time Compiler

As you develop applications in your development environment you will compile these into assemblies.  The assembly is however not compiled for a specific hardware architecture e.g. 32, 64 bit, RISC, CISC and Mobile; it is compiled into an intermediary .NET language called Microsoft Intermediary Language (MSIL).  When the application is finally executed, the Just-In-Time compiler will convert the MSIL code to the native hardware's instruction set (machine code).

By having your applications in MSIL, you can easily execute them on different hardware devices even with different operating systems.  This is achieved by downloading the common language runtime (CLR) for your specific hardware / operating system.  Microsoft have release several CLR for various operating systems and hardware platforms within their product range.  However, there are some community projects that release runtimes for different hardware and software platforms.  For example the Mono project provides a CLR for 32 and 64 bit Linux machines.

This is exceptionally powerful as a developer can focus on writing the application without concern for hardware and operating system.  Obviously there are some limitations that each hardware\software CLR has.  For example you would not host an ASP.NET web site on your mobile device or require Active Directory functionality on your Linux box.  Thus you will need to carefully decide on your target operating systems and hardware carefully and look at limitations of .NET functionality on those platforms.

Having said that there are limitations, common business applications should work on all platforms without any code modifications.  E.g. Capture, validate, process and persist information.

.NET Framework

When the common library runtime is installed onto a operating system \ hardware combination, another set of powerful components are installed, this is the .NET Framework.  The .NET Framework is a huge library of classes, interfaces, structures and data types that perform many everyday programming functions.  Developers will quickly start using the framework as this radically cuts down development time.

Threading

Features to create simple multi threaded applications to complex thread pooling using IO completion ports.

Web Forms

A full set of functionality to deliver high performance web sites with custom controls with both server and client side processing.  The toolset even allows for component development for products like SharePoint Server.

Windows User Interfaces

Client user interfaces can be built by creating forms, dialogs and controls. This framework lets you implement the standard Windows UI in your .NET-based
applications. Many functions that were previously only accessible by means of application programming interface (API) calls are now available as part of the
forms themselves, making development much easier and more powerful.

Graphic intense applications can now access GDI+ functionality and image processing functionality.

Xml

The XML functionality provides support for XML . It includes an XML parser and a writer, which are both W3C-compliant. The Extensible Stylesheet
Language (XSL) transformation is provided. A powerful set of components allows classes to easily serialized into XML documents and then passed between processes or saved to disk.

Helpers

String manipulation, regular expressions, date and time manipulation, mathematical functions and access to file systems.

Database

The System.Data namespace consists of classes that constitute the ADO.NET object model. At a high level, the ADO.NET object model is divided into two
layers: the connected layer and the disconnected layer.  The System.Data namespace includes the DataSet class, which represents multiple tables and their relations. These DataSets are completely self contained data structures that can be populated from a variety of data sources.
One data source could be XML, another could be OLEDB, and a third data source could be the direct adapter for SQL Server.

Integration

SOAP, Sockets, Interproces Communication and web services.

Security

Full security functionality is provided by the framework allowing integration with LDAP, Active Directory and custom security functionality.  Throughout the framework a large focus is on security.

Framework Versions

The common language runtime is static and MSIL consistent through releases.  However what does change in enhancements within the huge Framework of class libraries.  These libraries are constantly being optimized, simplified and extended.  Each Framework then either standard or implemented on a specific operating system / hardware CLR release.

Version Description
Framework 1.0 The initial release of the .NET framework was a completely successful and stable.  It proved many sceptics in the technology wrong.
Framework 1.1 Optimisations on the Framework were released with subtle language enhancements to various languages and ease-of-use redesigns made, especially with System.Data namespace.
Framework 2.0 This very successful framework release extended the framework significantly with a high drive on Web services and Web applications.  Other areas such as reflection were introduced making processing engine development significantly easier.
Framework 3.0 Framework 3.0 was release with new functionalty such as Workflow.
Framework 3.5 With significant changes to some backend servers such as SQL 2008, integration with SharePoint, data access using embedded LINQ

In the future of the framework will continue to evolve at a rapid pace with optimizations and significant new functionality.  The framework will adapt to new inventions and technologies in the software industry. The current development base within Microsoft, component makers and development shops is unbelievably huge, with so much skill and innovation out in the market, the entire industry will benefit.

The only foreseeable problem is that these enhancements will be coming in at a huge rate making it very difficult for programmers and companies to keep abreast.  One will see that it will be common practice for a development shop to skip a version or two in the framework before the attraction of new functionality out weights the functionality of the current framework.

Common Type System

The common type system defines various data types that is enforced in each language implementation.  The different data types are owned by the CLR and defined within the Framework.  This powerful design facilitates integration between all .NET applications and components regardless of the language they were written in.

Published Jul 15 2007, 08:07 AM by Brett
Filed under: ,

Comments

No Comments

About Brett

Brett Maytom is a MCSE+I, MCSD, MCDBA, CCNA, CNE and MCT. Brett’s core industry focus is enterprise architecture. The technologies Brett focuses on is Microsoft .NET, C#, SQL Server, BizTalk and SharePoint development
Add to Technorati Favorites
Powered by Community Server (Commercial Edition), by Telligent Systems
Afrigator