Ruby on Rails and Domain Driven Development
As I know ruby on rails are using Active Record with table per class strategy.
I wonder if it possible to use Rails in domain driven design style, which 开发者_C百科require ORM which has more level of abstraction of data model, such as NHibernate.
Best regards, Alexey Zakharov
You might want to check out http://datamapper.org/
It works with Ruby and Ruby on Rails, and has support for replacing ActiveRecord in Rails 3 here: http://github.com/datamapper/dm-rails
The domain its business logic and data access is all apart of rails's model pattern it should be possible to add extra layers and object types to separate this to achieve DDD, however, rails purists may not like it but they don't have to use it that's the beauty of rails been modular. People have already experimented with logical/physical models and presenters/conductors to decouple certain aspects of models in rails.
精彩评论