This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes struts DAO layer and DTO objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "struts DAO layer and DTO objects" Watch "struts DAO layer and DTO objects" New topic
Author

struts DAO layer and DTO objects

manoj samarasinghe
Greenhorn

Joined: Nov 17, 2004
Posts: 16
Hi
For my STRUTS PROJECT....I have to connect to a database using DAOs.
I used two layerse called DAO (data access objects) and "service" layer where business logic is reside.i used DTO (datatarnsfer objects) for transfer data from frountend to backend.

later i add another layer between frount and service layer called delegate layer to redue coupling.

Actions-->delegate--> service-->DAO

my problom is what kind of methods i have to use in these layerse.
do i have to use more specific methods at delegate layer, and fewer and 'more general' ones at the DAO or othr way round?


manojmanoj
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

Moving to the ORM forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
john guthrie
Ranch Hand

Joined: Aug 05, 2002
Posts: 124
my rule of thumb is that it gets more specific the further you get from the persistence layer. so the DAO layer might have a getAllWidgets() method, and the service layer have getAllGreenWidgets() and getAllRedWidgets(). the delegate layer shouldn't have any finer granularity than the service layer,it's job is to just, er, delegate, yes?
 
Consider Paul's rocket mass heater.
 
subject: struts DAO layer and DTO objects
 
Similar Threads
struts DAO layer and DTO objects
Implementing Patterns
DAO with Struts doubt
Domain Objects and Service Oriented Design Pattern
About patterns