On Tuesday 16 August 2005 6:14 pm, Scott Ellsworth wrote:

> > Doing this on paper is a hassle, but with a Ajax powered Ruby web app,
> > it's fast and easy.  Select a project and an employee, and a box comes up
> > to enter start time and scheduled hours.  Enter those, and it pops up in
> > the schedule grid.  Click on a box in the grid, and a form opens up to
> > enter the information for that guy/project/day.  Edit or delete the
> > information, and the changes go out to the grid.
>
> This sounds really keen.  Two questions:
>
> Is the representation of Rails and AJAX at
> <http://www.onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html> fair?
> It seems amazingly straightforward to do, which always pushes my doubt
> buttons.

I really have no idea as I'm not a Rails user.  It is really the rest of what 
you want to do with the data and the rest of the DOM manipulations to get the 
effects that you want that are the hard part.  Throwing data back and forth 
with xmlhttprequest and some supporting library is the easy part.

> Is the above URL the best place to start when trying to learn how to use
> AJAX with Rails?

Again, I have no idea on this.  For Rails, there is a mailing list as well as 
the #rubyonrails channel on freenode.net.

> (I have a budget app I have been meaning to write that needs a similar
> grid structure.)

As I said, the ajax parts shouldn't be hard.  Much trickier are issues like 
inserting new rows into the table or keeping track of which grid element you 
are editing data for so that you can make sure your updates go back to the 
right places.  Once you get that ironed out, though, the rest of it should 
come together easily.


Kirk Haines