PHP 5 e-commerce Development - Book Review
I was contacted by PackT to review the book PHP 5 e-commerce Development by Michael Peacock.
The book serves as an introductory tutorial on developing an e-commerce website using PHP. The book has 15 chapters covered in 310 pages.
You can grab a sample chapter from the publisher's website.
The publisher's website has a detailed table of contents.
Who should read the book?
You should read the book if you are learning PHP and new to e-commerce. Beginners trying to utilize out of the box software like Drupal CMS or OSCommerce tend to be frustrated sooner or later. These content management systems have their own ways of doing things. Being new to PHP and complex software like Drupal can intimidate you until you thoroughly understand the inner workings of the software. Often developers choose to roll their own software to avoid the steep learning curve of existing open source software. If you have experienced similar feeling you can sure try this book.
The book starts with an introduction to e-commece in general and explains how popular portals like eBay and Amazon work. Then the author explains why you might want to build your own framework. The custom framework being developed makes use of several design patterns like MVC, registry, singleton, etc. If you have a modest understanding of object oriented programming, you can easily grasp the topics discussed in the book.
The next few chapters discuss the details of building the product management pages, wish lists, recommendations, shopping basket, check out and order process, shipping and tax, discounts, vouchers and referrals. Chapter 11 describes how to integrate the e-commerce application with payment gateways, especially PayPal. The author provides tips on when to choose to store customer credit card numbers in the application.
Chapter 12 and 13 are dedicated to managing rudimentary features of a web application like user management and administration.
Chapter 14 discusses deployment, security and maintenance. Topics like automated deployment, SSL, CAPTCHA, database backup are discussed. Although these things may sound quite common, it is surprising how many developers out there miss one or more of these chores of maintaining a web application.
Chapter 15 discuses strategies to promote your website. The chapter contains a brief discussion of online advertising, newsletters, marketing materials, affiliate marketing, Twitter, search engine optimization, etc. If you have never done all of these before, you definitely shoudln't skip this chapter.
What could have been done to make the book better?
The author could have introduced unit testing to the reader.
In my opinion, recommending rolling complete own framework is not a very good idea. The author claims the framework developed in the book to be a killer framework. These kind of claims and self praise could have been kept to a minimum.
My advise to readers is not to blindly follow the ideas of any book. Not just this one. Developing a complete framework is a daunting task and requires lot of time and developer resources. It's perfectly all right to roll your own page routing and object storage mechanisms. I'd strongly recommend you to take a look at established open source software that deals with database abstraction, email, caching, forms, etc before deciding to write them on your own.
Instead of dedicating a chapter on marketing, discussing performance could benefit the reader more. This is one area where beginner programmers often get stuck with.
The book discusses emailing customers and doesn't show how to use SMTP. This is a problem a lot of new PHP developers encounter. I'd have appreciated if the author provided an example of sending e-mail using SMTP.
If you're already familiar with one or more open source PHP frameworks like Zend Framework or Symfony you probably aren't going to favour the custom framework.
Overall rating - 3 out of 5.