Fuelphp
Laravel - Next big thing
CIBonfire - dead
Slim
Silex
Tiny MVC
http://net.tutsplus.com/tutorials/php/create-your-first-tiny-mvc-boilerplate-with-php/
index.php
require 'load.php'
require 'model.php'
require 'controller.php'
new Controller();
application/
/controller.php
class Controller {
public $load;
public $model;
function __construct(){
$this->load = new Load();
$this->model = new Model();
// do routing
$this->home();
}
function home() {
$data = $this->model->user_info();
$this->load('view/someview.php', $data);
}
}
/model.php
class Model {
public function user_info() {
return $results_array;
}
}
/load.php
class Load {
function view($file_name, $data) {
if (is_array($data) extract($data);
include 'views/'.$file_name;
}
}
views/
/someview.php
html goes here
Routing
$parts = explode('/',$_SERVER['REQUEST_URI']);
$this->_controller = ($c = array_shift($parts))? $c: 'index';
$this->_method = ($c = array_shift($parts))? $c: 'index';
$this->_args = (isset($parts[0])) ? $parts : array();
modular design: http://www.slideshare.net/nzakas/scalable-javascript-application-architecture
Main considerations: Total unification. I want a framework that works smoothly with a javascript framework.
I want to spend less time creating things that have already been created, but at the same time I don't want to use shit.
buddypress elgg
Patterns of Enterprise Application Architecture (I strongly urge you to read Martin Fowler’s book if you want to become a good OO programmer and easily understand the likes of Zend Framework).
I've used...
http://php.net/manual/en/function.method-exists.php http://anantgarg.com/2009/03/13/write-your-own-php-mvc-framework-part-1/