Note: This Section is Details Oriented

This section describes the files that Recess Tools will create automatically when starting an application. You can safely skip this section if you are not interested in those details right now.

Behind the scenes of the new application wizard a couple of steps happen to kick off a new application. There's nothing to stop developers from doing this manually should the need arise.

The first step is creating the application directory structure. After installing Recess open up the 'apps' directory. Create a new sub-directory with a name for your application like 'helloWorld'. Directories in Recess are typically named using the camelCaseConvention.

Now create the following 'views' and 'controllers' sub-directories so your structure looks like this:

  • apps/

    • helloWorld/

      • models/

      • views/

      • controllers/

After creating the directory structure, the next step is creating a sub-class of Application. This class holds settings specific to the application such as the location of views in the directory structure and the prefix of models and controllers in the class path. In the apps/helloWorld/ directory create a new file named HelloWorldApplication.class.php. The '.class.php' extension is an important distinction for the Recess Library to know the file contains a PHP class named HelloWorldApplication. The class should be specified as follows:


Now that the HelloWorldApplication class is setup our last step is to 'install' the application into the recess-conf.php file. Within recess-conf.php there is an array of strings named RecessConf::$applications. These strings point to application classes in the class path. The apps folder is in the Library's class path so we can reference the newly created HelloWorldApplication using 'helloWorld.HelloWorldApplication'. If we were to put the HelloWorldApplication class in a subdirectory called app within the helloWorld subdirectory the fully-qualified class name would be helloWorld.app.HelloWorldApplication. The convention of single classes per file and directories being broken up with dots is an influence from Java/C# namespacing. Library is covered in later documentation.