none
domain object model and DTO design consideration RRS feed

  • Question

  •  

    Hello,

     

    i have a question regarding the usage of DOM(Domain object model) vs DTO (Data Transfer object) in presentation layer in a typical n tier application.

     

    Options:

    1) should we use DOM to pass data from DAL (Data Access Layer) to Business layer and then to presentation layer

    2) should we create light wieght DTOs instead

     

    as i see,

     

    Merits of 1)

    a) no extra overhead in designing a seperate DTO class layer and implement code to copy data btw DOM and DTO

     

    Demerits of 1)

    a) exposing business layer methods in the presentation layer

    b) in case of distributed deployment, performance overhead of serialization of heavy DOM object

    c) some sort of additional coupling btw presentaion layer and business layer is being introduced

     

    I would really appreciate your thoughts on what you think is the best approach.

     

    thanks in advance,

    Venkat

     

     

    Thursday, January 15, 2009 8:31 PM