samedi 28 février 2015

Object in Business layer same as DTO with logic?

Let's say I have a Spring MVC project, in which I'm using DTO to get data from a database and to pass data to the UI. Let's suppose that I have a UserDTO and in my business layer I have to do something with that, but I need to put logic in the User and the DTO pattern says that no logic is allowed (or just simple logic).


Should I transform this UserDTO to a User object in order to have the logic and then make a UserDTO to give it to the UI? Or just use the UserDTO and process it in the business layer?


May a BO help?


Thanks


Aucun commentaire:

Enregistrer un commentaire