Pattern to manage tables?? DAO??

Discussions

EJB design: Pattern to manage tables?? DAO??

  1. Pattern to manage tables?? DAO?? (8 messages)

    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

    Threaded Messages (8)

  2. 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
  3. 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
  4. Hibernate[ Go to top ]

    Use Hibernate (hibernate.sourceforge.net) instead of straight JDBC.
  5. 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.
  6. SpringFramework, JDBC[ Go to top ]

    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/
  7. Re: SpringFramework, JDBC[ Go to top ]

    you can check spring tutorial at http://www.techfaq360.com/tutorial/spring/spring.jsp
  8. Re: SpringFramework, JDBC[ Go to top ]

    Hi, Some of good questions on Hibernate at http://hibernate-questions.weebly.com Thanks.
  9. hibernate help[ Go to top ]

    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!