Reputation: 9861
I stumbled across Castle Active Record a few weeks ago and thought that it looked like an interesting solution to the laborious CRUD tasks associated with data driven applications. It seems pretty mature now and am considering using it for the data layer of an application I am developing, but I was wondering:
Upvotes: 2
Views: 4873
Reputation: 173
Personally, I think that Active Record pattern itself and the Castle's baby definitely have some advantages, like:
But there are also some disadvantages:
So in the end, it's a great framework to use with simple or medium complex projects. It's good for asp.net/winforms, doesn't matter. With pure NH, you will definitely have to code much more to make similiar application. But if you'll do it, you will be much happier. Because you'll be able to control everything.
As always, it's all up to your preference or project. For small, quick projects - AR is the way, for medium - I would say NH is THE way!
p.s. oh, by the way, AR makes exactly the same queries, so it's like using nh to talk to db. NH scales and so does castle. Just avoid 'n+1' problem and think about laziness and you should be good;P
p.s. listen to Mauricio Scheffer, he really knows what he' writing about.
Upvotes: 4