Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Saturday, January 16, 2010

Frameless PHP, or How to Write Ruby-on-Rails-like PHP Without a Framework

If you’re disciplined, you can write MVC code in PHP without using an MVC framework. The key is to have the right directory structure. For the Dowling's Wheel project I mentioned a couple of posts ago, I simply used the directory structure from Ruby on Rails. And no framework.

/app
..../controller
..../helpers
..../models
..../views
/db
/lib
/public
..../images
..../javascripts
..../stylesheets
/test
index.php

Check out the source code to see how it’s done.

4 Comments:

Post a Comment

<< Home