Full Ajax Application

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

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:

http://cappuccino.org/
http://www.adobe.com/products/flex/?promoid=BPDEQ

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

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. [email protected]

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. [email protected]

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.

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 :slight_smile: 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. [email protected]