Results 1 to 3 of 3

Thread: spring web and business layers interaction

  1. #1

    Default spring web and business layers interaction

    Hi,

    We have an MVC application. we're using DTO objects at web layer to collect and represent data on web forms. we also have a business layer, whose API is based on DOMAIN objects (not DTOs).
    Is there any mechanism(best-practice, sample) in springframework, to provide this kind of translation (between dtos and domain objects)?

    thank you , any comments welcome

  2. #2
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    Springs DataBinder tries to avoid DTOs by making it possible to bind directly onto you domain layer beans. That way there is ofcourse no need for DTO <-> domain object translation. However, in some cases DTOs are a necessary evol. ASAIK Spring doesn't have direct support for this kind of thing, but take a look at the BeanWrapper, which could help you build a translator.

    Erwin

  3. #3
    Join Date
    Aug 2004
    Location
    Hawaii, US
    Posts
    225

    Default

    This tool might help:

    http://dozer.sourceforge.net/

    Also, the adapter pattern might help here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •