Hello
I'm looking for some pattern that can encapsulate all the access to a RDMBS tables, now i'm using DAO with and abstract factory but this mean that if I want to persists some object the implementation of this DAO needs to know the exactly SQL string to manage this.. So there is some pattern that could be more flexible in the way that only I call with the parameters, the type of operation (insert, update, delete,..) and the name of the table and it can made the operation???
Is this a problem of JDBC and not a pattern?? is this a hard coded library?? some ideas to manage this??
Thanks in advance
Mauricio
-
Pattern to manage tables?? DAO?? (8 messages)
- Posted by: Mauricio Alarcon
- Posted on: July 03 2003 12:32 EDT
Threaded Messages (8)
- Pattern to manage tables?? DAO?? by Sean Sullivan on July 03 2003 21:41 EDT
- Thanks, Solution with Abstract factory and Command pattern by Mauricio Alarcon on July 04 2003 17:41 EDT
- Pattern to manage tables?? DAO?? by Brian Chan on July 04 2003 11:55 EDT
- SpringFramework, JDBC by Sean Sullivan on August 26 2003 18:54 EDT
- Re: SpringFramework, JDBC by satya das on July 07 2008 06:46 EDT
- Re: SpringFramework, JDBC by guddu sk on December 29 2008 08:09 EST
- Re: SpringFramework, JDBC by satya das on July 07 2008 06:46 EDT
- hibernate help by Ria K on March 04 2007 21:40 EST
-
Pattern to manage tables?? DAO??[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: July 03 2003 21:41 EDT
- in response to Mauricio Alarcon
http://jinx.swiki.net/282
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
http://java.sun.com/blueprints/patterns/j2ee_patterns/data_access_object/
http://java.sun.com/blueprints/patterns/DAO.html
see pages 390 to 407 in the book "Core J2EE Patterns" - http://www.phptr.com/corej2eepatterns
http://www.javaworld.com/javaworld/jw-03-2002/jw-0301-dao_p.html
http://www.rollerweblogger.org/page/roller/20021126
http://www.theserverside.com/home/thread.jsp?thread_id=14890
http://www.jguru.com/forums/view.jsp?EID=1002013
http://access1.sun.com/codesamples/DataAccessObject.html
http://www.amberarcher.org/products/san_jacinto/apidocs/org/amberarcher/j2ee/core/pattern/DataAccessObject.html
http://www.agiledata.org/essays/implementationStrategies.html#StrategyDataAccessObjects
http://www.ibatis.com/common/common.html
read Chapter 4 in "Enterprise JavaBeans Component Architecture: Designing and Coding Enterprise Applications" - http://www.asgteach.com/books/enterprise_java_beans.htm
com.ibatis.db.dao package in http://sourceforge.net/projects/ibatisdb
http://jingdao.sourceforge.net/
Benefits of DAO in a J2EE application: http://www.codefutures.com/firestorm/benefits/
http://www.codefutures.com/firestorm/
http://www.oop-reserch.com/simple_dao.html
http://www.recital.com/products_dao.htm
presentation from JavaOne 2001: http://java.sun.com/javaone/javaone2001/pdfs/2399.pdf
DAO discussion: http://www.mail-archive.com/users at avalon dot apache dot org/msg00164.html -
Thanks, Solution with Abstract factory and Command pattern[ Go to top ]
- Posted by: Mauricio Alarcon
- Posted on: July 04 2003 17:41 EDT
- in response to Sean Sullivan
Thanks for your soon replay, I read somthing about you send me and desing a solution based on a Abstract Factory pattern that factory's some command like Selec Insert, etc. so in this way I can do the effect, No wI 'm try to generate another Abstract Factory that create for me the particualr DAO over the tables.
Thnaks Again
Mauricio -
Hibernate[ Go to top ]
- Posted by: Em Huynh
- Posted on: July 10 2003 20:45 EDT
- in response to Mauricio Alarcon
Use Hibernate (hibernate.sourceforge.net) instead of straight JDBC. -
Pattern to manage tables?? DAO??[ Go to top ]
- Posted by: Brian Chan
- Posted on: July 04 2003 11:55 EDT
- in response to Mauricio Alarcon
You can follow the command patterns. I believe this is discussed in the EJB desgin patterns book available at this website. Basically your class implements an interface with an execute method and maybe some method to set your parameters etc. -
SpringFramework, JDBC[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: August 26 2003 18:54 EDT
- in response to Mauricio Alarcon
If you are looking for a JDBC abstraction layer, look at the
Spring Framework, http://www.springframework.org/
If you want to see example DAO code, visit
http://daoexamples.sourceforge.net/ -
Re: SpringFramework, JDBC[ Go to top ]
- Posted by: satya das
- Posted on: July 07 2008 06:46 EDT
- in response to Sean Sullivan
you can check spring tutorial at http://www.techfaq360.com/tutorial/spring/spring.jsp -
Re: SpringFramework, JDBC[ Go to top ]
- Posted by: guddu sk
- Posted on: December 29 2008 08:09 EST
- in response to satya das
Hi, Some of good questions on Hibernate at http://hibernate-questions.weebly.com Thanks. -
hibernate help[ Go to top ]
- Posted by: Ria K
- Posted on: March 04 2007 21:40 EST
- in response to Mauricio Alarcon
hi i am new to hibernate and also discussion of theserverside. Can anyone pls help me to solve my doubts? Actully I have to develop a standalone application, so hibernate is a good choice or not for that? Thanks!