Hi People,
This subject comes up fairly often with LLBLGEN pro. I'm having troubles layering my application, currently it works fine but I'm not 100% happy with it.
Here is what I currently have
Web Application (CS.WEB) (PL)
\
Business Layer (CS.BusinessLogicLayer) (BLL)
\
Generic Data Access (CS.DataAccessLayer) (DL)
\
Specific Data Access Layer (CS.DataAccessLayer.Specfic)
In the business Layer I have a set businessManagerObjects that uses the manager template from CVS with some custom extras, an exception class and validation class for each manager plus a logging framework based on log4net.
This problem is the fact the Entities generated have to be access from the web layer and the business layer (so the go across layers ). Ideally I want them to exist in the business layer and the web have no idea about the LLBLGEN Entities.
The Solutions I have come up with are:
- Combine the Business Layer with the DAL layer. (Doesn’t really help)
- Create a set of classes that inherit from each entity LLBLGen entity class generated and use those in the Web Layer and Business Layer (Not sure if its actually possible?)
- Create some sort of intermediate object (using the DTO pattern) (A lot of work for little gain)
- Or move the entity classes into the BL by editing the templates.
So anyone tried any of these solutions and how did they work out for you? Any other suggestions?
Sorry if it is confusing.
Thanks!
Maxus