Search this blog

Wednesday, April 9, 2008

.NET Introduction

What is .NET?
.NET is a general-purpose software development platform, similar to java. At its core is a virtual machine that runs intermediate language (IL) into machine code. High-level languages compiler for C#, VB.NET and C++ are provided to turn source code into IL. C# is new programming language, very similar to java. An extensive class library is included, featuring all the functionality one might expect from a contemporary development platform – windows GUI development (windows forms), data access (ADO.NET), Web development (ASP.NET), web services, XML, etc.,

When was .NET Announced?
Bill Gates delivered a keynote at forum 2000, held June 22, 2000, outlining the .NET ‘vision’. The July 2000 PDC had a number of sessions of .NET technology, and delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual studio.NET.

What versions of .NET Framework are there?

  • The final versions of the 1.0 SDK and runtime were made publicly available around 6.00 PM PST on 05-Jan-2002. At the same time, the final version of Visual studio.NET was made available to MSDN subscribers.
  • .NET Framework 1.1 was released in April 2003, and was mostly bug fixes for 1.0.
  • .NET Framework 2.0 was released on 07-11-2005, and was officially launched in early November.
  • .NET Framework 3.0 was released on 06-11-2006
  • .NET Framework 3.5 was released on 19-11-2007

For More Information about the versions differences, Please refer the website

http://en.wikipedia.org/wiki/.NET_Framework

What is .NET Framework?
The Microsoft .NET Framework is a platform for building, deploying, and running Web Services and applications. It provides a highly productive, standards-based, multi-language environment for integrating existing investments with next generation applications and services as well as the agility to solve the challenges of deployment and operation of Internet-scale applications. The .NET Framework consists of three main parts: the common language runtime, a hierarchical set of unified class libraries

Terminology

What is the common language runtime (CLR)?
The common language runtime (CLR) is major component of .NET Framework and it is the execution engine for .NET Framework applications.

It is responsible for providing the number of services, including the following:
* . Code management (loading and execution)

*. Verification of type safety

*. Conversion of Microsoft Intermediate Language (MSIL) to native code
*. Access to metadata (enhanced type information)
*. Managing memory for managed objects
*. Enforcement of code access security (See what is code access security?)
*. Exception handling, including cross-language exceptions
*. Interoperation between managed code, COM objects, and pre-existing DLLs (unmanaged code and data)
*. Automation of object layout
*. Support for developer services (profiling, debugging, and so on)

What is the common type system (CTS)?

The common type system (CTS) is a rich type system, built into the common language runtime (CLR) that supports the types and operations found in most of .NET programming languages. The common type system supports the complete implementation of a wide range of programming languages.

What is the Microsoft Intermediate Language (MSIL)?
MSIL is the Machine independent Code into which .NET Framework programs are compiled. It contains instructions for loading, storing, initializing, and calling methods on objects. Combined with metadata and the common type system, MSIL allows for true cross language integration. Prior to execution, MSIL is converted to machine code via CLR’s Just-in-Time (JIT) compiler.

What is managed code and managed data?

We can describe Managed code like, if a code running under the control CLR, then that code is called as Managed Code.

Managed code is code that is written to target the services of the common language runtime (see what is CLR?). In order to target these services, the code must provide a minimum level of information (metadata) to the runtime. All C# (when not using the unsafe keyword), Visual Basic .NET, J#, and JScript .NET code is managed by default. Visual Studio .NET C++ code is not managed by default, but the compiler can produce managed code by specifying a Command-line switch (/CLR). Closely related to managed code is managed data—data that is allocated and reallocated by the common language runtime's garbage collector. C#, Visual Basic.NET, J# and JScript .NET data is managed by default. C# data can, however, be marked as unmanaged through the use of special keywords. Visual Studio .NET C++ data is unmanaged by default (even when using the /CLR switch), but when using Managed Extensions for C++, a class can be marked as managed by using the __gc keyword. As the name suggests, this means that the memory for instances of the class is managed by the garbage collector. In addition, the class becomes a full participating member of the .NET Framework community, with all of the benefits and restrictions that brings. An example of a benefit is proper interoperability with classes written in other languages (for example, a managed C++ class can inherit from a Visual Basic.NET class). An example of a restriction is that a managed class can only inherit from one base class. Any restrictions, such as this one, are designed to prevent common programming errors.