Penguin Power!
Buy Linux distributions at discount prices!
Linux| Perl| PHP| Webserv| Databases| Sysadmin| Programming| Filesystems| Java| Webprog
News from Slashdot
FDA Unveils Biosimilars Guidance

IRS Employee Stole Data To Forge $8M In Fraudulent Returns

Researchers, Biosecurity Board Debate How Open Virus Research Should Be

Smart Camera Tells Tobacco From Marijuana

FCC Maps the 3G Wasteland Of the Western US

What Does a Software Tester's Job Constitute?

Famous For Fifteen People: Is Everyone a 'Facebook Celebrity'?

Skin Cancer Drug Reverses Alzheimer's Symptoms In Mice

Ask Slashdot: How To Allow Test Takers Internet Access, But Minimize Cheating?

Tesla Reveals Its Model X Gullwing SUV


Related products:

Ajax in Action Ajax in Action

DOM Scripting: Web Design with JavaScript and the Document Object Model DOM Scripting: Web Design with JavaScript and the Document Object Model


Head Rush Ajax Head Rush Ajax

CSS Mastery: Advanced Web Standards Solutions (Solutions) CSS Mastery: Advanced Web Standards Solutions (Solutions)

Php Books

Ajax And Php: Building Responsive Web Applications

Php Books
Format: Paperback
Author: Cristian Darie
ReleaseDate: 01 March, 2006
Publisher: Packt Publishing
Rating:

Building AJAX and PHP skills with Packt: Recommended
I can't really explain why, but I was intimidated by the idea: not by its size (274 pages is a common size), not by the technology itself (I'm coding PHP pretty often, and JS is no more than. The book is good, the topic is right, and pretty much everyone is thrilling to learn how to benefit from AJAX -- even if this means you're going to use a lot of JavaScript, which you thought it was not necessary, since you know PHP, a powerful language, right?

To be frank, I was contemplating this book quite a lot before daring to open it for real.. . JS), so maybe it was just because I'm too conservative. I'm prone to use PHP pages the "go-to-the-server-and-come-back-with-another-one-please" way.

And this book really tries to learn you the basics of AJAX, through practical examples, that is. Quite impressive, given that most of us are usually grabbing new ideas & technologies from on-line articles, not from books entirely dedicated to a subject.

Packt (pronounced "packed") has made every effort to support this book, even up to a point where you're overwhelmed by their will to make it easier for you.

Here's what the web offer is:
* A book's "classical" page with the publisher
* A book's mini-site with the publisher, featuring demos of the case studies developed in the book
* A book's mini-site with one of the authors, hosting an Errata and Notes

Downloadables:
* Chapter 1: AJAX and the Future of Web Applications
* AJAX Chat Revised - Chapter 5: Ajax_Chat_and JSON, a revised version of Chapter 5, now using and presenting JSON instead of XML. The first printed edition is only featuring the original XML-based chapter.
* AJAX Whiteboard mini-book - a case study on how to implement efficient client-server communications when heavy realtime communication is needed.
* Appendix A - installing and configuring Apache, PHP, MySQL, and prepare the database used in the demos.
* Appendix B: tools that can make your AJAX and PHP programming/debugging life easier.
* Appendix C: - Advanced XML: XPath and XSLT.
* Code download: the code for the samples described in the book.

Let's get to the point.

The first contact with AJAX was, for most people, the suggest & autocomplete feature of Google Suggest, somewhere at the end of 2004 or beginning of 2005. If you want to implement such a feature for yourself, the whole Chapter 6 is dedicated to this subject: you will be implementing suggestions from PHP functions, with direct redirection to the corresponding manual page.

Unless you don't actually need any book on the matter, you should start with the beginning, to get a clear idea of what "Asynchronous JavaScript with XML" really is, and why is it needed to improve usability and to make a site more responsive, or to find out some drawbacks of using AJAX (bookmarking may become pointless).

The basic principles of AJAX are very much disclosed from the first chapter, where you're presented with a simple (and useless) simple PHP AJAX application, described in detail.

There is to note that the book features the full sources of all the applications used in the instructional process. If you download the source code, the use of the printed one is somehow limited, unless you want to make notes on the book, for analysing how things are done.

To ease the understanding, the book holds a few flowcharts, in key places. Otherwise, a rather important number of screenshots are presented to help you follow the topic even if you're not in the front of your computer.

OK, you're an intermediate PHP developer, but you know very few of JavaScript. Client-side scripting was not one of your major interests. How are you going to swallow the book?

Chapter 2 is set to make you feel more relaxed and comfortable. Not only it describes JavaScript and the Document Access Model (DOM) in a nutshell, but it also provides you with useful reference links (page 30).

As a general rule, you will find useful URLs in several places throughout the book, so be prepared to improve your skills even after having finished with it.

The next "hard nut" is the very heart of AJAX: the XMLHttpRequest object. You will learn of it in the same Chapter 2, and the table at page 47 lists its methods and properties.

But it wasn't tough, so far. Most people already knew about DOM (at least if they have used CSS), and a bit of JS too. Some people never needed to use XML though, but, you know, the "X" in AJAX is from XML, even if there is no XML involved in the functioning of XMLHttpRequest, and you're not bound to use XML if you don't want to!

