Creating Web Pages With Ajax
Ravi writes "Asynchronous Javascript And Xml, popularly known as Ajax, is a combination of Javascript, XML and some coding on the server side. Even though this technology existed for years, many believe it was Google which brought it to the front by implementing it on its sites and thus raising it to the cult status it enjoys now. There is something magical in seeing a website update its content without reloading the whole page, which is the visual essence of Ajax." Read the rest of Ravi's review.
AJAX - Creating Web Pages with Asynchronous JavaScript and XML
author
Edmond Woychowsky
pages
390
publisher
Prentice Hall
rating
9
reviewer
Ravi
ISBN
0-13-227267-9
summary
A useful introductory book in picking up the skills in using Ajax
I found the book titled "AJAX — Creating web pages with Asynchronous JavaScript and XML" authored by Edmond Woychowsky to be a very good introductory level book on learning the basics of Ajax. Spanning 390 pages and 16 chapters, this book imparts a sound understanding of the basic features which make ajax possible.
The author starts by giving a brief introduction to the different types of web pages — static and dynamic, the tools and code used to serve them.
In the second chapter which is titled "Introducing Ajax", the author dives into the philosophy and principles of Ajax and with the aid of three simple examples explains three different ways of implementing ajax in a webpage. I found this chapter to clear some of the doubts that a newbie will have about the hype surrounding ajax.
The third chapter takes a step backwards in that it gives a birds eye view of all the XHTML elements and their associated attributes. The author also provides a table which lists the most commonly used CSS 1 elements. I found this chapter more of a ready reference than an indepth thesis on XHTML and CSS.
The fourth chapter titled "Javascript" provides a very good understanding of the language. Javascript plays an invaluable part in the greater scheme of the working of Ajax. Apart from the snippets of code and explanations, this chapter also has a number of tables listing things such as the essential JavaScript functions, characters used to create regular expressions, event handlers, Javascript operators and so on.
In the next chapter titled "Ajax Using HTML and JavaScript", the author explains how to use HTML, Javascript and stored procedures incorporated in the latest version of MySQL to create a semblance of an Ajax shopping cart. What is worth noting is that this chapter explains an old fashioned but very reliable technique which uses hidden frames and inline frames to update the data on the page. Of course the author is quick to point out that this technique is not really Ajax in the sense that it lacks the XML part.
I found the author's narration quite refreshing as he explains each concept one at a time with the aid of snippets of code, gradually building up and eventually tying all the threads together to write a true Ajax web application.
XML — eXtensible Markup Language is the successor of SGML — the language which powers HTML. XHTML on the other hand uses the XML schema. XML is a vast subject which can easily fit in a book of its own. Perhaps knowing this, and because XML plays a significant part in Ajax, the author has intelligently provided just the necessary information about XML in the sixth chapter.
The seventh chapter is a very important chapter which gives an indepth understanding of the XMLHttpRequest object which can be considered the brain behind Ajax. The author also provides some insights into the XML document object model, RSS and Web services such as SOAP.
In Chapter 8, the author gives a more indepth take on the XMLHttpRequest object and the other technologies explained in the previous chapter and illustrates by applying them in building a shopping cart application. Throughout the book, the author has highlighted the fact that ajax is a browser dependent technology and if people disable javascript in their browsers, then the whole effort will come to naught.
XPath is a technology which can be used to locate and navigate the various parts of an XML. The ninth chapter gives an introduction to the syntax used by XPath.
The next two chapters explain the concept of eXtensible Stylesheet Language for Transformations (XSLT) and how it can be used to implement Ajax. XSLT can be compared in some ways to CSS but is much more powerful and can be used to display pure XML in different styles targeting diverse media. These two chapters contain all the necessary details such as the syntatic reference and snippets of code which walks one through creating an Ajax application using XSLT.
In chapter 12, the author talks about the advantages of code reuse where creating javascript objects are explained. Surprisingly, there are two chapters on Ruby on Rails — the latest fad with the web developer community.
I found the book to be a valuable reference for upcoming Ajax web programmers. The number of tables listing the tags and their attributes itself will more than make up for the cost of the book. It has the right amount of content covering all pertinent topics without overwhelming the reader, which makes it a very good introductory book on Ajax.
Ravi Kumar is passionate about all things related to open source and free software and likes to share his thoughts and experiences related to these through his site "All about Linux".
You can purchase AJAX - Creating Web Pages with Asynchronous JavaScript and XML from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
I found the book titled "AJAX — Creating web pages with Asynchronous JavaScript and XML" authored by Edmond Woychowsky to be a very good introductory level book on learning the basics of Ajax. Spanning 390 pages and 16 chapters, this book imparts a sound understanding of the basic features which make ajax possible.
The author starts by giving a brief introduction to the different types of web pages — static and dynamic, the tools and code used to serve them.
In the second chapter which is titled "Introducing Ajax", the author dives into the philosophy and principles of Ajax and with the aid of three simple examples explains three different ways of implementing ajax in a webpage. I found this chapter to clear some of the doubts that a newbie will have about the hype surrounding ajax.
The third chapter takes a step backwards in that it gives a birds eye view of all the XHTML elements and their associated attributes. The author also provides a table which lists the most commonly used CSS 1 elements. I found this chapter more of a ready reference than an indepth thesis on XHTML and CSS.
The fourth chapter titled "Javascript" provides a very good understanding of the language. Javascript plays an invaluable part in the greater scheme of the working of Ajax. Apart from the snippets of code and explanations, this chapter also has a number of tables listing things such as the essential JavaScript functions, characters used to create regular expressions, event handlers, Javascript operators and so on.
In the next chapter titled "Ajax Using HTML and JavaScript", the author explains how to use HTML, Javascript and stored procedures incorporated in the latest version of MySQL to create a semblance of an Ajax shopping cart. What is worth noting is that this chapter explains an old fashioned but very reliable technique which uses hidden frames and inline frames to update the data on the page. Of course the author is quick to point out that this technique is not really Ajax in the sense that it lacks the XML part.
I found the author's narration quite refreshing as he explains each concept one at a time with the aid of snippets of code, gradually building up and eventually tying all the threads together to write a true Ajax web application.
XML — eXtensible Markup Language is the successor of SGML — the language which powers HTML. XHTML on the other hand uses the XML schema. XML is a vast subject which can easily fit in a book of its own. Perhaps knowing this, and because XML plays a significant part in Ajax, the author has intelligently provided just the necessary information about XML in the sixth chapter.
The seventh chapter is a very important chapter which gives an indepth understanding of the XMLHttpRequest object which can be considered the brain behind Ajax. The author also provides some insights into the XML document object model, RSS and Web services such as SOAP.
In Chapter 8, the author gives a more indepth take on the XMLHttpRequest object and the other technologies explained in the previous chapter and illustrates by applying them in building a shopping cart application. Throughout the book, the author has highlighted the fact that ajax is a browser dependent technology and if people disable javascript in their browsers, then the whole effort will come to naught.
XPath is a technology which can be used to locate and navigate the various parts of an XML. The ninth chapter gives an introduction to the syntax used by XPath.
The next two chapters explain the concept of eXtensible Stylesheet Language for Transformations (XSLT) and how it can be used to implement Ajax. XSLT can be compared in some ways to CSS but is much more powerful and can be used to display pure XML in different styles targeting diverse media. These two chapters contain all the necessary details such as the syntatic reference and snippets of code which walks one through creating an Ajax application using XSLT.
In chapter 12, the author talks about the advantages of code reuse where creating javascript objects are explained. Surprisingly, there are two chapters on Ruby on Rails — the latest fad with the web developer community.
I found the book to be a valuable reference for upcoming Ajax web programmers. The number of tables listing the tags and their attributes itself will more than make up for the cost of the book. It has the right amount of content covering all pertinent topics without overwhelming the reader, which makes it a very good introductory book on Ajax.
Ravi Kumar is passionate about all things related to open source and free software and likes to share his thoughts and experiences related to these through his site "All about Linux".
You can purchase AJAX - Creating Web Pages with Asynchronous JavaScript and XML from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
i am willing to bet that 99.9% of the entire population of web users have javascript enabled because (1) they don't know how to turn it off, (2) even if they did they wouldn't because 'nothing would work' and (3) there is absolutely NO REASON to disable it unless you are a whiney /. reader
I find it interesting that the review mentions XSLT, which, IMHO, is very powerful:
You can completely separate most display logic from the "data" and business logic. (...which can be handled before the XSL transformation, and done such that you get XML nodes to feed into your transformations.)
It may seem complicated at first, but there are so many advantages:
1.) you get the layout of the site defined in a declarative manner, basically as as data. (and that XSL "code" can be easily analyzed or transformed, itself.)
2.) you can disentangle a lot of markup from your PHP/ASP[VBS/JScript]/Python code.
3.) The output of your XSLT transformation can be fed into other transformations.
4.) Your XSLT is highly portable across platforms, even between server vs. client-side rendering.
(Although, it bums me out that Microsoft has decided to not support XSL 2.0.)
5.) Manipulating an X/HTML dom via a browser's built-in XSLT processor is much faster than using JavaScript only. (E.g.: using JavaScript-only to traverse a DOM in order to select, merge, append, and move nodes...)
I'd be curious to know what this book has to say on the matter.
I'll happily believe a larger than expected percentage of users have javascript disabled, but this is just insane. Did these sites make any attempt to filter out bots? I'm very much suspecting not...
"What's truly significant is the ability to make web requests and processing in the background."
This is really just a hack to get around the fact that web standards weren't designed for anything beyond static pages. A better solution would be to rework these standards so that any user interaction with an HTML element could optionally trigger a request. For most web apps this would make Javascript unnecessary.
nice example.
,however i was always happy with the oreilly books on javscript, because these books pointet out most of the browser differences/annoyances to keep in mind while designing.
in theory this might work, ever tried to use "try() {...} catch() {...}" in IE6 ? good luck. the xmlhttprequest interfaces are not 100% the same on all browsers (which support it), one still has to write crossbrowser code, i could go on for days (there are many nice "ajax" libraries which deal with these issues).
I haven't read the book
Cheers,
-S