Introduction to Microsoft .NET Framework

For programmers, it is difficult and expensive to manage the differences between different operating systems, if they want their software to work on multiple platforms. To begin with, different operating systems may not provide the same tools. Also, if the program needs to run on a different type of CPU, the numbers that represent the CPU instructions are different between CPU types � and in fact the instructions themselves may not exist on one of the CPU types!
Furthermore, if a programmer wants to re-use some existing code in their program, the existing code usually has to be in the same language as they are using in their program, to avoid difficulties. It can be time-consuming to learn a new computer language when they are already familiar with a different language.
To solve problems like these, Microsoft has produced the .NET Framework. The .NET Framework provides a managed environment for programs to run in � a bit like an operating system within an operating system. The .NET Framework offers many advantages to a programmer:

  • An extensive and consistent set of tools that are available on any platform and in any computer language that the .NET framework supports.
  • The ability to create programs that can run on any type of CPU and on any operating system that the .NET Framework supports.
  • The ability to use existing code from any .NET-supported language.



Client/Server

When you write your first Windows programs, they will likely be simple programs that help you to learn the concepts and tools of programming. When you start to write �real-world� applications, you will need to look beyond these basic tools to ensure that your program is suitable for its intended scenario.
One common problem in a real-world scenario is how to share information among multiple people. In this scenario, the information usually resides in one location and people access it from other locations.
You may have heard the terms �client� and �server� before. In this guide, we won�t go into too much detail since you probably won�t have to worry too much about this until you become a more advanced programmer, but we�d like to familiarize you with the concepts.
Client-server architecture is a common way to share data among multiple people. Data resides on a server, which provides a way that clients can access the data. A computerprogram runs on the server at all times, listening for connections from clients. On the client computer, another program connects to the server whenever it requires information, either on a schedule or as a result of actions by the computer user. For example, when you check your email, the email program makes a connection to the mail server. In this scenario, the email program is the client application that makes requests to the mail server.
When the client makes a request to the server:
  1. It sends a message to the server over the network that contains details about the request � for example, your email program sends the user name and password as part of the request.
  2. The server then performs some action, usually by processing a database or some files located on the server.
  3. The server then sends the information back to the client as a response

The client program can then use the information inside the response as appropriate � in your email program, it would display the email on the screen for you to read.
For client and server applications to communicate, they need to have a common understanding of the data that they exchange. The rules that define this common understanding define a protocol for communication. Protocol is the computing term that describes an agreed �language� for communication. Each computer must use the protocol so that other computers can make sense of the data.
As well as defining a protocol, the client and server computers must run code that communicates with other computers by using the protocol. In the .NET Framework, much of this code already exists in the �toolbox� so you don�t need to write it yourself. When you use the .NET Framework, you will discover tools like .NET Remoting that help you write programs that communicate with other programs.

No comments:

Post a Comment