Oyeme CMS is a content management system built on PHP 5 and runs on an Apache server and uses a MySQL database for data storage. At the core of Oyeme CMS is an application framework that follows the MVC (Model - View - Controller) pattern. This means that developing sites using Oyeme CMS is simple, quick and stable. This developer's guide will walk you through the different components of building an Oyeme powered site, give tips on debugging your site and show the wide range of flexibility you have in building a site.
File Structure
So, you want to develop a site with Oyeme. You unzip your download and start poking around the many files and folders. Oyeme is flexible where it needs to be and, like many MVC frameworks, follows convention over configuration. This means that certain file naming and structure decisions have been made for the developer over offering endless and confusing configuration. The file structure of Oyeme is one of these conventions and can be seen below.
This file structure must be followed with the exception of the CSS, Javascript and Ajax folders being flexible.
So, How Does It Work? MVC in a Nutshell
The following figure illustrates basically how Oyeme CMS works.
A user lands on a page on your site. All page requests are sent the index.php file which loads all the necessary settings and calls the Router (classes/router.php). The router process the request and calls an appropriate Controller (controllers/controller_name.php). The Controller is the glue that pulls together data from your database and passes the data to the site templates in the Views folder. Many controllers use a common model named...wait for it....Common Model (models/common_model.php). Some also use a data specific model that is name after the Controller.
For example, landing on the blog page will invoke the Blog_Controller which also employs the Blog_Model. As the glue, a Controller gathers data from the database by using methods in the various model classes. The models handle requests for data from the database and pass this information back to the conroller. The controller can manipulate this data further and then pass the final resulting data to the Views.