Separating CakePHP App from Core.

Why would I do that?
-Easy to upgrade
-Easy to deploy new apps
-App isolation from Core

These steps should be fairly straight forward and easy to follow. The way we set it up puts the core in the root, so this will be good for local installations on mac/linux. You can set it up for a shared environment, but I will leave that for another day.

Note: This is showing CakePHP 2.1.1 but the steps are the same for later versions.

Step 1 - Download core and place files in the proper folders.
Make the initial directories. The first is what we will connect our App’s to. The second will contain the core itself.

mkdir /var/cake
mkdir ~/CoreCode
Now lets download CakePHP from and extract it to our folder. Then lets rename it to something easier to read.

cd ~/CoreCode
wget <a href="" target="_blank"></a><br />
tar -zxvf<br />
mv cakephp-cakephp-0cad237 cakephp-2.1.1
Step 2 - link the core directory to our CakePHP core.

cd /var/cake
ln -sfn ~/CoreCode/cakephp-2.1.1/ cakephp2
Now we can take the app folder from the CakePHP core (in ~/CakeCore/cakephp-2.1.1) and place it in our webroot that will broadcast our applications. This can be in a variety of places. /var/www; /var/webroot; ~/public_html and more depending on the server configuration.

cd ~/CakeCore/cakephp-2.1.1
cp -av App ~/public_html/
Note: at this point the ‘App’ folder doesn’t need to be called ‘App’ it can be named anything, or you can take it’s contents out and place them in which ever directory you desire.

Step 3 - Configure the application to the core
This is clearly the most important step. Change the Keys and connect to the database. This is normal and won’t be covered. What is different is now we will link our App to our Core. Navigate to App/Webroot and open index.php Uncomment the following line:

//define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
and change it to the following:

define('CAKE_CORE_INCLUDE_PATH', DS.'var'.DS.'cake'.DS.'cakephp2'.DS.'lib');
We should be all configured and setup now to connect properly to our core. We can repeat this step as needed. You can also download this awesome start app which includes Twitter Bootstrap (a killer CSS library) and jQuery.

Click here to download the starter app.

So, CakePHP is great, but out of the box, there is just a few things design wise that it lacks. CakeApp is a pretty CSS (Thanks to TwitterBootstrap) and jquery extension to CakePHP, which it has neither of by default.

Here is a link to the GitHub repo for the read-to-go app.

This is a much earlier UI, done several months back. It was left very unfinished.

Did a new UIKit today. Quick. Simple. Pretty. This is version 1, and I am up for suggestions.

Toggles I did Today. Colorful. Shiny Black Metal