Ben Allfree :: Painless Programming

Guaranteed results for your micro-startup from a web designer who knows the difference.

mvcPress

mvcPress is a lightweight MVC framework for WordPress. It allows you to create fully-testable controllers, actions, models, and views and integrate them within a WordPress template.

Features
* View architecture based on Smarty
* Test framework based on SimpleTest
* PHPMailer for mailing
* ADODB for ActiveRecord
* Sub-layouts embedded in the WP theme
* Email/notification layouts

mvcPress is meant to be light-weight. I didn’t want to go all the way to something like Akelos or cakePHP when there were some nice established solutions out there already. Instead, I wanted a way to base a site upon WordPress but extensively customize it using an MVC architecture. So you might not like it, your mileage may vary :)

Download v0.1 (730K)

Installation
Copy the contents of the ZIP into your WP root.

Take a look at the index.php file included in the ZIP. This should replace your default WP index.html file. You need to make modifications.

Go find your theme’s index.php file and check out what sidebars and boxes it includes. You’ll want to include those in the MVC code here.

Pointers for Testing
Tests are run against the same database WordPress uses. They are run inside transactions, but that only works if you are using InnoDB tables in mySQL. Make sure that’s the case otherwise test data will accumulate in your database.

Getting Help
This is not so much a project yet as it is a code dump. If you want help and you don’t know enough about all the underlying technologies (PHP, Smarty, ADODB, ActiveRecord, PHPMailer, SimpleTest, and custom MVC code), just contact me to arrange for some consulting time. You can buy as few as 20 hours to get your project bootstrapped. It is well worth the investment if this is a new road for your venture.