On Thu, May 27, 2010 at 8:01 AM, Alexandru Nedelcu <[email protected]> wrote: > I'm a Django/Catalyst user that's evaluating Rails ... I need a Ruby > framework, and I'm trying to see if learning Rails is worth it or I > should just go for Sinatra + various libs available. > > Django has a couple of things I like ... > > 1) the Forms API > > In Django I like that it's being decoupled from models ... form > objects have fields with validation rules that also can contain html > rendering logic ... you can use them just to validate a request and > that validation can contain business rules that don't make sense to > have in the actual models. But the forms API can also infer those > validation rules straight from models, so you have DRY. > > Looking at Rails tutorials I can't find this decoupling. Validation > rules are placed straight into models ... like > "validates_confirmation_of :password".
I don't know anything about Django, and I don't really understand what you are trying to do. Business logic is meant to be "straight into models". > So I was wondering about Rails3 ... seeing there's a new ActiveModel > abstraction of the ActiveRecord interface, can I use that to have the > desired effect? No. With this abstraction, validations are available for non ActiveRecord models, but the validations still have to be in the model. > Also, where can I find some good and up to date tutorials on Rails3 ? http://edgeguides.rubyonrails.org Not sure the guides are all up to date though. > 2) ORM lazyness > > I like that Django's ORM and in DBIx::Class, the resultsets > constructed are lazy. I see that in Rails 3 there's a new Query > API ... http://m.onkey.org/2010/1/22/active-record-query-interface > > Is that ready for use, is it development? > Or should I just use something like Sequel ... can that be plugged-in > to Rails? There is no stable release of Rails 3 yet, as we are still at beta 3. But this new API is very much ready for use. -- Gael Muller -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

