Technology

PHP: A Great Book and MVC Framework for PHP

The folks over at Packt Publishing had a recent post where they were encouraging PHP developers/bloggers to read a new book and blog about it. I really appreciate opportunities like this – the didn’t request any positive or negative posting, just an honest review of the book they provide (at no cost).

The book I received is CodeIgniter for Rapid PHP Application Development, written by David Upton.

My favorite book on PHP/MySQL is still PHP and MySQL Web Development. It’s PHP 101 and MySQL 101 all wrapped up in a fantastic, comprehensive book with tons of code samples. CodeIgniter is a perfect compliment, perhaps a PHP 201 guide. It takes all of the rigorous PHP hard-coding and supplies a framework to develop code faster and with the best practices of a MVC system.

According to Wikipedia:

Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (view) concerns, so that changes to the user interface will not affect data handling, and that the data can be reorganized without changing the user interface. The model-view-controller solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component: the controller.

Aside from being well-written with tons of real-world examples, one of the things I like best about this book is that it explains what it’s not. CodeIgniter is a home-grown open-source framework. As such, it has some admitted limitations. The book goes into these in detail. A couple limitations that I found were the lack of accessibility components in the display of user interface components such as anchors, tables and forms and any reference to plain old XML REST APIs and Web Services. However, I believe those options might be easily added in future versions – we’ll see!

The most complete section of CodeIgniter, in my opinion, is the database library. I find writing MySQL connections and queries incredibly time-consuming and laborious. I want to immediately dig in to CodeIgniter to utilize their database framework, I believe it’s going to save me a ton of time – especially in writing/re-writing queries! There are also some great add-ons for Ajax, JChart and Image manipulation.

If it sounds like I’m discussing CodeIgniter more than the book, the two are really one in the same. The book is a perfect way of learning advanced development techniques, not just using CodeIgniter though. I’d highly recommend the book. The book states “Improve your PHP coding productivity with the free compact open-source MVC CodeIgniter framework!”. This is honest!

If you’re interested in CodeIgniter, be sure to watch the Introduction Video.

2 Comments

  1. 1

    The goal of a framework is to make the process of writing web-based applications simpler.

    An application designed around MVC is easier to manage because it is split into tiers, which allow for independent development. This promotes code reusability by building models, which are reusable throughout the application.

  2. 2

    The goal of a framework is to make the process of writing web-based applications simpler.

    An application designed around MVC is easier to manage because it is split into tiers, which allow for independent development. This promotes code reusability by building models, which are reusable throughout the application.

Leave a Reply