Review: Core Web Application Development with PHP and MySQL

This latest installment in the Core series from Prentice Hall PTR is a welcome arrival to the PHP/MySQL space. It is jam packed with useful information. At a little over 850 pages, this volume contains information on nearly every topic of interest in both the PHP and MySQL subject areas. The author, Marc Wandschneider, brings considerable industry experience to the book and it shows in the detailed explanations that fill every page.If you are not familiar with the Core series of books from Prentice Hall PTR, I recommend that you quickly remedy the situation. My personal favorites are, “Core Java 2, Volumes I and II ” by Horstmann and Cornell. Special mention goes to Wesley Chun for his great introductory Python book, “Core Python Programming”, the 2nd edition of which is said to be coming out Summer 2006.

Core books, in addition to having great content are especially well made and in this day of ever lessening quality is a big plus. I spent a great deal of time reading this particular Core book on the plane to and from consulting engagements in Boston, a 1500-mile commute. I did my best to destroy it. The binding is nearly indestructible. No matter how much I twisted, pulled and bent the binding, no pages even got loosened. Kudos go to Prentice Hall PTR for quality book construction.

The Book

“Core Web Application Development with PHP and MySQL” is meant for web developers of all skill levels. It definitely has something for everyone. Marc keeps the narrative clean and straightforward. Beginners will appreciate the detailed descriptions and simple examples. Intermediate developers will find more than enough details to satisfy them. Advanced developers will appreciate the breadth of information that is presented, from Globalization to Security; the author has researched his topics well. Written in an approachable, conversational and tutorial style, the text is dense with example code. The latter half of the book is centered on Implementation and Sample Projects.

The book is divided into six sections:

Part I – The Basics of PHP
Part II – Database Basics
Part III – Planning Web Applications
Part IV – Implementing your Web Applications
Part V – Sample Projects and Further Ideas
Part VI – Appendixes

Part I – The Basics of PHP

In the first part, the author lays out the fundamentals of PHP – the PHP: Hypertext Preprocessor. PHP is an HTML embedded scripting language borrowing from C, Perl and Java. PHP is quite prevalent as a platform for the rapid development of web applications. The author begins with the obligatory “Hello, Everyone!” application and quickly guides the user through phpinfo(), types, arrays, variables, operators and control structures. Part I also includes coverage of functions, object-oriented features of the language and more on arrays. The section is wrapped up with a lucid discussion of Unicode, Strings and HTML forms and the web server.

Marc does an admirable job of presenting the language in understandable chunks. Once you have read Part I, you should be more than ready to tackle creating interactive websites using PHP. If you are an intermediate or advanced developer, the author hasn’t left you out. You will find lucid discussions of such topics as globalization, type conversions, auto-loading, HTTP headers and others. My only complaint is that these topics aren’t called out into sidebars, making them easier to find.

Part II – Database Basics

The author, who admits freely that he had no experience with databases prior to learning to develop for the web, provides the reader with a comprehensive introduction to databases in general and MySQL in particular. Topics include, database design, SQL basics, and how to create tables, insert, update and delete data using the MySQL console.

Advanced topics such as altering tables, working with string data and group and aggregate functions are discussed in this section as well. The author concludes the section by bringing in PHP with the introduction of mysqli, PHP’s “Improved” MySQL extension. After having shown the user how to interact with the database from the MySQL console, Marc shows how to do it with PHP statements. The tutorial style of this section is very concise and informative.

Part III – Planning Web Applications

This part of the book is helpful in explaining web application design and issues. The World Wide Web, Client Server, N-Tier Architectures, User Interfaces, User Management and two chapters on Security are discussed. Beginners will likely find this section a bit dry and difficult to apply, but for developers wanting to work with enterprise web applications or larger applications will find it interesting.

Part IV – Implementing your Web Applications

