2tier and 3tier architecture?
1 posts in topic
Flat View  Flat View

Posted By:   Ramesh_Kumar
Posted On:   Friday, October 31, 2003 12:39 AM

what is 2tier and 3tier architecture?
and what is the difference between them?and also what is n-tier architecture?
explain briefly

Re: 2tier and 3tier architecture?

Posted By:   Stephen_McConnell  
Posted On:   Friday, October 31, 2003 05:26 AM

"Multi-tier" architecture is just a way of putting certain processes into "layers" so you can keep them separate.

"Tiers" arose out of the problem with "monolithic" code. All of your presentation, business logic, persistance code was intermingled so if you made a small change to lets say your interface, ALL the code had to change. Or Heaven forbid you made a change to your database tables!!!!

You could probably go way back to a 2-tiered architecture to a "client-server" architecture which consisted of code that ran on a client side and code that served up the information to the client upon request. This still had it's problems because changes to the database or business logic had large ramifications to the whole codebase.

I guess you can trace it back to the Model View Controller (MVC) concepts that were introducted in SmallTalk. You basically divided your development into 3 "tiers".

The View was the user interface... it did not contain ANY code related to the business logic... That was contained in the "Model" which contained code related to the business logic and persistance of that information. The "Controller" managed the connections between the two.

This concept was embrased by many Object Oriented designers/developers as C++ became available and then Java.

Still there were problems... While the View was not tied to the Control or Business logic, the business logic was closely coupled to the database... So, you added another tier to the mix... the Persistance level. Now you had a Model that included your Business Objects and Business Logic, and then mapped your database to those business objects... That way your database could change without changing your business objects etc....

What we are moving towards, now is more a "Component" based architecture. We still have the Model View Controller and persistance levels. But now we have components like JMS and java-mail and EJBs and servlets and applets... What one does is develope an "interface" to your tier... That way, you can plug a component into that intercace and the tier doesn't really care how the information gets in or out....

Well... enough for this lecture...

good luck and hope this helps.

Stephen McConnell

About | Sitemap | Contact