File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes how many layers in jpetstore application ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "how many layers in jpetstore application ?" Watch "how many layers in jpetstore application ?" New topic
Author

how many layers in jpetstore application ?

vbala vmurugan
Greenhorn

Joined: Jun 20, 2008
Posts: 10
i run jpetstore spring mvc application, i have doubt, that is how many layers it have ?. it has view, controller, service, bo,dao,persistance layer,and data base
I want to know, how request is processed ? from browser to database hit . How many layers involved?
I think following layers involved please clarify

1a) Presentation Layer (Spring mvc)
b) Business Service Layer (Spring POJOs)
c) DAO Layer (Hibernate DAO Classes of Spring)
d) ORM Layer (Hibernate)
e) Database
Edit/Delete Message
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
vbala vmurugan wrote:
I think following layers involved please clarify

1a) Presentation Layer (Struts)
b) Business Service Layer (Spring POJOs)
c) DAO Layer (Hibernate DAO Classes of Spring)
d) ORM Layer (Hibernate)
e) Database

c, d, e can be grouped as Persistence Layer.


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
vbala vmurugan
Greenhorn

Joined: Jun 20, 2008
Posts: 10
thank you for your kind replay.
jpetstore application has just 3 layers. i am corret ?

1) PRESENTATION LAYER

a) View (jsp)
b) Validators
c) FormBeans
d) Controllers

2) BUSSINESS LAYER

a) Transactions
b) Services with interfaces -
c) Data transfer object

3) PERSISTANCE LAYER

a) DAO Layer (Hibernate DAO Classes of Spring)
b) ORM Layer (Hibernate)
c) Database

please clarify
regards
bala
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
vbala vmurugan wrote:
1) PRESENTATION LAYER

a) View (jsp)
b) Validators
c) FormBeans
d) Controllers

Validators are not in Presentation layer, you can use validators in other layers as well.

I never read jpetstore source code, so I couldn't tell how many layers it has.
I think Validators should be in Business Layer.
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
You can add POJO layer with DAO layer and ORM layer as Persistence layer.
vbala vmurugan
Greenhorn

Joined: Jun 20, 2008
Posts: 10
thank you for your kind replay.

1) PRESENTATION LAYER

a) View (jsp)
b) FormBeans
c) Controllers

2) BUSSINESS LAYER

a) Transactions
b) Services with interfaces -
c) Data transfer object
d) Validators

3) PERSISTANCE LAYER

a) DAO (Hibernate DAO Classes of Spring)
b) ORM (Hibernate)
c) Database
d) POJO layer

is it correct now ? please clarify
regards
bala
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
What is POJO layer?
vbala vmurugan
Greenhorn

Joined: Jun 20, 2008
Posts: 10
vbala vmurugan wrote:thank you for your kind replay.
sorry pojo is not layer
1) PRESENTATION LAYER

a) View (jsp)
b) FormBeans
c) Controllers

2) BUSSINESS LAYER

a) Transactions
b) Services with interfaces -
c) Data transfer object
d) Validators

3) PERSISTANCE LAYER

a) DAO (Hibernate DAO Classes of Spring)
b) ORM (Hibernate)
c) Database
d) POJO

is it correct now ? please clarify
regards
bala
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
It depends what is responsibility of that POJO.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how many layers in jpetstore application ?
 
Similar Threads
MVC example or tutorial
DAO Implementation & Hibernate
Is domain model object passing between layers overhead?
Understanding DI
Spring Hibernate Transaction 2