January 23, 2012
cakePHP from a Rails developer point of view

It was much time I was curious to try another MVC framework (using a different programming language). Today I had time so I looked a bit cakePHP.

For what I found online cakePHP is one of the best MVC framework available on PHP, it’s “the Ruby on Rails on PHP”

Just for curiosity I followed a cakePHP tutorial to understand differences between Ruby on Rails (that I know very well) and a still-MVC-but-different-language framework.

For a Rails developer, develop a simple blog application in cakePHP is very fast. You already know all MVC’s stuff and everything looks quite the same (if you know PHP).

The huge difference is the amount of code you have to write. It’s not a problem with cakePHP but it’s PHP’s fault (I guess).

If you follow the Blog tutorial you will notice how many times you have to write “$this->”. In Rails (thanks to Ruby) there is much less “noise” in the code and you can focus on the real code.

After a little try of cakePHP I can say it should be very easy to switch from Rails to cakePHP but honestly I can’t find any good reason to do it. For me Rails is still the best tool to make web applications.