New site built using Ruby on Rails

In article <200508161838.26327.khaines@enigo.com>,

···

Kirk Haines <khaines@enigo.com> wrote:

On Tuesday 16 August 2005 6:14 pm, Scott Ellsworth wrote:
>
> This sounds really keen. Two questions:

[answers]

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.

Thanks, Kirk. Hopefully, I will get a chance to play with this over the
coming week.

Scott

--
Scott Ellsworth
scott@alodar.nospam.com
Java and database consulting for the life sciences

For the most part, implementing Ajax in Rails is very easy. The hard part (IMHO) is manipulating the DOM,
styling with CSS, implementing nifty JS code, etc. What Rails does, is take care of the server-side burden
such that you have time to think about the UI. In most J2EE projects, I'm happy if the server side works, and
don't have time to make a fancy UI.

One thing that bites you with Ajax is the back button. If you manipulate the DOM, then go to a new page and
use the back button to come back, the browser will render the _original_ HTML - all your DOM manipulations
are lost. This will confuse your user so you need to take special care - for instance GMail uses a frame-based
approach s.t they can store state in one of the frames; whereas palmsphere.com elected to initiate an ajax
request onload to retrieve the current state and then re-render the DOM.

--Dave.

···

On 16-Aug-05, at 8:37 PM, Kirk Haines wrote:

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&gt; 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

Kirk Haines wrote:

I wonder if one could embed a set of links into a page that are essentially there exclusively for spiders to find? i.e. in your JS heavy, AJAX heavy page, they are completely hidden from a normal user's view, but to a spider walking the page content, they see them?

Through CSS, we have display:none and visibility:hidden (which is invisible, but affects flow). There are probably other tricks I don't know about.

Devin