Sunday, September 27, 2009

TOP PHP frameworks in terms of number of books published on a given framework

To begin with, I would like to say that I'm not new to PHP 4 and 5, but I would not call myself an expert. The reason is that for a few years now, PHP and web applications are things that I do only in my spare time. I also haven't used all the PHP frameworks, nor I'm the expert in any of them. I'm basically looking for a framework that is worth looking into and which would save me a time, as I don't want to spend much time on weekends coding e.g. only user authorization or registration form validation. So far, I did some small jobs using Prado, CakePHP and now I'm starting to learn Zend Framework. I also heard lots of good about CodeIgniter and Symfony. Since, I couldn't learn all of them, I just wanted to find some way of determining which of them seems to be the most popular. I decided to check how many books on a given framework are available in amazon.com?

I chose this criterion because for a person that wants to learn a framework, examples along with explanation can be valuable. Apart from official tutorials, quick start guides and reference manuals, that are available on the websites of the frameworks, books can provide good introduction along with example applications. Additionally, a number of books, also shows to some extend, how popular a given framework is. I would imaging that not many authors would write books about unpopular frameworks. Off course, there are many other possible criteria that can be used to rank or compare PHP frameworks, such as documentation, community support, performance, fast availability of updates etc., but I think that the number of books somehow translates to the the popularity of a framework.

Method of comparison

I went to amazon.com and I performed advanced searches for books on a given framework written in English and published after 2007. A year 2007 was chosen because books older than two years may contain highly outdated information. A framework name was a keyword. Than, the number of books found was counted.

En example of a search criteria used is given below:

Results

The results are as follows:
Zend Framework - 10 books (see the books)
Symfony - 9 books (see the books)
CakePHP - 3 books (see the books)
CodeIgniter - 2 book (see the books)
Prado - 0 books (see the books)

My personal opinion

From my perspective, the experience that I had with Prado (I used v. 3.1.4) was the worst one, although it's concept was interesting. I found it difficult to learn and use, because the documentation was sparse, there were not many tutorials, and even if I was wiling to invest some money and buy a book about it, I could not find any books about it.

After Prado I tried CakePHP (I was using v. 1.2). I found it very good, easy to learn and fast to use, as long as I adhered to all the naming conventions. Especially, I liked the ORM (Object-Relational Mapping) which was very useful and saved me a lot of time. The problem I had with it, was that it uses PHP 4, which already has been discontinued. Off course, sooner or later CakePHP will move to PHP 5, but I wanted to use a PHP 5. I think it would be better to use something in PHP 5, rather than something that is developed in a version of language that is already not supported. Off course, CakePHP runs smoothly on PHP 5. It is only CakePHP's core that does not use features of PHP 5. Additionally, I wanted to have more freedom when programming, and CakePHP does not allow for much of it due to it's "convention over configuration paradigm". But this is a price that you pay in CakePHP.

At the moment I'm learning Zend Framework v1.9 which is build using PHP 5. For now, I can say that it is definitely more difficult to learn at the beginning. The biggest issue that I had at the beginning, and still have but to a lesser extend, is a bootstrap class, which is difficult to understand. It really took me a long time to begin to understand how to use it at the simplest level. However, what I like is, that Zend Framework is less rigid than CakePHP, it uses PHP 5, and it has a vast number of tools (e.g. for working with PDF files or captcha) that CakePHP does not have.

I don't have experience with Symfony and CodeIgniter, so I cannot say anything apart from what I read in the Internet. CodeIgniter is considered to be faster than CakePHP and just like CakePHP, it is written for PHP 4, whereas Symfony is for PHP 5 only.

In conclusion, it seems that when you look only at the number of books on a given framework, Zend Framework is the winner with eight books. At the moment, I'm trying to get to know it, hopping that it will not be a waste of time. It must be remembered though, that there are many other criteria that can be used to compare PHP frameworks. However the final decision which framework to choose, if any, should be based on the specific needs of a project that we want to developed.

7 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. CodeIgniter is not written for PHP4 only, it works also with PHP5, and the new release 1.7.2 is fully compatible with PHP 5.3...

    ReplyDelete
  3. Anonymous5:16 AM

    Nice list!

    ReplyDelete
  4. Anonymous9:53 AM

    Just that there are many books says nothing about quality. Its even worse. The bader the documentation, the more books are out there. The crappier the framework is, the more books are needed to work with it.

    ReplyDelete
  5. Anonymous11:35 AM

    Books are mainly outdated. I have a Zend Framework book for an older version and it's no use for learning the latest versions.

    ReplyDelete
  6. Anonymous2:14 PM

    CodeIgniter is backwards compatible with PHP 4, this is very different from saying it is written for PHP 4 as this implies it wont run on PHP 5, which it does extremely well. CodeIgniter rocks, and I have read the book 'CodeIgniter for Rapid PHP Application Development' which although a bit outdated now is a decent book. 4/5.

    ReplyDelete
  7. With my experience of Codeigniter, I can say that it is much easier to learn and implement and also you don't need any books to learn it in the very first place with such fantastic documentation. The compatibility is awesome and also is the community. Try your hands on it and you will love to stick with it. Don't worry I am not the developer of codeigniter who is trying to promote it, Instead I am a loyal user of it who have saved time and money using it over last 2+ years.

    ReplyDelete