First excerpt - technologies used in the book
The example code will use the following technologies for each application layer:
- Webserver - Apache's HTTPD1 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 without much deviation to the newer version.
- Database Server - MySQL Database Server 5.0. 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, they have released the 5.1 branch as a beta.
- Server-side Scripting - PHP 5.2. While PHP 6 brings global Unicode support to PHP2, 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, the PHP group has only made it available from source so far. It has much development left on it, but should see greater adoption rates than PHP5 has seen so far. That said, PHP 5.2 brings an input filtering extention, a JSON library enabled by default, greater ability to track file upload progress, vastly improved time zone handling and more. - Markup - XHTML 1.1. 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 in actuality 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 the
Content-type: text/htmlrather thanapplication/xhtml+xmlas recommended by the W3C. Technically, the specification3 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 using anything aside from text/html with HTML 4. - Style - CSS 2.1. 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 basics4. Even with the much-anticipated release of Internet Explorer 7 (refered to as IE or IE7 from hereon in), IE still fails 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. Since many resources5 exist already covering the hacks and fixes necessary to force IE6 and IE7 each to follow your design, this book will not go into detail of how to achieve complete, pixel-perfect, cross-browser designs.
- Client-side Scripting - JavaScript 1.5, together with the XMLHttpRequest object, which at time of writing, only exists as an informally agreed upon object and the very beginnings of a specification6. Many Ajax-type web applications and sites use Adobe Flash for text and XML communication with the server, 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 implentation, actually shares the syntax, object model, and often even 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.
Familiarity, at least to the point of understanding enough to port the code into your language of choice, will definitely help, though this book aims to provide the methodologies, architectures, and patterns which you can implement in your own rich web application, no matter what technology you use to drive it. The technologies listed above have several benefits. They can all get downloaded and/or used for free, on a wide range of platforms, tested in a wide range of browsers, and have large user bases and online communities ready and willing to assist you if you run into any problems with the technology chosen.
- 1 http://httpd.apache.org/
- 2 PHP does not technically pay attention to the bytes of strings. It just regards them as a numbered list of bytes. While this has the benefit of passing UTF-8 strings through PHP (even without the Multi-byte String library) unharmed, side effects can show themselves in the strangest, often most devestating, places in your application.
- 3 http://www.w3.org/TR/xhtml-media-types/
- 4 Rounded borders, multiple background images, column layout, text shadows, and transparency have all made it into the Webkit project. As of this writing, the Mozilla Gecko engine and Opera's rendering engine have also both implemented most of these.
- 5 http://css-discuss.incutio.com/, http://blogs.msdn.com/ie/
- 6 http://www.w3.org/TR/XMLHttpRequest/ as part of the Web API Working Group's activities.
Labels: advanced ajax, excerpts

2 Comments:
While PHP 6 brings ... and for some reason goto...
Do you mean to imply that Goto wont be wonderfully useful in PHP? -- I hope so. I fear it may spawn even more lazy php programmers. While I realize it does have merit, I think this is a pretty good instance of "beer is half empty"..
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.
See.. This is the reason I should never be allowed to write a book.. I wouldn't have been able to write that sentence that nicely.. I have a pretty low opinion of IE7 at this point.. After looking under the hood, sure the CSS is "better", but really the application as a whole is a new shiny white picket fence on the same old crappy run-down house. "No no.. look at the pretty new fence.."
I think your prerequisites for reading / understanding the book are spot on. There are quite a lot of "dummies" books out there for people who need simpler explanations - not nearly as many books that dig into the meat of something starting at a higher level though.
"Do you mean to imply that Goto wont be wonderfully useful in PHP?"
Wait, my mistake. Not "goto" but 'instead reuse the "break" keyword, and extend it with a static label.'
See, rather than seeing "goto mylabel" you will use "break mylabel" which just looks a whole lot better.
"I wouldn't have been able to write that sentence that nicely.."
Trust me, this book has a lot more to say about IE6 and IE7. Most of the chapters will probably have at least some sort of aside warning about IE's lack of support for X, or IE's completely vulnerable way of handling Y.
But, yeah...I can't really take the opportunity to simply bash IE through the entire book, no matter how therapeutic. Maybe the next book. :-)
"I think your prerequisites for reading / understanding the book are spot on."
Thanks! I hope so. The last paragraph touches on one of the bigger challenges of the book: namely, making sure that the Java/Perl/ColdFusion/ROR programmers and XML/JSON/Text users can all get value out of reading it. I will put a lot of the focus on the application architecture supporting Ajax-driven functionality, and best practices, which can really get applied to just about any rich web application. The accessibility, security, and performance optimization chapters will get more tightly associated with the technologies listed above, but mostly on the client side. Some of it will need to go into server configuration, but I know IIS admins can do pretty much anything I would cover in here, especially now that they have fastcgi PHP available to them.
Post a Comment
Links to this post:
Create a Link
<< Home