File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Tiers in J2EE framework 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 "Tiers in J2EE framework" Watch "Tiers in J2EE framework" New topic
Author

Tiers in J2EE framework

vikasids sharma
Ranch Hand

Joined: Aug 01, 2003
Posts: 157
please let me know the concept of TIERS in J2EE
Is it a logical boundary or a physical boundary between layers.
When i have webserver,application server and database server on same machine
Is it a single tier or three tier?
thanks
Vikas


Thanks
Vikas Sharma
SCJP(1.4)
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Vikasids
The tier model is the logical dividing of the three logical functions: presentation, business logic and data storage. Even when you are having it all on a single server, it will be possible to make a nice three tier model.
BR Jan
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
A tier is generally a logical boundary, but a physical boundary could exist as well. For example, my servlets and jsps may represent a web tier of my application. My EJBs representing my business logic are the 2nd tier, and my database is my third tier.
It doesn't really matter where my servers are running, you still have the logical separation of your code. If they are running on separate servers, then you have a physical boundary that maps to the logical boundary.


Matthew Phillips
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Q- Do Stored procedure and table data exist in different tier.?
I remember reading a article which tells me SP are in a different tier than the database data. SP is in data access tier and data is in data tier.


Groovy
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Physically you can't separate stored procedures and the data as both are located in the database server (stored procedures are "installed" into the database similarly as records are inserted). Logically, however, the stored procedures belong to the business logic layer (or, if you prefer separating even more, to the data access layer).


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
There are many ways to look at tiers or layering. I collected a few on my Logical View andArchitectural Layering pages.


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
vikasids sharma
Ranch Hand

Joined: Aug 01, 2003
Posts: 157
From the above clarifications can i make out one thing for sure that
Tier architecture expands from n tier to n+1 in both horizontal and vertical directions.
Lets say
We have 3 separate layers(tiers) for respective presentation , business and data base related data
case 1
if we break business layer in further two layers , we will call it n tier(3+1)solution.(vertical expansion)
case 2
if we add another layer horizontally to presentation, business and database , again we will call it n tier(3+1) solution.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tiers in J2EE framework