views:

75

answers:

2

Hey,

Will Rails 3 be a modular framework like Merb or Ramaze?

By this I mean, can we use any persistence framework (DataMapper or Sequel) and jQuery in Rails 3 application (via the command line for example)?

Or the default stack (ActiveRecord, Prototype) is still enforced?

(Sorry, I'm pretty new to Ruby/Rails community).

Thanks.

+3  A: 

Rails 3 is much more modular than previous versions. Although it still defaults to ActiveRecord and Prototype, it has an ActiveModel API which means that ActiveRecord can be swapped out for a compatible ORM that implements the API.

Rails 3 also embraces the principles of Unobtrusive JavaScript and to this end the view helpers no longer output inline JavaScript mixed up with HTML. Instead, HTML5 data attributes are used and there are Prototype and jQuery "drivers" for hooking into those and adding behaviour to elements.

The whole ActionController stack is also much more modular enabling you to cherry pick just the parts you need and the common (non-HTTP specific) controller functionality is now shared by ActionMailer too.

John Topley
Please correct me if I'm wrong: ActiveModel is like JPA and ActiveRecord or DataMapper could be considered like Hibernate.
El Gusto
In conceptual terms, yes. ActiveModel is a specification for how a Rails 3-compatible ORM should behave. Any ORM that implements that specification can replace ActiveRecord.
John Topley
A: 

Rails merged with Merb in late 2008 and the result is Rails 3

http://yehudakatz.com/2008/12/23/rails-and-merb-merge/
http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3

cowboycoded