Introduction
Before writing applications in C#, understanding the .NET is very important. Usually, beginners who are moving to C# don't care about understanding .NET? In this article, you will learn what .NET and its components are?
Today there are more than 400 Million computer users in the world and I think almost all of them use the internet daily for shopping, chatting, business and many other things. But still, there are a lot of things that they can't do it by using the internet like if there are available seats for Air France plane that will go to Paris next week, And maybe you want to know the prices of other airlines and compare it to Air France and choosing the less expensive one, Maybe you want to know the nearest car renting company and if there are more than one company you will choose a car and compare the renting charge between the companies, And many many things that will make our life much easier like sending a message to my car that will receive my command via .NET to do something maybe open the door after 5 minutes.
Before Microsoft. NET all these services were a dream and simply don't exist because there are no computer platforms that capable to deal with these services, Also every vendor use some technique for describing their information, And we must not forget that developing the code necessary to integrate such services is very complex, Microsoft realizes that the future for internet especially these kinds of services and they must improve the capabilities of these services so Microsoft spent 3 years creating .NET and released it in July 2000.
Actually, Microsoft considered creating these web services as the future of selling Computer Applications. For example, your company specialized in creating services for car renting companies so car renting companies will be interested in your products and buying them. Also, there will be a free service offered by a number of companies. You can think of these web services as a new way of executing business logic and here are some examples of these services:
- Service for specifying the nearest Car Renting Companies in my area based on my zip code.
- Service for comparing book prices.
- Service for providing times, for example, a service that will provide the local US time for other countries.
- Service for airline tickets comparing based on the information entered by the user.
- Service that capable to search for Internet users every specific hour.
There was a very simple list of web services that companies can implement and believe me the list can be Millions of services. Microsoft and a number of companies begin developing such kind of services and some of them will be for free others will not. With these great services, there must be produced applications that will use these services to do its job. For example, we have a service that will retrieve the renting car companies based on the zip code area so we must develop an application that will use this service and return the result to the user of the application so now with thousands of these services and applications to use these services we will have rich powerful applications for the users.
So to create these powerful applications there must be a programming platform capable to use these services through a powerful international network like the internet and make the whole world like an integrated unit and this all Microsoft. NET about.
Important Note: The concept of Microsoft. NET may be not clear for now but when you know more about C# and when you work with Web services you will get the big picture. So don't worry because we are just in beginning.
In Microsoft .NET world these services called web services and these web services all connected to the internet (so applications can use these services). There is a part of Microsoft. NET called .NET Framework which provides the developers an easy way to access web services so .NET Framework is the development platform that we will use to develop .NET applications. In a few words, we can say that Microsoft. NET platform is the group of technologies and products that Microsoft spent the last few years and about 80% of its budget in .NET researches and development. I think you will understand it better after we talk about the components of that huge platform.
Most of you will think that Microsoft. NET Platform just C# and Visual Studio.NET but C# and Visual Studio.NET just part of the big game. And as I said before Microsoft. NET it's just a name for a lot of technologies. Here in the book, we will need to know that C#, Visual Basic. NET, Visual Studio.NET (VS. NET), and .NET Framework (which we will discuss next section) are parts of Microsoft. NET Platform and that's what you need to know.
But to get the whole picture in your mind you must know that there is a group of servers like (Microsoft SQL Server 2000, Microsoft Application Center 2000, Microsoft Mobile Information Server 2000, and many others) Microsoft call these servers '.NET Enterprise Servers' and this is another part of Microsoft. NET Platform. Also as a part of Microsoft. NET world and Platform there are a number of new non-PC devices like Pagers, Mobile phones, and many others will be part of .NET technology, how? Simply these devices will be able to receive .NET applications. Also, there are a number of services called .NET services and it's a part of Microsoft. NET Platform.
Now that you have a good overview of the .NET Platform we must understand 2 major components of this Platform.
MSDN and many books describe the .NET Framework as "The .NET Framework is a new computing platform that simplifies application development in the highly distributed environment of the Internet". Or ".NET Framework is a completely new application development platform". Actually, if this is your first programming book then you may not understand .NET Framework like that.
When you develop applications using C# or any other language that can work on .NET (support .NET) there must be a way for the Operating System to understand the applications and execute it and that's the role of the .NET Framework. Let me explain it this way: We have some programming functionality in C# (I try to use simple expressions here) that enable us to generate random numbers in our programs so when we write this function's code how C# will talk to the operating system (Here is Windows Platform) to generate that random number?
Pretty easy using .NET Framework, so .NET Framework knows how to talk to the Operating system to generate the random number. Think of .NET Framework as the programming framework for C# (actually as we will know later for all .NET Languages). So when you program using C# the .NET Framework will understand the code you wrote and talk with the Operating System to execute your program.
Now when we say "The .NET Framework is a new computing platform that simplifies application development in the highly distributed environment of the Internet" so we understand that the .NET Framework a new platform that will help us developing applications fast and easy while abstracting a lot of complex operating system details. Let's get back to our example of generating a random number. If you want to generate it using non-.NET languages so you must develop a complex mathematical calculation and you will need to get the time of the Computer for this calculation too so you will deal with the operating system. But with .NET Framework, we don't have to know these operating systems details and simply we will use the functionality provided by the framework to get the random number generated. Now that you have a good simple understanding of .NET Framework you must know 2 central components.
Microsoft. NET Platform components
1. .NET Framework
.NET Framework Central Components
- .NET Framework Class Library (FCL)
For now, think of this as the programming functionalities and capabilities that we will use to develop your applications, in our Random Number Generating we use a function to perform the Number Generating, and this function part of this Class Library not only that but you can develop windows applications, web applications, network applications and more using this library.Important Note: We didn't study the concept of classes yet so don't worry. Just understand that FCL contains the programming functions that you will use to develop all kinds of applications.
- .NET Common Language Runtime (CLR)
This is a major part of the .NET Framework but before we know what is its function we must understand what does Runtime means?Runtime is the time when you execute your program. I mean the time when your program is running in memory. As its name says it's the language responsible of running and executing .NET applications and managing memory. Before .NET memory management was the programmer's responsibility and believe me it was one of the worst nightmares for programmers but with .NET the CLR will manage memory and that's will result in better application performance.
2. Visual Studio.NET (VS. NET)

Figure 1.1 displays VS. NET development environment when you open it.
Compiling .NET Code
Managed Code vs. Unmanaged Code
C# Overview
.NET Framework Applications
.NET Framework and .NET Languages
- using System;
- namespace testApp {
- /// <summary>
- /// Summary description for Class1.
- /// </summary>
- class Class1 {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main(string[] args) {
- Console.WriteLine("I like C# Programming");
- }
- }
- }
Sub Main()
Console.WriteLine("I like C# Programming")
End Sub
End Module
Join the conversation! Your thoughts help the community grow.