# Full Ajax Application

**URL:** <https://www.ruby-forum.com/t/full-ajax-application/159665>\
**Category:** Rails\
**Created:** [February 6, 2009, 8:17pm UTC](https://www.ruby-forum.com/t/full-ajax-application/159665 "2009-02-06T20:17:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geekyra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Geekyra](https://www.ruby-forum.com/u/Geekyra)\
**Post date:** [February 6, 2009, 8:17pm UTC](https://www.ruby-forum.com/t/full-ajax-application/159665/1 "2009-02-06T20:17:41Z")

</div>

Hello, I’m a newbie here… please… can anyone help me about FULL  
AJAX ? for example if i’m scaffolding a simple model and controller  
for product which only have 1 field for NAME:STRING with the command :

script/generate scaffold Product name:string

and for the generated code I like to turn it into a full ajax app, for  
example if i’m click the NEW or EDIT link it will remotely call server  
and change the partial of my new empty div without refreshing the full  
page, and I think the view is only index.html.erb, so I like to make  
ajax magic only in one index view.

I already search a book about how to make In Place Editing, but the  
problem all the solution is just for In Place Editing for an old  
record not In Place Editing for a new record.

So please help me someone, cause i’m already stuck for about 2 weeks  
just how to figure this out in a clean and REST way…thanx

---

<div class="post-metadata">

**Author:** ![Geekyra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Geekyra](https://www.ruby-forum.com/u/Geekyra)\
**Post date:** [February 9, 2009, 2:54am UTC](https://www.ruby-forum.com/t/full-ajax-application/159665/2 "2009-02-09T02:54:36Z")

</div>

Geekyra wrote:

> Hello, I’m a newbie here… please… can anyone help me about FULL  
> AJAX ? for example if i’m scaffolding a simple model and controller  
> for product which only have 1 field for NAME:STRING with the command :

If I’m understanding you correctly then I would recommend you give up on  
this idea. Rails is a web application development framework, which does  
allow easily mix in of some AJAX. But, it is not designed to be a Rich  
Internet Application (RIA) framework.

Rails would be an excellent choice, however, to act as the back-end for  
a full-on AJAX RIA application that has been built using a framework  
designed for building them.

Here are a few frameworks I’m familiar with that provides this style of  
application:

> **[SproutCore](https://sproutcore.com/)**
>
> A framework for building fast, desktop caliber web applications.

[http://cappuccino.org/](http://cappuccino.org/)  
[http://www.adobe.com/products/flex/?promoid=BPDEQ](http://www.adobe.com/products/flex/?promoid=BPDEQ)

If I have misunderstood your question then feel free to disregard this  
answer.

---

<div class="post-metadata">

**Author:** ![Geekyra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Geekyra](https://www.ruby-forum.com/u/Geekyra)\
**Post date:** [February 9, 2009, 10:26am UTC](https://www.ruby-forum.com/t/full-ajax-application/159665/3 "2009-02-09T10:26:58Z")

</div>

AHH Robert u shoot me straight into my heart cos I’m already falling  
in love with RAILS :), but very - very thanks anyway cos u restrain me  
from finding and bugging another mailing list just to cover my ajax  
exhaustion. Ahh start to learning another framework anw and one more  
time thanks for the RIA sites suggestion

On Feb 9, 8:54 am, Robert W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Geekyra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Geekyra](https://www.ruby-forum.com/u/Geekyra)\
**Post date:** [February 10, 2009, 6:10am UTC](https://www.ruby-forum.com/t/full-ajax-application/159665/4 "2009-02-10T06:10:53Z")

</div>

Geekyra wrote:

> AHH Robert u shoot me straight into my heart cos I’m already falling  
> in love with RAILS :), but very - very thanks anyway cos u restrain me  
> from finding and bugging another mailing list just to cover my ajax  
> exhaustion. Ahh start to learning another framework anw and one more  
> time thanks for the RIA sites suggestion
> 
> On Feb 9, 8:54ï¿½am, Robert W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

I love Rails as well, and my post was not at all an attack on Rails. It  
just a matter of “the right tool for the right job.” Rails is built to  
design a certain type of application and is best used for that task.

It just sounded to me like you were looking for a full-on RIA  
application, and there are some really great frameworks out there for  
building those. Most of them, however, don’t really stand on their own.  
They need a back-end. They need something running on the server-side to  
take care of managing the application’s data. Rails would make an  
excellent choice to act as that server-side piece. Besides that it’s not  
likely that your entire web site will be built as an RIA. That may be  
just one small part of the larger site. Rails would also be an excellent  
choice for handling that which is outside the scope of the RIA.

---

<div class="post-metadata">

**Author:** ![Geekyra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Geekyra](https://www.ruby-forum.com/u/Geekyra)\
**Post date:** [February 10, 2009, 7:39am UTC](https://www.ruby-forum.com/t/full-ajax-application/159665/5 "2009-02-10T07:39:52Z")

</div>

I’m not looking for full RIA as well, cos ur right Rails is the best  
tool for back end and I really love the agile way. I’m just wan’t to  
make the client side run faster by partial refresh everything, why do  
we need to refresh whole page if what we wan’t to do is just refresh  
one single line of data ? My point is I just want to make Net app run  
faster for country who doesn’t have a good net connection (for example  
dial up 64kbps) who will suffer for waiting the whole page refreshing  
when they only want to update 1 line data.

Actually i have done a full ajax app in rails but i think i violent  
the rest way, for 7 rest route that rails provide I’m only using  
create and update using form\_remote\_for and destroy using  
link\_to\_remote. For new, edit, and show i’m using link\_to\_function  
(not link\_to\_remote) so the client doesn’t bother server at all, so  
actually I doesn’t have new, edit, and show method in controller,  
aren’t that breaking the REST way ?

And now i have some project that is a crazier ajax way 🙂 I just have  
one page (called it dashboard) that have 2 region left and right. On  
the left I want to put it all the navigation and link to the data and  
the right region is the view of data itself. So the point is everytime  
i i choose the navigation on the left dashboard it will replace the  
right dashboard with the data so I the view doesn’t refesh full page  
but only partial right region so It will run as fast as possible.  
After several trying i realized the javascript code is really  
complicated, so I just wan’t to know are there any easier way to do my  
problem ?

On Feb 10, 12:10 pm, Robert W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
