In my previous post I have outlined points to be considered while testing Web based applications. In today’s software testing class we are discussing about the Two-Tier and Three-Tier architecture.
All projects are broadly divided into two types of applications 2 tier and 3 tier architecture. Basically high level we can say that 2-tier architecture is Client server application and 3-tier architecture is Web based application. Below I am concentrating on the difference between Two-Tier and Three-Tier Architecture, what all advantages, disadvantages and practical examples.
Two-Tier Architecture:
The two-tier is based on Client Server architecture. The two-tier architecture is like client server application. The direct communication takes place between client and server. There is no intermediate between client and server. Because of tight coupling a 2 tiered application will run faster.
The above figure shows the architecture of two-tier. Here the direct communication between client and server, there is no intermediate between client and server.
Let’s take a look of real life example of Railway Reservation two-tier architecture:
Let’s consider that first Person is making Railway Reservation for Mumbai to Delhi by Mumbai Express at Counter No. 1 and at same time second Person is also try to make Railway reservation of Mumbai to Delhi from Counter No. 2
If staff from Counter No. 1 is searching for availability into system & at the same staff from Counter No. 2 is also looking for availability of ticket for same day then in this case there is might be good change of confusion and chaos occurs. There might be chance of lock the Railway reservation that reserves the first.
But reservations can be making anywhere from the India, then how it is handled?
So here if there is difference of micro seconds for making reservation by staff from Counter No. 1 & 2 then second request is added into queue. So in this case the Staff is entering data to Client Application and reservation request is sent to the database. The database sends back the information/data to the client.
In this application the Staff user is an end user who is using Railway reservation application software. He gives inputs to the application software and it sends requests to Server. So here both Database and Server are incorporated with each other, so this technology is called as “Client-Server Technology“.
The Two-tier architecture is divided into two parts:
1) Client Application (Client Tier)
2) Database (Data Tier)
On client application side the code is written for saving the data in the SQL server database. Client sends the request to server and it process the request & send back with data. The main problem of two tier architecture is the server cannot respond multiple request same time, as a result it cause a data integrity issue.
Advantages:
- Easy to maintain and modification is bit easy
- Communication is faster
Disadvantages:
- In two tier architecture application performance will be degrade upon increasing the users.
- Cost-ineffective
Three-Tier Architecture:
Three-tier architecture typically comprise a presentation tier, a business or data access tier, and a data tier. Three layers in the three tier architecture are as follows:
1) Client layer
2) Business layer
3) Data layer
1) Client layer:
It is also called as Presentation layer which contains UI part of our application. This layer is used for the design purpose where data is presented to the user or input is taken from the user. For example designing registration form which contains text box, label, button etc.
2) Business layer:
In this layer all business logic written like validation of data, calculations, data insertion etc. This acts as a interface between Client layer and Data Access Layer. This layer is also called the intermediary layer helps to make communication faster between client and data layer.
3) Data layer:
In this layer actual database is comes in the picture. Data Access Layer contains methods to connect with database and to perform insert, update, delete, get data from database based on our input data.
Advantages
- High performance, lightweight persistent objects
- Scalability – Each tier can scale horizontally
- Performance – Because the Presentation tier can cache requests, network utilization is minimized, and the load is reduced on the Application and Data tiers.
- High degree of flexibility in deployment platform and configuration
- Better Re-use
- Improve Data Integrity
- Improved Security – Client is not direct access to database.
- Easy to maintain and modification is bit easy, won’t affect other modules
- In three tier architecture application performance is good.
Disadvantages
- Increase Complexity/Effort
This is the common Question asked in the Interview. Hope this article helped you understanding Two-Tier and Three-Tier Architecture with example.
Thanks and Happy Testing!!!
I think this will have an idea of two-tier and three-tier architecture. To get software testing articles in your inbox click here to Subscribe with your email address link. Also I would like all of you to please join this discussion and add more valuable points to it. Thanks.
- Software Estimation Techniques – Common Test Estimation Techniques used in SDLC
- Difference between Verification and Validation
- Software Testing Interview Question – Tell Me Something About Yourself?
- Are You Prepared: Interview Preparation Checklist
- Difference in Desktop, Client Server and Web Application Testing
- How To Test Web Application? – Back To Basics!!
- Smoke Testing
- What if there isn’t enough time for thorough testing?
- Positive and Negative Testing In Software Testing
- Tips & Tricks: How to test your Web Applications?
74 thoughts on “What is Difference Between Two-Tier and Three-Tier Architecture?”
Two tier basically comprise of Presentation and database layer wheresas in three tier these are segregated.
its very good for beginners….thanks
Simple and clear. Thanks You.
VERY USEFUL INFORMATION FOR FRESHERS TO FACE INTERVIEW QUESTIONS ON TEST CASES.. GOOD WORK…
Crest and clear to understand. I would certainly recommend it to my friends.
Thanks
Good informative post..!!
very informative and full of knowledge post. Usually people get stuck in to difference between two tier and 3 tier architecture
its very useful me..
Nice post, very useful…
Clear and Easy to understand. Thanks a lot :)
I think it’s short and simple…..thks…..
Very nice and full informaction about 2 and 3 tires….
Thanks for you
very easy to understanding
Can you Please Explain Real life Example of Three tier architecture also…
IT IS VERY USEFULL AND UNDERSTAND VERY EASY.THANKS ALOT
Easy to understand ,good bro
Hi,
This website topics are really helpful. Keep writing!!
its nice…very usefull. thanks
THANKS…
I need exact advantages of 3 tier over 2 tier architecture.
It’s very easy to understand and helpful to me THANKS A LOT.
Good info.
nice information for 2-tier and 3-tier
good
why in DAL configurationManager is not allowing eventhough i
wrote namespace of Data.
Simple and clear. Thanks You
good knowledge about 2-tier and 3-tier
VERY USEFUL KNOWLEDGE
It is really good. Can you name some Application Server? And,please tell me if Banking application is 3-tier application? My understanding from above explanation is Yes Reason being: All Customers information and account information,Amount Balance are kept in Data Source(3rd layer as per the example shown above).Front end is nodoubt is Presentation layer and where the transaction happens ( like, Transfer 50000 from Account A TO B ) is Business layer. Please correct me if am wrong in understanding.
WELL PRESENTED IN DIAGRAM FORM EASY TO UNDERSTAND
It would have been useful to explain how the 3-tier model resolves the issue of the two ticket agents making simultaneous requests.
Great post, now i can understand it better. Thanks
very easy to understand and very use full it.thanks
I love the way you explained, it is easy to understand the concepts
Thank you
Simple and easy to understand….Thanks a lot….its really helpful for me….:-)
good knowledge and cleared the concept. Thanks a lot for sharing the details.
Thanks
Nice post,provide more information of the both architecture
Nice explanation….. Thanks a lot….. For Easy Understanding To Me…
Really nice post,got a clear idea about both architecture now.Thank You…keep going.
Simply made to know.Tnks
Thank you.Very easy to understand.
Thank You.
Thank You
NICE EXPLAIN
Thank you for the information. I am a student and this is new to me. Thanks for your help.
The “What is Difference Between Two-Tier and Three-Tier Architecture?” was a useful information for me but I wanted to know a bout the author of this topic but unfortunately I couldn’t find the author, in-cause of not plagiarizing this topic, I wanted to cite the reference.
Very refreshing and knowledgeable for anyone.
Thanks
Shammi
i got clear idea about tier types , thank u very very much…….
Thanks for sharing article,
Its simple to understand.
So nice presentation of facts..so clear and lucidly explained. It made my concept crystal clear.
good presentation and is very easy for beginers
Very good for beginers
Good for Freshers…
Clear, easy to understand,short,effective,
It helped me in preparing for exam.
Thanks
Its soo simple nd easy to understand..Thank you!!
It is good to understand
oooooooooooooooooo
Crisp, clear, easy to understand explanation of the topic.
It is very nice and useful.Thank you very much
Nice explanation, concept is clear
Thank You
very easy to understanding
quite ok…..
Very nice easy to understand lovely.. .
Very nice easy to understand lovely.. .thnk you
Usefulll
it’s a nice article , clear to understand the difference between the two architectures . It’s really helpful for me . Thank you
understandable and usefull
thanks..
good1
but.. how data integrity can be solved in three tier systems..
Good explane 2tier &3tier
easly understant compare to 2 tier and 3 tire architecture.thank you
thank you !
Super
Its a perfect answer for the beginners.. Thank u
Nice and easy to understand