jSON vs Component: It depends on what you want to do with the generated grid. If you need to munge the data to put it into a grid (i.e. dates, timespan) for display purposes, it is sometimes handy to have the raw json object around so that you dont have to do a whole lot of un-munging in JS to get at the data. It also depends on where alot of your UI logic is. rails traditionally has alot of contoller logic on the server side. I have gone down the route of having a more structured JS application, where I need to massage the data more, the server being fairly dumb (i.e. outputting json from DB mostly).
On 6/14/06, Thomas Atwood <[EMAIL PROTECTED]> wrote:
Has anyone used an AJAX data grid with Rails? I am rebuilding a copy of the venture source web site as a first ruby/ rails exercise. If anyone has used a javascript data grid with Rails, I would appreciate sample code, or notes on your experience. The controller action would presumably communicate with the data grid component running on the browser by extracting data from a relational DBMS into a model, and then serializing that into XML or JSON which the Javascript component could import. However, if there was a way of bypassing the generation of an intermediate XML | JSON representation, by injecting data into a rails-compatible server-side component that sent the entire grid component (preloaded with data from the rails model) as javascript to the client, that might be simpler. _______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
