|
|
|
|
|
||||
TutorialBeneath-the-Page Application Development with Rails
David Heinemeier Hansson
Fancy a one-way ticket to the programmer asylum? AJAX, as is commonly prescribed, passes raw data (in XML or JSON or what-have-you) back and forth between server and browser, with JavaScript handling all of the user-interface on the browser end. While some may have the JavaScript chops and patience to pull this off, it's a world of hurt haunted by repetition, DOM incompatibilities, poor debugging, and inadequate testing.
But there's a better way: Forget about all that pure data nonsense and pass the browser complete interface fragments generated in the language of your choice on the server side. Build your full scale web pages and user interfaces from the self-same code used to generate these AJAX UI components using Ruby on Rails and a little thing called "partials." Partials works like sub-routines for HTML and have their own local scope. It is the use of these partials that allows us to reuse the same HTML routines for both the initial render and subsequent AJAX updates. It's the partials that keeps you DRY ("Don't Repeat Yourself"). This is AJAX for the rest of us. (Of course masochistic rocket surgeons are welcome too!) |
Diamond SponsorsPlatinum SponsorsGold SponsorsSilver SponsorsMedia SponsorsIn-Kind Sponsors
Download the ETech Sponsor/Exhibitor Prospectus
|
||||||
|
O'Reilly Home | Privacy Policy
© 2007, O'Reilly Media, Inc. |
|||||||