Hi
I have been testing LLBL and I am not sure where exactly my automatically created Entity classes fit into a good n-layer scenario. I have read some good books on multi-tier architectural designs, like "Patterns of Enterprise Application Architecture", by Martin Fowler.
One of my questions would be if my Entity classes should be only DTOs (Data Access Objects), as described by Fowler. According to his definition of DTOs, these classes would only be containers of data, with their gets and sets. Within this concept, I would have to build my own custom business objects to deal with that data and leave the Entity classes created by LLBL unchanged, right?
For example, I create an Order business class which encapsulates my OrdersEntity class, with some methods for calculating delivery fees, etc. Inside this Orders class, I would have a reference to my OrdersEntity, FeesEntity, CustomerEntity, etc. Then, if I want some of the properties of the Orders exposed to clients, I would map them into the OrdersEntity class. This way, I would expose to clients only the properties I want.
How about my UI (a web page, por example)? It would have access to the OrdersEntity class as DTOs, right? Would that be risky, because I would expose some properties that maybe I wouldn't want?
I confess I am a little confused about how to set things up. For what I have read, it just doesn't seem correct that I simply start adding methods to my generated Entity classes...
I would like to hear from you guys what you have been doing...
Thanks!