NiceDog nano php web framework

1 minute read

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 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. 

* Created by: Steven Smethurst
* Created on: 28 July 2012
* A example file for NiceDog php nano web framework found
require 'NiceDog.php';

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";


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.

Leave a comment