May 20

S#arp Architecture: first impressions

Posted in ASP.NET C#      Comments Off on S#arp Architecture: first impressions

Today I”ve finally got some time to take a look at Billy McCafferty”s S#arp Architecture. Comparing with the old NHibernate best practices project, I think it”s fair to say that there are several important improvements. For instance, there”s no longer a Load method that takes an instance and a property list which was used to pass an instance that would be used in filtering the entities loaded from the database. On the other hand, I”d still prefer to use Get instead of Load because I think that getting null when you try to load a non-existing entity is ok.

The base persistence classes have been modified, improving the integration with NHibernate. I”m still not sure on the GetDomainObjectSignature method (used to let you provide the business key), but I do think that the Equals method implementation is better than it used to be (again, it”s really complicated to implement Equals when you”re thinking in NHibernate, but it”s fair to say that Billy”s implementation looks good).

So, my first impressions are really positive and I”m officially recommending it to anyone working with NHibernate and ASP.NET (MVC).