I am currently working on a web application project running on Linux and PHP for a client. I decided to use a framework to make my development easier and quick. The web application is not complicated but very basic, so I decided to choose a basic framework, the winner was CakePHP.
I am very impress so far. I am a completely newbie still but learning quick. CakePHP is very easy to setup and uses the MVC model (which I loved). Connection to MySql was as fast as setting up the connection string. Once you create your Controller and Model, you can specify the controller to run the built-in (yes.. one line of code inside the controller PHP file) scaffolding and be CRUD with any table in MySql in just minutes. There is a lot of good information and tutorials for CakePHP just in case you are wondering about documentation and a strong community around CakePHP.
Deploying. Yes of course, not every framework works on every hosting environment. I been happy with Fatcow for many years, but this was the first time I was working with this CakePHP framework so I was not 100% sure it will run. It should (but you know what happen to assumptions in the development world).
Well, Fatcow is able to RUN CakePHP with no problems (yeah, I did assume and just uploaded the test app). No Problem.
- Download CakePHP code. Extract.
- My extracted directory was: “cakephp-cakephp1x-1.3.0-0-g1c06478” (CakePHP version 1.3.0)
- Renamed that directory to the application name. Something like: “MyApp” will be fine.
- Deploy the directory to the root of the virtual folder set for the application: “/Domain Virtual Folder/MyApp”.
- Made changes to “/Domain Virtual Folder/MyApp/app/config/database.php” (renamed from default, MySql database was setup already).
- Made changes to the security “salt” (Don’t worry, you will see all this on the default page, but is not required anyways)
- Open your browser and point to: “http://YourDomain/MyApp” and TADA!!!
- If you create a MVC for table “Records” for example, and setup scaffolding, then you can point to: “http://YourDomain/MyApp/records”.
Of course I will have to improve on the scaffolding and learn how to use layout and CSS and all the design stuff in CakePHP, but for an hour or work, to be able to have a MVC application up and running with (admin) screens on some models is not too bad.