Steffen wrote:
> I think it depends on the application / website you want to build.
> For me and the applications I built with it, Ext JS and Rails have
> been the perfect combination.
> 
> Not sure what you mean with losing a lot of the magic of Rails.
> I'm not a fan of erb/haml, partials and rjs.
> The true magic for me in Rails lies in the model and controller level,
> and that part you obviously don't lose when using Ext JS.
> 
> Just my 2 cents.
> 
> Steffen
> http://www.extjswithrails.com
> http://spreadnotes.me


Thanks Stephen.

"losing a lot of the magic of Rails" implies unless we make sure JSON 
updates and gets follow the rails convention then a lot of magic that 
comes with controller/model is lost, since your UI code from ActionView 
Helper is completely lost.

For example, say with model nested attributes accepted in rails. Here 
the View Helper product input tags that when submitted the Controller 
can directly process it. Now when we use any JS library jQuery or YUI or 
ExtJS, we have to make sure that it follows the same convention in which 
Rails expects the format. If we follow the format, then it should be a 
lot less of a hassle since Rails magic is embedded from Rails View side 
in getting data to controller in the particular format.


The Data in JSON and the format in which Controller expects the Hash to 
come in.

Hence, steps are:
1. Make a standard rails app with specific rails ActionView  helpers 
like form_for
2. Note the Input format that controller needs for params.
3. Try not changing the format so you can use the same Model/controller. 
This comes in JSON format from the JavaScript library you are using.
4. Remove the ActionView helpers from Rails and replace with the 
JavaScript library.

Do you agree? I think that is what I am saying here and you are also:-)

Thanks.

-- 
Posted via http://www.ruby-forum.com/.

-- 
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.

Reply via email to