Ajax in Practice
This is a second-generation book about Ajax, as a follow-up to ‘Ajax in Action’. The authors are a team of Ajax experts: Dave Crane (the main author of the first book), Bear Bibeault of Works.com and Java Ranch, Jord Sonneveld of Google, Ted Goddard of IceFaces, Chris Gray of Infor, Ram Venkataraman of JBoss, Joe Walker, the creator of DWR (Direct Web Remoting – a technology of calling server-side Java code from client-side JavaScript by using Ajax as transport mechanism).
The book is made up of two parts: the first part covers the fundamentals of Ajax while the second part presents the best practice techniques, illustrated through great examples and lots of well-explained code. All this is in an easy-to-follow format. The targeted audience is the large community of web developers interested in expanding their coding skills with techniques and patterns that make the best use of Ajax. The source code for all the working examples in this book is available at http://www.manning.com/crane2 or http://www.manning.com/AjaxinPractice.
The first part consists of four chapters.
Chapter 1 discusses what makes Ajax different. This technology enables the application on the browser (by using a specific JavaScript object called XMLHttpRequest) to work asynchronously to the server. The chapter continues with explaining the usage of the XMLHttpRequest object and takes a brief look at how to simplify the code by using libraries and frameworks that are now available. An example of using the Prototype library is provided. Many other JavaScript libraries will be presented throughout the book; Prototype is the most important among them. That is why it comes from the very beginning, in the first chapter.
Chapter 2 examines the type of response formats that Ajax requests can generate: plain text, HTML, JSON (JavaScript Object Notation), XML, SOAP documents.
Using an object oriented approach for developing the client-side of Ajax applications is an imperative due to the increased amount of code on that level. Chapter 3 focuses on object oriented mechanisms in JavaScript: object construction, functions as classes and as methods, function contexts and closures. The use of the Prototype library to help define JavaScript classes concludes this chapter.
Chapter 4 investigates further the Ajax-enabled JavaScript libraries with a closer look at Prototype, as well as other ones (Dojo Toolkit, jQuery, DWR).
After the first four chapters we have a good handle for Ajax, so it is time to take the best practices in depth. Here comes the second part of the book, grouping the remaining nine chapters.
Chapter 5 covers the universe of event handling. Emphasis is paid on cross-browser issues, along with the use of Prototype to solve these problems.
Chapter 6 deals with the details of data-entry validation and the way it ties with the event handling lessons from the previous chapter. Both Prototype and jQuery are used in the examples given here.
Chapter 7 addresses the content navigation: from simple menus up to tree views, accordion controls, tab views, toolbars. The aid of two JavaScript libraries (OpenRico and qooxdoo) is enlisted by the code within this chapter.
Chapter 8 takes in view the issues created by the use of back and refresh. The chapter considers both approaches; how to remove such abilities from the user, and how to work with them.
Chapter 9 is about drag-and-drop operations: the mechanics of drag and drop sequences and the support for them in JavaScript libraries. The use of another JavaScript library (Script.aculo.us) is explored and a simple shopping cart implementation is presented.
Chapter 10 discusses usability considerations and examines ways of alleviating latency issues.
Chapter 11 covers state management: how to maintain client state, cache data, pre-fetch data, how to use the AMASS library to persist large amounts of data.
Chapter 12 dives into the world of open APIs on the web. Here you learn how to avoid the ‘Ajax security sandbox’ in order to make requests to remote servers. This knowledge is then used for dealing from within your Ajax application with such tools as Yahoo! Maps, Geocoding and Traffic, Google Search, Flickr photo services.
The last chapter makes use of the skills and techniques gathered throughout the book to create a complete ‘mashup’ application: it means a web application combining data from multiple sources – here in the book it uses both Yahoo! Maps and Flickr photo services.
I would conclude the presentation of this book by quoting Ernest J. Friedman-Hill, the author of ‘Jess in Action’. He considers that ‘Ajax in Practice’ ‘distills experience-based practices and it is confident and balanced’.
The book is made up of two parts: the first part covers the fundamentals of Ajax while the second part presents the best practice techniques, illustrated through great examples and lots of well-explained code. All this is in an easy-to-follow format. The targeted audience is the large community of web developers interested in expanding their coding skills with techniques and patterns that make the best use of Ajax. The source code for all the working examples in this book is available at http://www.manning.com/crane2 or http://www.manning.com/AjaxinPractice.
The first part consists of four chapters.
Chapter 1 discusses what makes Ajax different. This technology enables the application on the browser (by using a specific JavaScript object called XMLHttpRequest) to work asynchronously to the server. The chapter continues with explaining the usage of the XMLHttpRequest object and takes a brief look at how to simplify the code by using libraries and frameworks that are now available. An example of using the Prototype library is provided. Many other JavaScript libraries will be presented throughout the book; Prototype is the most important among them. That is why it comes from the very beginning, in the first chapter.
Chapter 2 examines the type of response formats that Ajax requests can generate: plain text, HTML, JSON (JavaScript Object Notation), XML, SOAP documents.
Using an object oriented approach for developing the client-side of Ajax applications is an imperative due to the increased amount of code on that level. Chapter 3 focuses on object oriented mechanisms in JavaScript: object construction, functions as classes and as methods, function contexts and closures. The use of the Prototype library to help define JavaScript classes concludes this chapter.
Chapter 4 investigates further the Ajax-enabled JavaScript libraries with a closer look at Prototype, as well as other ones (Dojo Toolkit, jQuery, DWR).
After the first four chapters we have a good handle for Ajax, so it is time to take the best practices in depth. Here comes the second part of the book, grouping the remaining nine chapters.
Chapter 5 covers the universe of event handling. Emphasis is paid on cross-browser issues, along with the use of Prototype to solve these problems.
Chapter 6 deals with the details of data-entry validation and the way it ties with the event handling lessons from the previous chapter. Both Prototype and jQuery are used in the examples given here.
Chapter 7 addresses the content navigation: from simple menus up to tree views, accordion controls, tab views, toolbars. The aid of two JavaScript libraries (OpenRico and qooxdoo) is enlisted by the code within this chapter.
Chapter 8 takes in view the issues created by the use of back and refresh. The chapter considers both approaches; how to remove such abilities from the user, and how to work with them.
Chapter 9 is about drag-and-drop operations: the mechanics of drag and drop sequences and the support for them in JavaScript libraries. The use of another JavaScript library (Script.aculo.us) is explored and a simple shopping cart implementation is presented.
Chapter 10 discusses usability considerations and examines ways of alleviating latency issues.
Chapter 11 covers state management: how to maintain client state, cache data, pre-fetch data, how to use the AMASS library to persist large amounts of data.
Chapter 12 dives into the world of open APIs on the web. Here you learn how to avoid the ‘Ajax security sandbox’ in order to make requests to remote servers. This knowledge is then used for dealing from within your Ajax application with such tools as Yahoo! Maps, Geocoding and Traffic, Google Search, Flickr photo services.
The last chapter makes use of the skills and techniques gathered throughout the book to create a complete ‘mashup’ application: it means a web application combining data from multiple sources – here in the book it uses both Yahoo! Maps and Flickr photo services.
I would conclude the presentation of this book by quoting Ernest J. Friedman-Hill, the author of ‘Jess in Action’. He considers that ‘Ajax in Practice’ ‘distills experience-based practices and it is confident and balanced’.

0 Comments:
Post a Comment
<< Home