PHP

Python

Javascript

Verilog

This mvc framework was built up from a tutorial I found at phpro.org. It serves to separate the data models, the application control logic, and view logic presented to the user. This separation allows for such things as easier implementaion, portability, and better testability to name a few.

The init.php file is used to include the application logic files as well as the data models(database). It provides for better organization of the code base.


<?php
/*** controller class ***/
include __SITE_PATH '/application/' 'controller_base.class.php';

/*** registry class ***/
include __SITE_PATH '/application/' 'registry.class.php';

/*** router class ***/
include __SITE_PATH '/application/' 'router.class.php';

/*** template class ***/
include __SITE_PATH '/application/' 'template.class.php';

/*** auto load model classes ***/
function __autoload($className) {
    
$file __SITE_PATH '/model/' strtolower($className) . '.class.php';

    if (
file_exists($file) == false) {
        return 
false;
    }

    include (
$file);
}

?>