Developing New Paths - The Mojavi Project

Mojavi Project

July 7, 2009

Using naming conventions

Tags:

Files

Overall

Mojavi’s file naming conventions are very simple, and overall easy to follow. The drivers that are required should be already included withing the PHP 4.0 structure.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 driver, 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. You also want to make sure that any drivers software that you have on your servers is updated with the latest patches in order to prevent any security loopholes

Classes

Methods

Leave a comment

RSS feed for comments on this post. TrackBack URL

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>