Miscellaneous Reviews

  Home arrow Miscellaneous Reviews arrow AJAX Patterns And Best Practices
MISCELLANEOUS REVIEWS

AJAX Patterns And Best Practices
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2006-03-26

    Table of Contents:

     
     

    SEARCH CODEWALKERS

    AJAX Patterns And Best Practices
    By: Christian Gross
    Published by Apress

    "AJAX Patterns And Best Practices" is a theory and strategy book for AJAX. For the uninitiated, AJAX stands for Asynchronous Javascript and XML. In short, it's the technology behind Web 2.0. New data is fetched from the server and/or presented dynamically through client side Javascript that calls server side sources, commonly XML. Instead of refreshing the entire page, individual elements are changed based on user input and new data pulled from the server. Many sites use AJAX: Google Maps, Gmail, Flickr, Digg. Javascript is nothing new, nor is using it to refresh page elements (I think I made my first JS rollover in 1996). Is combining venerable technologies (Javascript and XML) a case of the Emperor's New Clothes? The level of interaction and sophistication makes AJAX a force to be reckoned with. Because of that, it's essential to have a book that covers the underpinnings of this technology.

    By : Mike DeWolfe

    After the introduction, the book gets into the nuts and bolts of AJAX in Chapter 2. AJAX isn't a programming language: it's a concept. Because of that its essential to get the level of depth that this book delivers-- otherwise you'd be coding by rote. At the core of AJAX is the XMLHttpRequest object and this book gets into the nitty-gritty of the associated methods and properties. In that need for depth I have two criticisms. First, in key areas this book gets vague. At the core of the AJAX code covered in this book is the "factory.js" script. Instead of including the code or a direct reference to the code, the author suggests that you do a Google search to find the same. In defense of the book, the source code on the Apress site includes an example of this code. While AJAX can call on any XML data source, browsers can only launch HTML DOM changing code from the same domain as the page: anything else is a cross-site script, an XSS exploit. There are strategies for workaround but they are only alluded to. A huge aspect of powerful AJAX is more than its ability to show/hide HTML chunks to a page, but to create and destroy necessary HTML by adding individual HTML elements. That capability is glossed over. Second: the server-side code examples are written in C# or Java. C#, Java and PHP are all similar, so you should be able to adapt code examples, but if you want drag and drop example of PHP code, this book presents a problem. (Fear not: "Beginning Ajax with PHP: From Novice to Professional" is coming soon from Apress).

    True to the title of this book, it is packed with good theoretical discussions of how AJAX works; and good strategies for how to use AJAX. Knowing all of the tricks isn't worth much unless you can apply your knowledge in a meaningful way. An example of what impressed me was the material on caching strategies: AJAX has always struck me as being a high-transfer way to presenting information and this section instead makes AJAX into a means of saving traffic.

    Much of this book covers patterns. How do you divide data for distribution (Content Chunking Patterns)? How do you effectively maintain state or at least impression of maintenance (persistent communications pattern)? How do you make all of the potential data available at the user's fingertips (infinite data pattern)? In the nine patterns presented the author explores much of theory and that helps strategize when it comes time to code your own applications.

    For me, I was tired of being pelted with the AJAX buzz word from websites and blogs. Examples were copious and usable theory was sparse. This book came as a welcome relief: I know how to write Javascript, I know what XML is. What I needed to know was how to stitch the Emperor's New Clothes together. This book accomplished that.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Miscellaneous Reviews Articles
    More By Codewalkers

    blog comments powered by Disqus

    MISCELLANEOUS REVIEWS ARTICLES

    - Safari Books Online Review
    - Firefox Becomes Browser of Choice for IBM
    - Book Review: Learning Nagios 3.0
    - Book Review: CISSP in 21 Days
    - Ajax Design Patterns: Creating Web 2.0 Sites...
    - Review of 2006 NYPHP Convention
    - Ajax For Dummies
    - Foundations of Ajax
    - AJAX Patterns And Best Practices
    - Learning Perl
    - Web Standards Solutions: The Markup and Styl...
    - CSS Cookbook
    - Flash Hacks

    Developer Shed Affiliates

     



    © 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap