SubSonic and Layering Issue!!

I have talked about DLINQ and layering issue and I think SubSonic also suffers from the same problem. I used SubSonic during the long weekend and found out that it has rich entity class modal which also does the work of calling the DAL layer. Now, the question is that how can you make your class library portable. If you export your class library as a DLL you will also need to include the SubSonic.dll which is fine. But what if you want the users of your library to make use of your methods and NOT the SubSonic methods. This is going to be trouble because users can trigger any method on any table and do whatever they want using the SubSonic library.

I like the approach of making the thin entity classes only containing the defination of the entity and creating managers or repositories to handle the functional operations like Get, GetById and stuff. The code generators and OR mappers are leading towards the RAD style without any concepts of layering. Off course you can handle this problem by copy pasting the code into the required managers but then in my opinion this is just too much work.

Print | posted @ Monday, November 26, 2007 6:09 AM

Twitter