This part of the book is 285 pages of implementation details and is good for beginners, but is really good for intermediate and advanced developers. I think this section is the “meat” of the book and is where the author’s talents are most readily discernible. The author’s development background shines through in discussions on Error Handling, Debugging, and Exceptions. He covers Cookies and Sessions along with their security implications. User Authentication is discussed and an implementation provided as an example. Actually, this entire part of the book is littered with example implementations of the topics under discussion.

Globalization, a favorite and recurring topic of the author is present in this section as well, in the Advanced Output and Output Buffering chapter. The author does a very credible, if somewhat brief, job of presenting the complex topic of Regular Expressions and Data Validation methods. Other topics covered in Part IV include XML, DOM, XHTML, file and directory I/O, and file uploading.

The last part of Part IV discusses the ever vexing topic of dates and times, as well as XML Web Services. As an example of using XML Web Services and SOAP, the author provides a snippet to interact with the Google Search API – a nice touch and a very relevant application. There is a chapter on PEAR, the PHP Extension and Application Repository that gives a very quick overview. The last chapter of this part of the book is perhaps the most important, Development and Deployment. The three topics contained in it are the most oft overlooked areas for the average developer and yet are crucial to the success of all but the most trivial applications – the topics of Style, Source Control and Testing. I was mildly disappointed that the author didn’t dedicate more of the book to these topics.

All in all, though I came away with the most relevant information during my reading of part IV.

Part V – Sample Projects and Further Ideas

In Part V, the author recaps his ideas concerning development of an application and then dives into two complete sample applications, An Appointment Manager, A Blogging Engine and an Ecommerce Application. The Appointment Manager is a single user application that allows the user to keep a database of appointments and view and manage them through a web interface. The Blogging Engine is a multi-user application with login that allows users to maintain their blog and comment on other’s blogs via a web interface. The Ecommerce application is an implementation of an online store, complete with a shopping cart interface.

Each Sample is composed of three sections, Installing and Running the Sample, Structure and Page Progression, and Code Walkthrough. While each sample is concise each is illustrative of some concept that the author has previously discussed.

Part VI – Appendixes

The final part of the book is a set of three appendices:

Appendix A – Installation and Configuration
Appendix B – Database Function Equivalents
Appendix C – Recommended Reading

Appendix A – Installation and Configuration contains information on how to install and configure a web server, MySQL and PHP on Unix Windows and Mac OS X.
Appendix B – Database Function Equivalents contains a rough comparison of MySQL, PostgreSQL, Oracle and MSSQL database functions and types.
Appendix C – Recommeded Reading contains a handy list of web based references for further information.

The Bottom Line
I enjoyed reading this book and I was impressed with the breadth of knowledge expressed by Marc Wandschneider. Really, it is quite amazing just how much information will fit in a book its size. I was not too enthused with the way some advanced pieces of knowledge were presented inline and I would have preferred them to have been sidebars or otherwise called out as previously noted. However, I am very glad that the information was present and I believe that, “Core Web Application Development with PHP and MySQL“, is a worthy effort and should be considered for any PHP and MySQL developer.

Book Information:
Core Web Application Development with PHP and MySQL
By Marc Wandschneider
Publisher: Prentice Hall Professional Technical Reference

Target Audience: Web Developers
Recommended Skill Level: Beginner to Advanced

Recommendation
Buy. The book is available online, through Amazon: Core Web Application Development with PHP and MySQL

About the author:
Will Senn is a Consultant, living in the Dallas area.


If you would like to see your thoughts or experiences with technology published, please consider writing an article for OSAlert.

12 Comments

  1. 2005-11-30 7:55 pm
  2. 2005-11-30 9:55 pm
  3. 2005-11-30 10:23 pm
    • 2005-11-30 11:49 pm
      • 2005-12-01 5:51 am
  4. 2005-11-30 10:38 pm
  5. 2005-12-01 1:58 am
    • 2005-12-01 6:39 am
  6. 2005-12-01 6:35 am
    • 2005-12-01 8:00 am
    • 2005-12-01 6:11 pm
  7. 2005-12-02 11:45 am