Search code examples
castle-activerecordcastle

Is ActiveRecord bad practice?


I'm starting a new project and i've recently found castle project activerecord, which seems like a GREAT solution, but at the same time, it looks like something realy unconventional. I was wondering, does this feeling comes from learning something new (and i should just get used to it) or is really bad practice?


Solution

  • ActiveRecord is a design pattern first named by Martin Fowler in Patterns of Enterprise Application Architectures. It is fairly common and used extensively in the popular Ruby framework Rails.

    It contrasts with the more usual style of development in the .Net world which is to use DAOs, and that perhaps explains why you're uneasy.

    A suggestion: read the source code for some Ruby on Rails applications which are similar to your own projects, and evaluate how you like the design style that results from heavy use of ActiveRecord.