Content / help / biscuits .. concise-view << previous next >>

MVC and Biscuits

MVC - Model View Controller

In the MVC model, the address in the browser address bar does not refer to the location of the page being loaded. Instead the .htaccess file routes access to everything on the server to the index.php file in the route directory. This index.php file then determines what programs will load the content.

MVC URI segments

If we take the example, we see can see that the first 'segment' of this URI is member and the second login

Traditionally in an MVC model this means that a server side method call member executes a function or method called login

View Files

The MVC model separates, as far as possible, the content pages from server-side software and any elements not related to the page content.

Take the example, The biscuits controller will instantiate a class called my-class. (The filename has to match the class name. So the php file containing my-class must also be called my-class.php There is no absolute reason for this but this is the way biscuits MVC works.

A typical my-pageload function or method inside the my-class class, could load a single content view file like this:

public function my-pageload() {
   $viewData = array(

iBiscuits LOGO