Sunday, December 6, 2015
Advanced Ajax, Architecture and Best Practices : PDF bOOk
Prentice Hall Advanced Ajax, Architecture and Best Practices (2008)
by
Shawn M. Lauriat
Prerequisites for This Book
Other Ajax books have spent so much time introducing the reader to all of the technologies
involved (Apache, MySQL, PHP, XHTML, JavaScript, and of course the
XMLHttpRequest object itself ) that they have not had the opportunity to delve into more
advanced topics and practices. This book takes advantage of what already has been
written to assume a certain level of understanding, in order to examine and explore in
detail the more intricate methods of designing a web application to use Ajax. Instead
of looking at some of the available AJAX frameworks, this book takes a brief look at
the more experimental uses, such as game development.
As such, if you have not already worked with Ajax or some form of server-side
scripting language, database, or web server, you should probably read a book like
Understanding Ajax (Eichorn, 2006), following along with the examples. While this
Introduction establishes the technologies used and referenced later in the book, it does
so only as a quick overview, just as a professor provides a quick overview during the fi rst
week of a semester to refresh your memory of last semester’s course.
The example code in this book uses the following technologies for each application
layer. You should have a general understanding of all of these before you begin reading
this book:
Webserver—Apache’s HTTPD (http://httpd.apache.org) version 2.0. As of
this writing, the Apache foundation has released the 2.2.* branch as the primary
stable branch. The example configuration directives in the book should
carry over to the newer version without much deviation.
Database Server— MySQL Database Server 5.0 (http://dev.mysql.com/
downloads/mysql/5.0.html). The 5.0.* branch introduces a wealth of useful
functionality and stability over previous versions, including stored procedures,
triggers, views, and strict mode. As of this writing, MySQL AB has released the
5.1 branch as a beta.
Server-Side Scripting— PHP 5.2 (www.php.net/releases/5_2_0.php ).
PHP 5.2 brings an input filtering extension, a JSON library enabled by default,
greater ability to track file upload progress, vastly improved time zone handling,
and more. While PHP 6 brings global Unicode support to PHP,4 along with cleaned-up functionality, closer integration of the new PDO database extensions,
even more drastic improvements to the object model, and, for some reason,
goto (in the form of named break statements), the PHP group has made it available
only from source so far. It has much development left on it, but should see
greater adoption rates than PHP5 has seen so far.
Markup— XHTML 1.1 (www.w3.org/TR/xhtml11). While XHTML 2.0 has
reached its eighth public working draft, XHTML 1.1 maintains HTML compatibility
while strictly enforcing XML, modules, and the progression to XHTML
2.0. Unfortunately, Internet Explorer does not really support XHTML; rather, it
renders it as HTML. This does make quite a difference and holds many developers
back from fully embracing the XHTML modules available to them. As such,
the markup directly rendered in the browser will have Content-type: text/html
rather than application/xhtml+xml, as recommended by the W3C. Technically, the
specification (www.w3.org/TR/xhtml-media-types) strongly recommends against
using text/html with anything beyond HTML 4 or XHTML 1.0 (HTML
compatible). However, it does not forbid it, as it does with the practice of using
anything aside from text/html with HTML 4.
Style— CSS 2.1 (Cascading Style Sheets, level 2 revision 1, www.w3.org/TR/
CSS21). CSS 3 introduces much of the styling and layout abilities asked for
years ago and eagerly awaited by web designers; however, it has not reached a
stable enough point for many of the browsers to support any more than some
of the basics.5 Even with the much-anticipated release of Internet Explorer 7
(hereafter referred to as IE or IE7), IE still fails to completely support even the
CSS 2.0 specification. The IE development team worked very hard to improve
the state of IE’s CSS support and, while they did a fantastic job, they didn’t
quite make it all the way there. Because many resources (http://css-discuss.
incutio.com, http://blogs.msdn.com/ie, and many more) exist to cover the
hacks and fixes necessary to force IE6 and IE7 to follow your design, this book
will not go into detail of how to achieve complete, pixel-perfect, cross-browser
designs.
Client-Side Scripting—This book will use JavaScript 1.5, together with the
XMLHttpRequest object, which currently exists only as an informally agreed upon object and the very beginnings of a specification (www.w3.org/TR/
XMLHttpRequest as part of the Web API Working Group’s activities). Many
Ajax-type web applications and sites use Adobe Flash for text and XML communication
with the server; however, Flash development gets too specific for
coverage in this book. Many of the same principles and much of the architecture
covered still apply, but the implementation differs. ActionScript, also an
ECMAScript implementation, actually shares the syntax, object model, and
often even its development tools with JavaScript, so while the XMLHttpRequest
object does not exist in ActionScript, and the working DOM differs, much of
the other sample code should look very familiar and easy to follow.
Download |
Labels:
AJAX
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.