alessandro
alessandro

Reputation: 1721

Three Tier Architecture Issue

I have read some web articles about Three-Tier Architecture. However, I am little bit confused with those. Can anybody help me what are those tiers exactly does (I have confusion with Business Logic tier mainly). For example, take Shopping Cart example, where .jsp page, takes user order, submit it to servlet which does some operation (example calculates total money of the items ordered) and submit it to the stateful EJB for further calculation (for example user may modify items ordered, another time). Now, .jsp page is in web tier and stateful EJB is on business logic tier. However, is the servlet is on web tier or in business logic tier?

Upvotes: 3

Views: 208

Answers (2)

Ravindra Gullapalli
Ravindra Gullapalli

Reputation: 9158

Servlet is on web tier. Actually you should move the calculation of total money of the items order to the EJB from the sevlet.

Upvotes: 2

Dave Newton
Dave Newton

Reputation: 160170

Clearly servlets aren't part of the business layer: they're the interface between a web client and the business layer. In a nutshell, the business layer is an internal, domain-specific representation. Other layers interact with that layer--you might also have an RPC layer, a CLI, etc. that interact with the application core.

Upvotes: 3

Related Questions