design pattern

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nehamaru
    New Member
    • Jul 2007
    • 12

    #1

    design pattern

    right now i learning desing pattern , my problem is which j2ee design pattern is eliminate SQL exsposure ,because in my project i want to eliminate SQL exsposure please help me find out this . i learn data access object is it true ??
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by nehamaru
    right now i learning desing pattern , my problem is which j2ee design pattern is eliminate SQL exsposure ,because in my project i want to eliminate SQL exsposure please help me find out this . i learn data access object is it true ??
    Quite an old way of doing this is to create a 'DAO layer', i.e. a layer of Data
    Access Objects. Those DAOs handle the dirty SQL job and all the other objects
    just work with those DAOs. Often a DAO creates and accepts DTOs (Data
    Transfer Objects) that represent the actual data you want to store and/or
    retrieve.

    Don't make the mistake that a single DTO has to represent a single row in a
    single table/view.

    This scenario has been automated sometimes into an ORM (Object Relational
    Mapper) that can take care of it all. EJB 1.0, 1.2, 2.0 used this technology.

    Nowadays 'mapping less' technologies exist that take away all those intermediate
    (and slowing down) mapping layers; that technology is beyond tradional relational
    database management systems though. When solid object oriented databases
    see the light (and they're (almost) born already) all that mapping crap will be
    history, legacy and folklore. Finally because its all so 1980s

    kind regards,

    Jos

    Comment

    Working...