Nov 27, 2010

Prepare the application skeleton

At this step, Simplemvc should be configured. In this part, we will start building our new application called front which will be the front end application.
Lets create the squeleton needed for a standard application. Since all the code is driven by classes and that Simple MVC uses an autoloading mechanism, is is not necessary to place the classes in a defined folder. But it is good to have some logic decomposition of the classes. Also, this could facilitate to have a namespacing implementation. The Simple MVC Autoload system supports perfectly Namespaces. there is even a Namespaces branch at github.
Here is a sample :

$ mkdir business/front
$ cd business/front
$ mkdir controllers models views container forms helpers templates
$ cd ../../
$ tree
`-- business
    `-- front
        |-- container
        |-- controllers
        |-- forms
        |-- helpers
        |-- models
        |-- templates
        `-- views

This is what we need for the moment as folders in the business layer.
We should do one last thing to get the structure complete, under the root folder :

$ cd www
$ mkdir images scripts styles
$ tree
|-- images
|-- scripts
`-- styles

In the next section, we will start with the bootstrap file, check it here!

Leave a comment