Originally posted by Joe Gliniecki:
I created a very basic FrontController. Would the command objects of the FrontController be considered to be on the presentation side?
I also created a class that has course grained methods for calling the domain (similar to what a lot of literature calls a facade). Would this class be considered part of the domain?
Is it standard practice to have separate Data Transfer Objects so that the domain doesn't creep into the presentation layer?
Originally posted by Joe Gliniecki:
Does the DTO typically hold data formatted for the JSP? For example, if the domain object uses a boolean for a value, but we would like to present Yes/No to the user. Should the DTO hold a string, and the assembler that converts from domain to DTO change the boolean to a string? Or would there be code in the DTO itself to do this? Or just do it on the JSP with a custom tag?
Originally posted by Joe Gliniecki:
Does the DTO typically hold data formatted for the JSP?
Also, it seems to me that the domain object would be the place to have validation code (ie: required fields have values before creating an object).
Is there a commonplace and accepted way to return error messages
Lastly, are there naming conventions for the things we've been discussing? If I'm dealing with a Title class in my domain, would it be TitleDAO, TitleDTO, TitleFacade?
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |