Developing New Paths

The Mojavi Project

October-1-08

Naming Conventions

posted by admin

Files

Overall

Mojavi’s file naming conventions are very simple, and overall easy to follow. All files containing classes (including the framework libraries) are suffixed with .class.php

ex: A file containing the Controller class, would be named Controller.class.php

Actions

All actions in Mojavi are of the form [ActionName]Action.class.php

ex: An update action: UpdateAction.class.php

Views

Views are equally as simple as actions. A view is named after it’s action, and suffixed with View_[viewtype]. Actions have the ability to return different views, under different circumstances. There are three standard view types “input”, “success”, and “error”. You may use any other type of your choosing, but these are likely to be the three you will encounter the most.

ex: The success view for the update action: UpdateView_success.class.php

Templates

Template naming is left up to the developer. There are not restrictions on what these can be named, but it is often useful to name them after the view that called them.

Classes

Methods

Add A Comment

Technology Blogs - BlogCatalog Blog Directory