C# FAQ 1.1 - What is Microsoft .NET?

Microsoft .NET is one of the powerful technologies available today for developing robust Windows and Web applications. It consists of several programming languages such as C#, Visual Basic .NET, Visual C++ .NET, Visual J# .NET, and frameworks like ASP.NET. The Microsoft .NET Platform comprises a number of key components, including the following:

  • .NET Framework
  • .NET Compact Framework for smart devices such as Pocket PC and Mobiles
  • Visual Studio .NET
  • Microsoft Office 2003 System
  • XML Web services
  • Enterprise Servers such as Windows Server 2003

Microsoft's .NET Framework is comprised of two main components: the Common Language Runtime (CLR) and the .NET Framework class libraries. The CLR is the real foundation of the .NET Framework. It is the execution engine for all .NET applications. Every target computer requires the CLR to successfully run a .NET application that uses the .NET Framework. The main features of CLR include:

  1. Automatic Memory Management
  2. Thread Management
  3. Code Compilation & Execution
  4. Code Verification
  5. High level of security
  6. Remoting
  7. Structured Exception Handling
  8. Interoperability between Managed and Unmanaged code
  9. Integration with the Microsoft Office System

All .NET applications are compiled into Intermediate Language code (MSIL). When executed on the CLR, MSIL is converted into native machine code specific to the operating platform. This process is done by a Just In Time (JIT) compiler. The code executed by the CLR is called Managed Code. This code is type safe and thoroughly checked by the CLR before being deployed. The .NET runtime also provides a facility to incorporate existing COM components and DLLs into a .NET application. Code that is not controlled by the CLR is called Unmanaged Code.

The .NET Framework is further comprised of the Common Type System (CTS) and Common Language Specification (CLS). The CTS defines the common data types used by .NET programming languages. The CTS tells you how to represent characters and numbers in a program. The CLS represents the guidelines defined by for the .NET Framework. These specifications are normally used by the compiler developers and are available for all languages, which target the .NET Framework.

Another core component of Microsoft's .NET Framework is its built-in powerful class libraries. It is an object-oriented collection of reusable classes or types that you can use to develop applications such as traditional command line, Windows, and Web applications. It contains around 3400 classes, classified logically into so-called Namespaces. You will learn more about namespaces in FAQ 1.4.

Each class contains numerous methods and properties, which you will use for your programming tasks. These libraries are available for any language under the CLR environment (see Figure 1.1.1).

Figure 1.1.1

Furthermore, these libraries will be installed automatically at the time you install the .NET Software Development Kit (SDK). An interesting factor about .NET is that if you are familiar with one language, such as C#, it will be easy for you to migrate to other languages such as Visual Basic .NET without spending much time learning new syntaxes and conventions. However, there are some differences between C# and Visual Basic .NET with regard to the applicability of syntaxes. For instance, C# is a case-sensitive language, whereas Visual Basic .NET is not. All statements in C# end with a semicolon (;). If you are averse to semicolons, jump to Visual Basic .NET.

On the Web

A complete list of .NET Framework class libraries can be accessed at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp.

One of the interesting points to note is that the CLR itself manages the life of objects. This is the effect of the Automatic Garbage Collection system built into it. When the CLR finds an object that is not being used, it destroys it and thus frees its memory allocation.

The corresponding compilers of any .NET language generate Meta code upon successful compilation. This code is managed and contains a lot of information about types, its members, and references used. You can view the generated Meta code by using a tool called IL Dissembler that ships with the .NET Framework. You will learn more about this tool in a later FAQ.

As explained above, .NET applications can be developed by using a variety of programming languages. Whereas C# and Visual Basic .NET comprise most of the .NET development, there are over 20 other languages that support .NET. These are languages such as Visual C++ .NET, Visual J# .NET, and COBOL .NET. In the future, you can expect even more languages to be available for use with .NET. All these languages have the ability to use the same set of .NET Framework class libraries and hence the learning curve is simplified.

Microsoft packaged all the essential tools for developing, testing, and running a .NET application into a Software Development Kit (SDK). It comes with the CLR as well as command line compilers for C#, Visual Basic .NET, and the runtime engine for ASP.NET. It also includes documentation and sample programs. Microsoft also sells Visual Studio .NET, which is a development tool used for creating applications and components using the .NET Framework. It largely simplifies the work of developers with the help of user-friendly wizards and templates.



About the Author

Anand Narayanaswamy

Anand Narayanaswamy (Microsoft MVP) is a freelance writer for Developer.com and Codeguru.com. He works as an independent consultant and runs NetAns Technologies (http://www.netans.com)which provides affordable web hosting services. He is the author of Community Server Quickly (http://www.packtpub.com/community-server/book). Anand also runs LearnXpress.com (http://www.learnXpress.com) and Dotnetalbum.com (http://www.dotnetalbum.com) and regularly contributes product and book reviews for various websites. He can be reached at ananddotnet@yahoo.co.in

Comments

  • Not good.

    Posted by Charu0306 on 02/28/2007 05:34pm

    The article starts off with an topic and wanders into another. No Copy n Paste allowed. Thats not nice. The idea of writing an article is to write what you have understood and not what the vendor has to say on it.

    Reply
  • nice article.

    Posted by s|lent on 01/03/2005 12:34pm

    easy to follow and understand for newbies[like me]. s|lent

    Reply
  • thanks

    Posted by olymp on 07/06/2004 01:53am

    thanks

    Reply
  • OK, now the positives...

    Posted by darwen on 06/25/2004 04:18pm

    Right, now I've got the negatives out of the way I will say that the article is very well written. It is clear, concise and gives whatever information you have to provide very well. Diagrams are always a bonus in writing articles of this sort, and you have illustrated your intent very well. Darwen.

    Reply
  • This is limited, very limited

    Posted by darwen on 06/25/2004 04:14pm

    Now, this is hardly complete. If it was supposed to be an introduction it should say so. You completely ignore C++.NET (or C++/CLR as Microsoft is now calling it). You're statements about 'if you know .NET you can recognise any language' fall over at that point. I personally would have stuck to what .NET is, what it provides for you and what its advantages and disadvantages are without getting language specific. Also the fact that the JIT compiler (you didn't mention it - why ?) is a COMPILER. I.e. .NET is COMPILED at runtime and not just INTERPRETED. This needed to be stressed and the differences compared/contrasted against other languages such as Java. So, this is not just incomplete but it appears you don't have a full grasp of .NET - certainly not enough to write an FAQ about it.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Entire organizations suffer when their networks can't keep up and new opportunities are put on hold. Waiting on service providers isn't good business. In these examples, learn how to simplify network management so that your organization can better manage costs, adapt quickly to business demands, and seize market opportunities when they arise.

  • For many organizations, moving enterprise applications to the public cloud can be a very attractive proposition, but planning the best way to move your applications is mission–critical. As an alternative to the costly option of re–architecting the application for a cloud environment, you can follow a "lift and shift" model that's significantly cheaper and almost always a lot quicker. In order to have a successful "lift and shift" migration, read this white paper to learn a few rules you should …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date