CakePHP – my new best friend.

From the beginning of the year I decided to move from my home-grown PHP Framework to CakePHP. Here I will explain how I moved and which were the reasons for this. I will mention only the important things which drive me to this decision.

So here are the most critical issues while you using Home-grown or Community Frameworks:

Home-Grown Framework


  • You know everything inside – when something happen you don’t need to ask somebody or to search in forums how to solve this problem. You just touch the code in the libs and the problem disappear.
  • You are the “Architect” of it – so you don’t need to inform anybody that you adding something new as functionality
  • The framework serving your needs so it will include only the things which you need. This way the framework is more lightweight than other frameworks


  • You need to do everything yourself – apart from other frameworks if you need something you need to code it. It’s not like in big communities where you just wake up one morning and you realize that the framework supports Oracle connectivity.
  • Sometimes your framework it really vintage – it’s because it serves your needs and most of the times there is not need to add the new trends in it. So you end up with something which sooner or later will die. The example is that my own is stick to PHP4 and for PHP5 wont work 100%. This lead to time-consuming bug fixes mostly quick and dirty and your idea of “shiny and clean” framework is blown away.
  • You need to work alone – no body can understand your code, because there is no documentation.

Large Community Framework


  • Large community – you can ask for help all the time. Both Google Groups, IRC channel or Mailing lists
  • Many Information – there are articles, APIs, Blogs etc. which discuss the new functionality or HowTo-s
  • Evolution – you can have Ajax, MVC pattern, different connections to different Databases, or if there isn’t yet, you could request them.
  • Designed with last and modern design patterns – MVC pattern, AJAX, etc.


  • If you want core functionality you need to wait for it. You can suggest something, but it’s also possible that it’s not acceptable for the community.
  • There are such functionality, but documentation is old.
  • Sometimes the framework is too heavy, because everybody add what he need and you using a monster. Well this is not fully true, because if the framework is modular you can use only modules which you need.

There are other minor reasons pros and cons which I didn’t mention, but because I am too lazy to build and support everything my own I decided to move. So I start searching THE framework. I tried almost everything written in PHP, including a framework which has 2-3 participants/users.
I found this comparison chart where the important players are listed. I also spoke with friends and some guys from the forums and I decided to move to CakePHP. Why I choose it? Because:

  • Large Community – happy to support you via IRC, Google Group etc.;
  • MVC Pattern;
  • Object-Record Mapper;
  • AJAX Support;
  • Scalability /Plug-ins, Components, Helpers/ already available and supported;
  • Support both PHP4 and PHP5;
  • Validation;
  • Zero configuration – once you install it you don’t need to touch any paths or configuration settings, but DB connection;
  • Proper inheritance of the classes and you can easily to write a function in the common class which will apply to every class underneath

Probably there are more pros and cons which I didn’t mention, but these are the most important things to me. So far I am with CakePHP and 6months after I am still happy to work with it.

I would help everybody which want to “switch” to that marvellous framework either with opinion, advices or how to articles in that blog.

One thought on “CakePHP – my new best friend.

Leave a Reply

Your email address will not be published. Required fields are marked *