XML is a vast subject, and so are DTSs, schemas and namespaces, XSLT and Xpath, etc. Page 55 lists some starting points, and recommends Appendix C (not present in the first printed edition) for an introduction to XSLT and Xpath.

Fininshing the Chapter 2, which is very dense in information, will get you introduced to some basic handling of XML, but more important, to handling errors and throwing exceptions.

In the real world, you will need to do some serious data processing at the server level. This is what Chapter 3 is meant for, with some more examples too.

This time, you will also need to work with a database, MySQL in our case. Make sure you'll properly setup the database, because you will need to create some tables in some future sample project too -- fortunately, the book is supportive, especially if you're using phpMyAdmin.

As a general rule, once the access to the database is solved, everything should "just work". Each sample needing MySQL access has the credentials in a config. php file, so it's better you just create the user "ajaxuser" with the password "practical", to avoid editing several files.

The only problem I encountered was an error message:
"Class 'mysqli' not found"
which should be solved by adding
extension=mysqli. so
or
extension=php_mysqli. dll
to php. ini (and don't forget to restart Apache).

One of the first usability gain of using AJAX is form validation within the same page, without pushing back and forth error pages and the like. This is the first thing I'll implement in a web site in the process of "ajaxing" it -- and you will read Chapter 4 to get a good grip of one of the most useful usages of AJAX.

The rest of the book is very much a sequence of labs where you will learn more and more through practical exercises, with full code and explanations provided. You will do with AJAX:
* a web chat (Chapter 5).
* real-time charts with SVG (Chapter 7).
* grids with client-side XSLT (Chapter 8).
* a RSS reader (Chapter 9).
* drag and drop (Chapter 10).

What are my impressions with this book?

Once I went beyond the initial reluctance, I could see the book is actually not a bad one. The four Romanian authors did a good job, although some would have appreciated if a more playful style was used, instead of the rather academic one. For instance, PHP books by Julie C. Meloni can be swallowed easier due to the lighter style, more appropriated for people not willing to feel like in the front of a teacher.

Also, fragmenting the code with more comments shouldn't hurt -- no, actually not "code comments", but textual descriptions of what is actually happening in there.

For a practical introduction into AJAX with PHP, I would rate the book with 4 stars out of 5, but not more, for style reasons mainly.


Add Ajax Client-side Features to PHP Driven Web Applications
In this book the authors, Cristian Darie, Bogdan Brinzarea, Filip Chereches-Tosa and Mihai Bucica, teach their readers how to add Ajax client-side features to PHP driven web applications. This book assumes a working knowledge of PHP, XML, JavaScript and MySQL and that you have PHP, MySQL, phpMyAdmin and a server such as Apache installed on your computer.

As you would expect, the authors begin by discussing what Ajax is, its history and which Ajax features you will be adding to the PHP applications discussed in the book. The authors take a modular approach when building these web applications.

The first programming task discussed in many computer books is client-side form validation and in this book the authors have done the same by showing how Ajax has changed the traditional form validation process. In the traditional process, the client-side validation occurs after the form has been submitted but before it reaches the server. The authors show you how to improve on this process by using Ajax to validate the user's input as he types.

Next you will build an Ajax chat application. The authors do not cover supporting processes such as chat rooms, chat user lists and login. They choose to concentrate on improving the message posting and receiving processes using Ajax to eliminate the need to reload the webpage when performing these tasks. Before Ajax and other XMLHTTP related programming, this was only possible using Java, Flash or other special programming.

Ajax was made popular due to Google Suggest. So it is only logical that the authors would show you how to build your own Ajax suggest and autocomplete application. The database used for the working example for this application is the PHP Function List at PHP. net. Next you learn how to build two real-time charting applications. The first is a graph drawn in real-time using SVG and the other is an Ajax grid using XSLT and XPath. Both of these applications update these charts without reloading the webpage.

The popularity of RSS syndication makes this next application my favorite. You will build a simple RSS reader (aggregator) using Ajax, PHP, XSLT and SimpleSML. Finally, the last lesson is based on an existing web application (script. aculo. us). You will learn how to use Ajax to add drag and drop support to this task management application. (To Do List)

The book has a supporting website which has working demos of the web applications featured in the book, sample chapters and a free case study eBook entitled AJAX Whiteboard. This is a simple Ajax web application that allows you to draw with your mouse.

The authors of this book blend their varying backgrounds for this project. Cristian Darie is a software engineer and technical author. Bogdan Brinzarea has a background in banking and security. Filip Chereches-Tosa is a web developer and Mihai Bucica works in the field of communication software.


Poor print quality
While the content is good, and relatively well-written, the print quality and paper used is very poor indeed. I was personally a little disappointed with some aspects of this book. There is so much show-through on some pages that it makes reading the code very difficult as you can see the code on the reverse page too.

As, like many developers, I run sites on servers running PHP 4, many of the examples don't work as they're PHP 5 specific. Not unsurprising I suppose, but it would still be beneficial to have stated this in the title.



Go to lyrics-now.com for music lyrics and song lyrics.
Bass and guitar tablatures: Fretplay.com, Guitar tabs, Bass tabs, Fresh tabs, How to read tabs
Plan your travel and holiday here: Travel Helper!