Web tier consists of components such as servlets,JSP and buisiness tier consists of components such as EJB's.From functional point of view what is the main difference between web tier and Buisiness tier?Don't servlets/jsp deal with buisiness logic of an application?If so why Servlets,JSP and EJB's can't be included in single tier which can be buisiness tier?I am sorry if this question sounds silly.I have just begun to understand J2EE technology. Thanks Veena
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
The business and web tiers (or layers) are more of a logical separation instead physical separation. Therefore, is not really important what type of technology is used to implement each. What is important is that they are decoupled. For example, the business layer could consist of POJOs (Plain Old Java Objects) just as easily as it could consist of EJBs. Regardless, of whether you choose to use EJBs, POJOs, or Web Services, there are definite advantages to separating (or decoupling) your web layer from your business layer. In general, it is consider "bad form" to have business logic in the web layer. There are obviously cases where it doesn't really pay off to go thru all this trouble (read: extremely small one-off applications) but in general this separation is highly recommended. There are numerous OSS frameworks available to help us write properly layered web applications. I suggest you checkout the following: Struts, WebWork, and Spring. [ January 17, 2004: Message edited by: Chris Mathews ]
One rationale for separation of business & presentation components is that you can use one set of business components behind several different views. For example, I'm working with an application server now that has a web server client, a fat java client and a SOAP client. If we happen to slip up and put business logic in one presentation layer, we may well have to duplicate it in all three. Bad news. Here is a page I wrote up aboutarchitectural layering, and another about theDependency Inversion Principle that says the first one is sometimes backwards.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
subject: What is the difference between web tier and Buisiness tier?