Let's create a simple, new application manually with the automated Wizard in Recess Tools, and then we'll walk through step-by-step what this wizard has done to set up a new application.

The New App Wizard in Recess Tools

To stay true to programming pedagogy let's create a "Hello World!" application.

Lets open up Recess Tools in a browser by navigating to the directory you installed recess to, /recess. This is probably http://localhost/recess/


The wizard kicks off by asking us for two names, first a human readable name. This is used by Recess Tools to identify the application. We'll name this application simply "Hello World". The programmatic name is what the wizard will use when generating the Application class and directory structure. The programmatic name should not have spaces and should be a valid PHP identifier, like HelloWorld.


Next we'll select a URL prefix for the application. A URL prefix determines how Recess will map a request URL to your application. Recess Tools, for example, has the prefix recess/. For hello world lets use helloWorld/.


At this point the wizard will generate a directory structure and some files that form the skeleton of an application. We will walk through what the wizard generates in detail in the following section. Let's keep going through the wizard which is asking us to place a string into the RecessConf::$applications array. The string 'helloWorld.HelloWorldApplication' references the HelloWorldApplication class which the wizard generated which is located in the apps/helloWorld directory.


Open your recess-conf.php file and find the RecessConf::$applications array. Add the line to the array as instructed. This array of strings tells Recess which applications are installed. Your recess-conf.php file should look like this:


After saving the recess-conf.php file we have finished installing our 'Hello World' application. By navigating to 'Apps' we'll see our application 'Hello World' installed on the list of applications. Go ahead and follow the link.


When viewing an application in Recess Tools we can see the Models, Controllers, Views, and Routes. Note the new application wizard created a HelloWorldHome controller for us.


The routes section shows us which URLs our application will respond to and which method in a controller is being mapped. We can see the url helloWorld/ will call the index method in our HelloWorldHomeController class. In a new tab try navigating to the location you installed Recess followed by /helloWorld/ (probably http://localhost/helloWorld/). You should be greeted with the default new application landing page:


We've now got a simple hello world application. In the next sections we'll explore what's going on in the Controller and View which the wizard generated.