Chapter 3. The Structure of Recess Applications
Prev Part I. Getting Started Next

Chapter 3. The Structure of Recess Applications

A Recess application is broken down into three big categories of components: Models, Views, and Controllers.

Applications are stored in their own directory structure which is by default /apps. The Recess Framework has the ability to host multiple apps simultaneously. This is different from the Ruby on Rails or CakePHP model you may be familiar with. Within the apps directory there are subdirectories for each application: /apps/{appName}/, for example: /apps/myBlog/.

Within an application’s directory the structure is as follows:

  • apps/

    • myBlog/

      • models/

      • views/

      • controllers/

      • MyBlogApplication.class.php

    • myKillerApp/

      • models/

      • views/

      • controllers/

      • MyKillerAppApplication.class.php

The MyBlogApplication.class.php contains a class named, as you may guess, MyBlogApplication. MyBlogApplication extends from the class Application and is where application wide settings are specified.

In general the coding style of Recess encourages classes to be contained in their own file and requires these files to have the extension .class.php. This is an important convention for the Recess Library which handles the intelligent and high-performance inclusion of class files. This is kind of neat.


Prev Up Next
Recess Release Log Home Chapter 4. Hello World