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.
Always amazed that people so often think the only way to do MVC is through a framework. Nice to see someone talking about rolling something light weight.
ReplyDeleteThanks Derek!
ReplyDeleteI'm doing the same but with Pyton and webpy. Check this out:
ReplyDeletehttp://github.com/alexksikes/googlemodules
Cool stuff, Alex!
ReplyDelete