Home > Newsletter, Blog, and Other Topics > Topic

PHP Frameworks CakePHP

Posted by JeffS14 
This forum is now read only. You can not log in or make any changes. Please use the new forum linked above.
As of March 14, 2011, this forum has been replaced and is permanently set to read-only mode. This means you can view any existing post but cannot open new posts or reply to existing ones. The new forum is located athttp://www.larryullman.com/forums/If you need to post a message, you'll need to register there. If you have to post in order to follow up on a thread started here, well, that's going to be a bit of a pain. I would recommend just posting the appropriate information, or copying the original text from here, or linking to your thread here. I apologize for the inconvenience but this purge will make for better forums in the long run. Thanks.
PHP Frameworks CakePHP
April 23, 2009 03:12AM
Hi Larry, I Just received #20 and #21 today within minutes of each other.

Do you have any experience using CakePHP? It seams to have the same features as the Yii framework you mentioned. Especially the command line tool to create the CRUD scaffolds.
Re: PHP Frameworks CakePHP
April 23, 2009 05:27PM
Thanks for the post. I've heard good things about CakePHP but never tried it myself. The fact that it runs on PHP 4 rules it out to me. The object model changed significantly between PHP 4 and 5 and I just feel that any framework that runs on PHP 4 cannot take advantage of serious OOP benefits present in PHP 5. I understand why frameworks still do this as many hosts are still running PHP 4, but I'd rather have something designed for PHP 5.

Best Wishes,

Writer/Web Developer/Instructor
Forum Moderator
Re: PHP Frameworks CakePHP
October 07, 2009 04:33PM
All, from the FWIW department: (on the php5 limits)


CakePHP 1.2.5 Includes almost 40 commits and more than 20 fixes. Furthermore, due to popular demand CakePHP 1.2.5 is compatible with PHP 5.3 and includes fixes to suppress the deprecation messages. See the changelog[2] for a complete list of changes and bugs fixed.


Now, never believe what your read :-) as I just spent a week with it...(again) after spending much more than that 2 years ago on it. I figured last week I would give it another chance. *( That is after screwing with Symfony for 2+ weeks on and off, playing forum tag for answers)...watching the ONLINE docs get modified before my eyes, that were incorrect...yet others boasting nothing wrong.

As for the Symfony experience...was a download ( I had messed with it in May 2 times...just got flustered) but a few weeks ago I ran across a project. So, I said to heck with it...and Ordered a Book © 2007. Spent almost a week with things in it...just to toss back to the forum "Book Questions"...just to be advised to TARSH THE BOOK, use the Online Docs..

Moral of the story? Was that you're within a group of open sourcers, that spin their wheels trying to re-invent a mousetrap and yet they never get around to catching one. (And end up starving) :-)

This comes from a 51 year old, that beta'd with MSFT from 3.0-6.22, onto WinNT 3.5/3.51/4.0 teams (Instead of Windows) and while that also was with Borland dev team beta during C/C++ up until Delphi release or so.

Now, Symfony...I like what I read and the capabilities 'it boasts'...and FYI the core contains 2,975 files total of almost 14meg and swung to CakePHP after the flustration now unzips as 792 files for a hair over 7meg of core files. (ps... I ordered a book, not here yet... that si from 2008) but in the meantime I am still "on the hunt" for a simplified yet powerful MVC for my apps I want to do.

If these people (prospective clients) didn't insist on OpenSource PHP, and because the BUZZWORD of FREE (as relating to OpenSource) really degrades anything related to trying to make a few $$$...and then factor in their CRYS of "Help Me, I've lost money because I started with a TEAM IN INDIA"

I personally could have had what they needed fully done in my VisualStudio2003 framework by now :-) Oh well, just venting somewhat on the OpenSouce MVC's

Trying (2) more now (smaller code base, which would be easier to back track)...and if decent successful attempts come from them I will post back up here.

Only real reason I need to switch to them, is the breakdown of modules...and be able to control "pyramid level" for both user types...and on the fly permissions changes and addition of new groups that may also be created and then just have (2) files edits cover things global scope.

Re: PHP Frameworks CakePHP
October 07, 2009 05:46PM
lol seeing as how this thread has come up, and that I've looked over cakePHP in the last week, I actually have a reply to what Larry said about cakePHP being based php 4 (which in principle I totally agree with).

But first @trochia, reading your post just confirms to me how much using my own personal/custom framework saves on the potential headaches of using a one size fits all multi mega byte framework.

Back to cakePHP, pretty much all the classes in cake inherit from "Object". This class actually simulates constructor and destructor support for the php 4 folks. People using php 5 would get the default php 5 behavior and the php 4 folks would get the simulated behavior. Basically, Object has a method called Object which will call __construct and pass any args. Since php 5 bypasses the call to Object when constructing a class, this is a pretty sweet way to simulate __construct() in php 4.

For the __destructor, a shutdown function is registered if a __destructor() method exists and the php version is less than 5.

Method visibility is partially hacked, but is definitely not a full hack. Since passing an "action" in the url loads a method in the Controller being used, and since all methods are public in php 4, cake checks to see if methods are prefixed with an underscore to limit access to those functions.

This is of course the most limited of visibilities, but there's something there.

I haven't delved into it enough to know if they have attempted to bridge any other gaps from php 4 to php 5.

I definitely do agree that a framework written in php 5 is more attractive to me than one written in php 4. And imagine how many years it will be from now until frameworks will be written using php 5.3 syntax! (My personal ever evolving framework does hehe)
Re: PHP Frameworks CakePHP
October 07, 2009 08:06PM
For my own two cents worth, I will add that I'm just wrapping up two sites written using Yii and I was very pleased with the experience. So simple to work with and yet so powerful. One site was quite simple but required some hacking, the other site was kind of complicated. Pleased with both!

Best Wishes,

Writer/Web Developer/Instructor
Forum Moderator