Last week I started on a simple web app that only has three pages. After I got the prototype working I wanted to clean up the code and switch over to using a more robust framework. Normally I would use something like CakePHP (PHP MVC framework). But since this web app is so small and didn’t need all the extra power that CakePHP provided I decided the CakePHP is probably overkill. I did a quick google search and found a nano php web framework called NiceDog. Its a single file, very light, framework similar to web.py for python.
After playing around with the source code for a while I found a few bugs with the system. The tutorial also didn’t include a example project to download and try out. So I fixed some of the bugs and created the example code.
NiceDog nano php web framework example code.
<?php
/**
* Created by: Steven Smethurst
* Created on: 28 July 2012
*
* A example file for NiceDog php nano web framework found https://github.com/bastos/nicedog
*/
require 'NiceDog.php';
R('')->controller('Test')->action('index')->on('GET');
R('foo')->controller('Test')->action('update')->on('GET');
R('tag/(?P<tag>[-\w]+)')->controller('Test')->action('p_tag')->on('GET');
class Test extends C{
public function index(){
echo 'Hello world';
}
public function foo(){
echo "bar";
}
public function p_tag($tag){
$this->tag = $tag;
echo $this->render('views/index.php');
}
}
// This is the error page.
function r404() {
echo "Error: 404 Page not found";
}
run();
?>
In the end I decided against using this framework as it has obviously not been toughly tested enough for production and the lack of support from the community.

Being a bare php beginner programmer (only intranet stuff as of now), I wanted to move to something more OOP and robust, and finding the other contenders quite overkill as you say I saw Nicedog as an interesting point of entry. Too bad it seems to be abandoned for abut 4 years. Wondering what you decided to use in the end. For now I’m using some RYO library, as I’m using a WISP environment and I totally want to keep using adodb as it works fine for my needs. All said, Fat Free seems to be very interesting and I’ll be trying it out soon. Thanks for the article.