B
B
Boffo2011-09-02 14:45:17
Ruby on Rails
Boffo, 2011-09-02 14:45:17

Is it possible to make a completely AJAX application on Rails

And will there be any sense in using it (Rails), in particular, will it be possible to use favorite gems, which are often not designed for dynamics. In addition, routing and structure should also be radically different. Or with several controllers that will combine many models.
Maybe someone wrote something similar. I don’t think Twitter can be taken as an example, there is probably little left of the rails.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
sl_bug, 2011-09-02
@Boffo

And how should it be fundamentally different?


respond_to |format| do
  format.html{} #без AJAX template.html.erb
  format.js{} #AJAX template.js.erb
end

for example this option.

G
Gosha Arinich, 2011-09-02
@goshakkk_reborn

image
Look towards Backbone.js BTW + a book about how to make friends with it and rails - Backbone.js on Rails , you can also see its contents and a couple of pages from the book. (Access to the book, by the way, is interestingly organized - after the purchase, the Thoughtbot organization is added to the group of readers of this book on github, the source code of the book + HTML/PDF/ePub/mobi is in a private repository available to members of this group)

V
Vladimir Chernyshev, 2011-09-02
@VolCh

In my opinion, it’s even easier to make it than non-Ajax, when really one controller method should pull out a bunch of models for templates and layouts (if you stick to true MVC and don’t call other controllers in templates, let alone models) - you don’t need a bunch of heterogeneous pull out models with one http request, for one model (or for one collection of homogeneous models) - one request. There will be some overhead, of course, but there will be a clear and understandable code, both on the client and on the server (and on the server it’s also primitive, it can only be complicated in the model).

A
akzhan, 2011-09-02
@akzhan

AJAX is closely related to REST. There is nothing easier than writing normal REST applications on Rails (map resources). github.com/steffen/extjswithrails.restful.sample/
By the way, there are also a bunch of simplifiers - netzke.org/

N
nixmale, 2011-09-02
@nixmale

A fully AJAX based application can be made in many languages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question