9

I am a good PHP developer and wanted to develop a large scale web application in PHP. I was thinking about using the CakePHP framework.

Is CakePHP good for large scale web applications?

Should I start learning and using it?

Is CakePHP worth investing time and money or should I go with core PHP or some other framework?

I heard that it is difficult finding support for it in case you are stuck with some issue. Is this correct? I have heard a lot of good things about it as well.

I am looking forward to your guidance.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
happyhardik
  • 24,987
  • 7
  • 47
  • 60
  • Yes, it is good for large scale applications. Anything that does not support PHP < 5 is good. Zend, Symphony, Kohana, Cake and others. I would stay away from CI though because it still supports PHP 4 which is a dangerous thing these days (just my subjective opinion). – Richard Knop Sep 07 '10 at 10:49
  • CakePHP supports PHP 4. They will drop support for it in CakePHP 2.0. – bjudson Sep 07 '10 at 14:44
  • @Richard Knop why do you dislike support for PHP4? Cake has it, and it doesn't really affect anything. – Travis Leleu Sep 07 '10 at 16:18
  • @Travis Leleu Well, I just dislike the old "pseudo" OOP support in PHP4 where objects are not really objects and seem more like structures. Also the object model in PHP5 is much better. Supporting PHP4 usually means worse codebase (you can't even use private/protected/public methods and other OOP important features, you cannot use some nice new functions etc). By the way, I didn't know Cake supported PHP4, I thought CI was the only framework that still supports PHP4 these days. Anyways consider this my subjective opinion, I've never worked with Cake or CI so I could be wrong about everything. – Richard Knop Sep 07 '10 at 21:04
  • @Richard reasonable points, I was just curious. I did a little PHP in the early days, but have pretty much only used 5, so I'm not even 100% sure when I'm using "old" PHP versus new. – Travis Leleu Sep 08 '10 at 17:44

6 Answers6

6

In terms of support, I believe CakePHP is quite good. They have an active IRC community, as well as their own stackoverflow style website. Additionally there seems to be quite a few proficient CakePHP users on SO.

Although some of the documentation on datasources, creating behaviors and other few bits and pieces is lacking on the CakePHP website.

It all depends on what you're application is also, right tool for the right job.

Francisco Presencia
  • 8,732
  • 6
  • 46
  • 90
Stoosh
  • 2,408
  • 2
  • 18
  • 24
  • Our application is a dating website. And the previous developer faced some trouble with "Has Many And Belongs Many" relationship. – happyhardik Sep 07 '10 at 06:52
  • 1
    Unfortunately saying website is 'this' isn't going to magically going to spit out what you should use. Talk to the other developers, discuss the pros & cons for each. For example CakePHP has a very strong ORM however it follows very strict conventions, whereas something like Zend Framework is a lot more modular and loose. – Stoosh Sep 07 '10 at 06:55
  • And if a developer is having problem with Model Associations then there are plenty of resources out there about HABTM, read up and start trying to get the code working. HABTM isn't that hard of a concept to grasp. – Stoosh Sep 07 '10 at 06:57
  • 1
    Stoosh very rightly metioned about the strict convention cakephp uses, thats why developing first website could be troublesome. In my opinion if you are starting with cakephp make sure you are having enough time for the development phase of website. – nik Sep 07 '10 at 07:04
  • I understand that every application has its own need, but I just wanted to know weather it is suitable for large scale application (any performance issues?) and Is it stable? also Is support available if you are stuck in the middle of something? (this are just my concerns before start up with it, I know problems are going to be there and I need to get through it.) – happyhardik Sep 07 '10 at 07:06
  • 1
    CakePHP is probably one of the slower frameworks available, it certainly is stable and there is definately support (as stated before). Also a link for you http://blog.astrumfutura.com/archives/421-PHP-Framework-Benchmarks-Entertaining-But-Ultimately-Useless.html – Stoosh Sep 07 '10 at 07:24
  • nice link! thanks for your answers. – happyhardik Sep 07 '10 at 07:39
4

CakePHP is so far easiest it seems. Once you figure out how to work with Bake commands it becomes a cake walk. I tried Yii, Zend finally settling with cakePHP. With Yii life seemed so hard. Zend was too big to handle.

abhay
  • 41
  • 1
4

There is also CodeIgniter which has many of the same sort of features, I suggest you check it out for comparison.

You can create some highly professional and scalable websites using these two frameworks. You are definitely headed in the right direction instead of writing vanilla PHP.

With these frameworks you benefit from using well proven design patterns e.g: the Model View Controller pattern and also utilize many helper classes for database access, form validation and security.

I personally use something called SilverStripe which is a PHP development framework that comes with an optional CMS out of the box so you can get creating basic pages straight away, it is also powerful enough that you can create complex customized web applications relatively easily.

I haven't heard CakePHP having poor support, but that's just me.

Whatever framework you end up choosing will definitely involve a slight learning curve. In my experience, when I started using a framework I started off cursing at the lack of flexibility in what I wanted to do, but this soon made way to the vast productivity improvements when you start learning the correct ways to do things and making use of the classes that do a lot of the heavy lifting for you (form-scaffolding, ORM, form validation, database access, security, etc.).

Good luck.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
hydrogen
  • 2,878
  • 21
  • 20
  • http://bakery.cakephp.org/articles/view/how-i-built-a-web-2-0-dating-site-in-66-5-hours - I just found this on google for 'sites that use cakephp' – hydrogen Sep 07 '10 at 07:27
2

Hmmmm. For a large scale website you are looking for the best option in my opinion.

CakePHP is helpful when your website require lots of customization. On the other hand options like Joomla or WordPress are good but not preferable for large scale website like you mentioned.

I know most of us had or will face difficulty for very first CakePHP website since it's difficult to find a solution when we are stuck in some cases, but you don't have to worry since we are here in Stack Overflow to help you out.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
nik
  • 3,688
  • 3
  • 21
  • 33
  • :) thanks for your nice answer. Wordpress or Joomla are not an option for me as this is going to be a complete custom app with social networking API integration. So it will be hand crafted. – happyhardik Sep 07 '10 at 06:33
  • 12
    Comparing a PHP framework to a CMS on a programming site disappoints me. – strager Sep 07 '10 at 06:35
  • @Happyhardick :: integrating API's won't be the problem in cakephp, I know cake do it very elegantly. – nik Sep 07 '10 at 07:10
  • 2
    @strager :: Apologies for your disappointment. When one hear loads of things done with php's, thats really confusing for the starters. – nik Sep 07 '10 at 07:13
  • thanks for this nice answer about CAKE – Bhanu Prakash Pandey Jan 24 '11 at 04:59
1

What about the Yii PHP framework? It's supposed to be fast and reliable.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
chrizonline
  • 4,779
  • 17
  • 62
  • 102
1

Yes, CakePHP works well even for large applications. I deployed a partner application on LinkedIn.com using OpenSocial and CakePHP and we were seeing more than 1000 new users everyday. It has been more than 2 years now and the app is seeing steady growth and the app's performance is still very good. (We back it up with 2 Apache web servers and memcached)

Gaurav Gupta
  • 5,380
  • 2
  • 29
  • 36