Subsonic Vs NHibernate

Dan picture Dan · Aug 4, 2008 · Viewed 15k times · Source

What is the concensus on when to use one of these tools adversed to the other? I find Subsonic very useful in terms of getting things done quickly, but on large projects it tends not to scale, and its ties your domain model to your database model. That is where Nhibernate comes in as it gives you lightweight POCOs that are unrelated to your database model, but the setup time is much longer.

Answer

user1151 picture user1151 · Sep 12, 2008

I get asked this question a lot and really it comes down to how much you want to fiddle. I can't tell you how damaging Chris Cyvas's comments RE SubSonic scaling have been - and I've been responding to these ever since :(.

The deal is - perf-wise, SubSonic scales very nicely. In terms of project growth - ANY tool you use will require your attention. Even NHibernate.

I wrote a post on how to use the Repository pattern with DI (as you would with NHIb or any tool for that matter) with SubSonic 2.1:

http://blog.wekeroad.com/blog/subsonic-writing-decoupled-testable-code-with-subsonic-2-1/

I also wrote a post on the performance of SubSOnic:

http://blog.wekeroad.com/blog/subsonic-scaling/

Hope this helps.