• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About DAO

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am using oracle 9i ,Tomcat and Struts 1.1.
All the while I have been using Struts Datasource and I establish connection,write the query in the action form.

Please tell me the procedure to isolate the dtabase stuff from Action Form.

Thanks,
Bhuvana

[edited title -JM]
[ June 03, 2004: Message edited by: Jason Menard ]
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you read about the Data Access Object pattern?
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, how is JDO related to your situation?
 
Boon Subra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Sorry ,I meant DAO.

I am not very clear with the link .Could you support me with few others.

Thanks.
Bhuvana
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your problem is that you have database-related code in your Action classes, what is the solution? Move that database-related code somewhere else.

Basically, you can simply create a new class named DatabaseStuff and give it methods like createProductOrder(), findProducts(), etc. for each piece of JDBC code you have in your Action classes.

The DAO pattern is just a common solution for such restructuring.
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going to move this to the OOD forum, where you can likely receive better answers about the DAO pattern.
 
reply
    Bookmark Topic Watch Topic
  • New Topic