Search code examples
jakarta-eearchitectureterminologyn-tier-architecture

What exactly is 2-Tier architecture?


I understand the 3-Tier architecture very well but not the 2-Tier architecture. I read lot about the differences and still I do not have a clear idea. In 2-Tier architecture,

A Comparison of Two and Three Tier Systems, says

Presentation is handled exclusively by the client, processing is split between client and server, and data is stored on and accessed via the server. The PC client assumes the bulk of responsibility for application (functionality) logic with respect to the processing component, while the database engine - with its attendant integrity checks, query capabilities and central repository functions - handles data intensive tasks.

So when we compare this with JSP/Servlet development, does this mean we do not use any Servlets and all the Server Side code is written in JSP itself using Scripting Elements? Which means we will only have JSPs in our application. Does data access code also written in the JSP? So then, is this the 2-Tier architecture? I want to compare it with JSP/Servlet development.


Solution

  • I suppose a very simple example of this would be a GUI application running on a PC talking to a remote database (2 workers = 2 tiers). There's no JSP because the GUI is doing everything the JSP would do (talk to the database, format the data, etc).