• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

how many layers in jpetstore application ?  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
vbala vmurugan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 1490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add POJO layer with DAO layer and ORM layer as Persistence layer.
 
vbala vmurugan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is POJO layer?
 
vbala vmurugan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends what is responsibility of that POJO.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!