CakePHP is an easy to use PHP MVC framework inspired by Ruby On Rails. It is one of the promising frameworks out there. In a previous article entitled "Top 10 PHP MVC frameworks" I gave it the 3rd place.
I tried to see today if it is easy to make it into a pear package. Why a pear package ? Because it will be easier to install with a command like:
pear install cakephp
and to update with a command like:
pear upgrade cakephp
This way cakephp will be installed in the pear directory (in my case /usr/share/pear) and not in the webroot folder (in my case /var/www/html). This setup has many advantages:
I know cakephp has a feature that makes easy porting Pear libs into Cake, but I think it's the opposite that should be done: porting cake into pear and not porting pear libs into cake.
A missing feature I'll appreciate to have in cake is a tool to create (update) application skeletons. The Bake tool should be improved.
Back to my essay, as I said, I tried to see if it is easy to make cakephp into a pear package. The first problem I see is the ROOT constant which is used in many places in the framework (32 times in 7 files. I'm using the latest version: 0.10.5.1790 RC 1). It makes the separation between the application and cake not easy because it is used by both.
To be continued....
I tried to see today if it is easy to make it into a pear package. Why a pear package ? Because it will be easier to install with a command like:
pear install cakephp
and to update with a command like:
pear upgrade cakephp
This way cakephp will be installed in the pear directory (in my case /usr/share/pear) and not in the webroot folder (in my case /var/www/html). This setup has many advantages:
- You can move your application anywhere you want without worrying about breaking the include paths.
- This way, cake will be a real multi applications and multi users framework. Only one setup is needed. Any user that has a public_html folder on the system can build as many cake applications as he wants (Hosting).
- When you need to update you cakephp framework, you update only one copy.
I know cakephp has a feature that makes easy porting Pear libs into Cake, but I think it's the opposite that should be done: porting cake into pear and not porting pear libs into cake.
A missing feature I'll appreciate to have in cake is a tool to create (update) application skeletons. The Bake tool should be improved.
Back to my essay, as I said, I tried to see if it is easy to make cakephp into a pear package. The first problem I see is the ROOT constant which is used in many places in the framework (32 times in 7 files. I'm using the latest version: 0.10.5.1790 RC 1). It makes the separation between the application and cake not easy because it is used by both.
To be continued....
15 Jan 2006 21:42:22
Guess more than one app per cake_installation is not wise.
When you upgrade, there's always a chance that any of last changes will break something in the apps.
I guess it is wiser to upgrade cake libs on a one per one app basis.