开发者

Ruby on Rails and Domain Driven Development

开发者 https://www.devze.com 2023-01-03 12:25 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消