Microsoft.NET

……………………………………………….Expertise in .NET Technologies

Diff bet 2-tier architecture and 3-tier architecture

Posted by Ravi Varma Thumati on October 23, 2009

In modern two-tier architecture, the server holds both the application and the data. The application resides on the server rather than the client, probably because the server will have more processing power and disk space than the PC.

In three-tier architecture, the data and applications are split onto separate servers, with the server-side distributed between a database server and an application server. The client is a front end, simply requesting and displaying data. Reason being that each server will be dedicated to processing either data or application requests, hence a more manageable system and less contention for resources will occur

What is the difference between 1-tier, 2-tier, 3-tier, and n-tier architecture?

The term Architecture in IT generally refers to Client Server Architecture. A client is defined as a requester of services and a server is defined as the provider of services. A single machine can be both a client and a server depending on the software configuration. There are different types of Client-Server architecture available. Some of them are 2-tier architecture, 3 tier architecture, 4 tier architecture and n tier architecture.

2-tier architecture
in 2-tier, the application logic is either buried inside the User Interface on the client or within the database on the server (or both). With two tier client/server architectures (see Two Tier Software Architectures), the user system interface is usually located in the user’s desktop environment and the database management services are usually in a server that is a more powerful machine that services many clients. Processing management is split between the user system interface environment and the database management server environment. The database management server provides stored procedures and triggers

3-tier architecture
In 3-tier, the application logic (or) process lives in the middle-tier, it is separated from the data and the user interface. 3-tier systems are more scalable, robust and flexible. In addition, they can integrate data from multiple sources. In the three tier architecture, a middle tier was added between the user system interface client environment and the database management server environment. There are a variety of ways of implementing this middle tier, such as transaction processing monitors, message servers, or application servers. The middle tier can perform queuing, application execution, and database staging. For example, if the middle tier provides queuing, the client can deliver its request to the middle layer and disengage because the middle tier will access the data and return the answer to the client. In addition the middle layer adds scheduling and prioritization for work in progress. The three tier client/server architecture has been shown to improve performance for groups with a large number of users (in the thousands) and improves flexibility when compared to the two tier approach.

Some Basic  Differences  between asp.net 2.0 ObjectDataSource and SqlDataSource

* Type Name
For ObjectDataSource, the property TypeName includes the class name, that will responsible to manage data, this may NOT be the data object collection. The select, insert etc methods will use the mentioned methods to access or retrieve data. For SqlDataSource, a built-in data collection is used, which can be bound to data data controls.

* Connection String
For ObjectDataSource, there is NO connection string needed, as it is used middle tier. For SqlDataSource, connection string is needed.

* CRUD Method
For ObjectDataSource, there is NO method (select, insert etc) type, as the methods are being used from a class of middle tier. For SqlDataSource, there are two types of methods StoredProcedure and Text. note, in SqlDataSource, for parameters, in the execution time the system automatically includes a ‘@’ before the name as specified in the name property.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: