Client server architecture in .net by varun tiwari
Client/Server ModelApplications may vary from single-tier desktop applications (applications that follow the single-tierarchitecture) to multi-tier applications (applications that follow the two-, three-, or n-tierarchitecture).Based on the processing scenario, a business application can have the following elements: The User Interface or the presentation elements through which data is entered. The application logic or the business rule element, which helps in validating the entered data. The data storage or the data management element, which manages the storage and retrieval of data.These elements form the base of the models or architectures used in application development. All theseelements can exist on the same computer as a single process or on different computers as differentprocesses. Depending on the placement of these elements the application architecture can be categorizedas: 1. Single-tier architecture 2. Two-tier architecture 3. Three-tier architecture 4. N-tier architecture 1. Single-tier architectureA single executable file handles all functions relating to the user, business, and data service layers. Allelements of a business application are combined as a single process. If multiple users need to work on thisapplication then it needs to be installed on the computer of every user. This type of architecture has onedisadvantage. In case some errors are identified in the application then after rectifying the same, theapplication has to be installed again on the system of every user. This is time-consuming process. Figure 1.0 Single-tier architecture 2. Two-tier architectureIn two tier architecture, the application is divided in to two parts. One part handles data, while the otherprovides the user interface. Therefore, this architecture is called two-tier architecture. The part that handlesthe UI is called the client tier. The part that implements the application logic and validates the input databased on the business rules is called the Server tier, as shown in the following figure. Figure 1.1 Two-tier architectureIn this architecture, the mainteanance, upgrade and general administration of data is easier, as it exists onlyon the server and not on all the clients.Two tier architecture is called the client server architecture. A clientsends the request for services and a server provides the service. Most RDBMS, such as Microsoft Access,SQL Server, and Oracle, support client-server architecture. RDBMS provides centralized functionalitywhile supporting many users.
3. Three-tier architectureWhen implementing complex business solutions in two-tier architecture, the tier on which the businesslogic is implemented becomes over loaded. As a result, it takes more time to execute. Therefore, to providefurther flexibility, the two-tier architecture can be split into three tiers. In three tier architecture, the firsttier is the client tier. The second or the middle tier is called the business tier. The third tier is called theServer tier. The server tier contains a database server that manages the data. All the three service layersreside separately, either on the same machine or on different machines. In this architecture, an additionaltier called a business tier has been added between the client tier and the server tier, as shown in thefollowing figure. Figure 1.2 Three-tier architectureThe business tier consists of all the business rules. It consists of the application logic that implementsbusiness rules and validates the data. The advantage of a three tier application is that it allows you to changethe business rules without affecting the other two tiers. 4. N-tier architectureAs the business complexities increased, the business tier became larger and unmanageable. This led to theevolution of n-tier architecture, where the business services model was divided into smaller manageableunits. N-tier is also called multi tier architecture. In this architecture, one components near the client tier isresponsible to do the client side validation and send the data to the presentation tier. Therefore, it is possibleto keep the UI-centric processing component on a computer near the client. The UI-centric processingcomponent is responsible for processing the data received from and sent to the presentation tier. Data-centric processing components are responsible for accessing the data tier to retrieve, modify, and deletedata to and from the database server.The N-tier architecture consists of the following layers: Client tier UI-Centric processing components Data-Centric processing object Database ServerApplications that follow multi tier can be used across various locations. For example, in Web application,an application is stored on the Web server. The clients access the applications from any location througha browser. The clients make requests to the web server and receive responses.