"A solid architectural foundation for rapidly building maintainable web applications leveraging the ASP.NET MVC framework with NHibernate."
I've just followed the 'Tutorial for Developing with S#arp Architecture' and picked out the following juicy bits:
- Use the Check.Require utility to enforce non null parameters (I was intending to use the Microsoft Research Code Contracts in my next project for this same purpose, but no need when this functionality is wrapped up in the S#arp Architecture)
- Inheriting from SharpArch.Core.DomainModel.Entity and adding the [DomainSignature] attribute provides default consistent behaviour for Equals() and GetHashCode(). Also use of protected set to prevent changes to the domain signature (simple I know but often forgotten!)
- Use of Fluent NHibernate Auto Mapping to automatically map entities based on conventions (should I keep with NHibernate rather than move to the improved ADO.NET Entity Framework?)
- Keeping interfaces separate from the implementation details in a different assembly with the Separated Interface pattern
- Testing against an in-memory SQLite database for performance improvements
No comments:
Post a Comment