-
Aug 27th, 2005, 06:24 AM
#1
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
-
Aug 27th, 2005, 06:59 AM
#2
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
-
Aug 28th, 2005, 03:33 PM
#3
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
-
Forum Rules