Agile Web Development with Rails
Short Description
The trick when adding AJAX to an application is to take small steps. …. Although Rails makes AJAX incredibly simple, it can’t make it foolproof. And, …
Website: media.pragprog.com | Filesize: 531kb
Content
Extracted from:
Agile Web Development with Rails
Second Edition
This PDF file contains pages extracted from Agile Web Development with Rails, published by the
Pragmatic Bookshelf. For more information or to purchase a paperback or PDF copy, please visit
http://www.pragmaticprogrammer.com.
Note: This extract contains some colored text (particularly in code listing). This is available only in
online versions of the books. The printed versions are black and white. Pagination might vary
between the online and printer versions; the content is otherwise identical.
Copyright . 2007The Pragmatic Programmers, LLC.
All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means,
electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher.In this chapter, we’ll see
?using partial templates
?rendering into the page layout
?updating pages dynamically with AJAX and rjs
?highlighting changes with Script.aculo.us
?hiding and revealing DOM elements
?working when JavaScript is disabled
Chapter 9
Task D: Add a Dash of AJAX
Our customer wants us to add AJAX support to the store. But just what is
AJAX?
In the old days (up until a year or two ago), browsers were treated as really
dumb devices. When you wrote a browser-based application, you’d send stuff
down to the browser and then forget about that session. At some point, the
user would fill in some form fields or click a hyperlink, and your application
would get woken up by an incoming request. It would render a complete page
back to the user, and the whole tedious process would start afresh. That’s
exactly how our Depot application behaves so far.
But it turns out that browsers aren’t really that dumb (who knew?). They can
run code. Almost all browsers can run JavaScript (and the vast majority also
support Adobe’s Flash). And it turns out that the JavaScript in the…
Get the file Download here
Related Books:Related Searches: pragmatic programmers, agile web, rjs, online versions, incoming request
Comments
Leave a Reply