aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes What is the difference between web tier and Buisiness tier? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "What is the difference between web tier and Buisiness tier?" Watch "What is the difference between web tier and Buisiness tier?" New topic
Author

What is the difference between web tier and Buisiness tier?

Veena Pointi
Ranch Hand

Joined: Jun 20, 2002
Posts: 442
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


SCJP1.4
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
*Winston Churchill
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
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 ]
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
Originally posted by Chris Mathews:
For example, the business layer could consist of POJOs (Plain Old Java Objects) just as easily as it could consist of EJBs.

Cheers Chris,
For expanding POJOs...Finally I understood what POJOs are!...Before, I thought they were some kind of alien web frameworks!
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the difference between web tier and Buisiness tier?
 
Similar Threads
In which tier should servlets be ?
JSP and Servlet
JSP and Servlets
Difference Middleware and MiddleTier
JSP and Servlets