Oren posted about seeking the right dependency level in an application's data tier. Go read it.
As I see it, what he's observing reflects the essential difference between a service and a framework. A service, like a Data Access Object, can usually be wrapped or replaced easily because it doesn't change how you structure your application. A service just sits on the side-lines waiting to be called into action. A framework, like NHibernate, is very different. A framework wants to be a layer that sits underneath your application and empowers it to do wondrous things.
[I'm sure someone can come up with a crazy sports analogy here...]
Rule of thumb: Don't ever try to put a framework in a box unless portability really is your primary concern (rather than some favourite faery tale). If you find you need to do that then quite probably you need to revisit your assumptions or find/build a little service on the side instead.
No comments:
Post a Comment