A good layering diagram:
In my asp.net mvc I skipped the service layer and the actions were marked with Spring.NET [Transaction] attributes.
After a response from Mark Pollack at Spring.NET I can see that this is probably not such a good idea. He mentioned instead of using the service layer
(ie. a transactional service layer, WCF, or web services). In my case, a transactional service layer would fit well.
That being said, my refactoring would be to move my calls to the Dao from the Controller->Actions into a service layer. This would provide a better separation of concerns as well as decouple the controller from the dao – allowing me to use another UI technology (ie. Silverlight, or WPF/WinForm) which would utilize the same service interfaces.
This picture is worth a 1000 words:
One question I have is the box ‘Domain objects’ – I know it’s not maybe the best approach, but I have used my POCO objects as my domain model.
This architecture would possibly require me to use a more ‘disconnected’ approach with NHibernate ?