In this page we'll look at what you need to know (and do) to begin working with a CFRhino based application.
Well for CFRhino, almost everything! Yes, your application name is one of the key pieces of information that CFRhino uses to work out what to render where and how. So the first step is to name your application. The core framework extracts the name of the application from the application scope. You would generally set this in either applicaiton.cfm or application.cfc.
<cfapplication name="example">
From here on in, we'll be working with our 'example' application. CFRhino relies a lot on naming conventions to find files and generally keep track of what's going on. And one of the most important conventions is the location of your application code. The basic rule is that there MUST be a directory named exactly the same as the application and it must be findable by ColdFusion immediately beneath '/applications/'. I generally locate the /applicaitons folder in my webroot (so CF will search it automatically). And finally, within this application directory, there MUST be a CFC named after the application.
So bringing all these things together, our example application would require the following folder structure:
{webroot}
\applications
\example
\example.cfc
Not to be confused with application.cfc, the application's component is the CFC found in the application's directory under the root 'applications' folder. This component can hold important data about how our application should work and how CFRhino should behave when dealing with it.
As we have already seen, the CFRhino framework contains an event system that allows events to be fired and handled by different parts of an application. One key use of these events is to tie extensions into our host application allowing them to be called and to pass information back. Handlers are registered automatically when the framework installs itself. It is these root cfc's that the event system finds and loads automatically. For more details on the event framework, refer to about events.
There some other application root files that must be available in order for the framework to startup successfully. Their names and a brief summary of what are:
{webroot}
\applications
\example
\example.cfc
\components
\config
\controllers.xml
\datasets.xml
\locals.xml
\pages.xml
\controllers
\extensions
\layouts
\pagelets