Recently I tried CodeSmith templates for NHibernate. As many of you might watched, there is a video explaining how to create a Petshop.Data using these templates. My question is what is the correct architecture in this approach? Should we have a BLL (or Services) layer to interact with this Petshop.Data or directly call ManagerFactory in our presentation layer? Also should our presentation layer be unaware of Business Objects in our Petshop.Data and shoud we have Business Entities in BLL again?
+1
A:
I would say that a presentation layer can be aware of your Business Objects, but should not be aware of how they get populated from the database (but NHibernate takes care of that for you anyways). If you do use a Service Layer it gives you one more point of flexibility/control. I always use one.
tyndall
2008-11-17 00:18:33
+1
A:
Hello, I have had a similar experience with CodeSmith. Here's a blog entry I made: http://hypertrends.com/Blog/post/2008/12/15/CodeSmith-to-create-NHibernate-Mappings-Honest-Thoughts.aspx
+2
A:
Hello,
Please feel free to address these issues in our community site and on our template bug tracker. We take all feedback seriously and look over it daily.
Thanks -Blake Niemyjski
Blake Niemyjski
2010-06-22 17:38:41