lazy saunter

(personal learnings in computation)

Friday, August 01, 2008

cakePHP, an MVC framework for PHP

browsing job listings, there is a lot of java work to be done. specifically, java using an MVC framework for web applications. it would seem that a person that knows java stands much more "marketable" (or perhaps "useful" is a better term) with the addition of experience with a java-specific MVC.

the idea behind MVC is that the Model, or data (a representation of data held in a database), is separated from the View, the presentation or HTML layer of a web app, by Controller code. i dont use a java MVC because of (1) the perception that the initial configuration is significant, complex, and confusing, and (2) the apps i create are simple and usually need to be (or are expected to be) written quickly (therefore i use PHP for most of these).

however, today i began experimenting with a compromise: an MVC framework for PHP called CakePHP. it is based on the ruby on rails framework which i have played around with.

initial observations:
- using this does not require me to learn ruby.
- this doesn't require a special server (and on another port) to run like with ROR.
- installation is easy- all the files necessary for cakephp go in a web-accessible directory with the web files in this same directory.
- no modification to apache is required. if access to apache is available, an "AllowOverride All" line in the section for the specific dir in which the cakephp files will live can accomplish configuration. without access to apache, a cakephp project can still be installed and configured in a user directory but adding one line to the .htaccess file ("RewriteBase /~uname/cake_dir/") in the directory where it is installed.
- the tutorial from the cakephp website sets up a simple blog and works nicely. it is a CRUD app- create, read, update, and delete- the four actions that most of my apps do use. a simpler and faster way to make these would be great.

now to find a project to develop in this framework to test these claims...

1 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home