Howdy,
I’ve been playing around with the ORM code generation, after a bit of tinkering I had a fully functional DAL… with one problem. No separation of data tier components from presentation tier (in theory).
The business objects are generated within the DAL. I could change them to another package, but that would require a fair bit of reworking (and could be fraught with mistakes).
Developing in .NET is new for me (many years of Java development). But from my understanding the tiered architecture is the same as Java.
Is there a way to define custom business objects that interact with the ORM generated DAL within the designer? If that was the case then instead of assigning variables to the DAL object, the DAL could just be passed a business object with all the values preset. This would also be true for the reverse, retrieving objects from the DAL would return a business object. This would provide for clear separation of data access logic and presentation logic.
Using custom business objects would also allow them to extend the IList and/or IComponent Interfaces, therefore allow them to be data sources for web components (or windows components).
If one (or all) of the current generation methods provide for a design patter that allows seperation of business logic I would love an example. Or if anyone has come up with a solution that they have used to get around the problem of the DAL class (not the *factory/*dao or the *criteria) be visible to other layer could they please let me know how.
Another question? Are the generation templates available for customization?
I hope this all makes sense. It almost feels like I have got this all wrong.
The code I generated was with Factory and DAO, I have since looked at POJO and found that this is better suited to seperation of business objects from data access. I would still like to be able to modify the templates to customise the business objects (if needed)
Cheers
Q