Let's start by looking at the root folder of my development version of Garden:
Here's a breakdown of what each root folder/file is:
applications: The applications folder contains folders, which in turn contain all of the files specific to each application. As you can see, I've got four applications listed here. The "garden" application is the base application of the framework that handles signing in, user, role, permission, plugin, and application management. The "skeleton" application is a set of folders and files that represents an empty application. Much like the "skel" methodology in Linux, with Garden's skeleton application, you can create a copy of it and treat it as a starting point for a new application (You could also call it an "application template"). The "vanilla" application is, of course, Vanilla 2.
cache: The cache folder is used as a general purpose cache for all parts of the application that require a caching mechanism. At the time of this writing, it contains the cache for HtmlPurifier and Garden's cached application settings. These are things like mappings of class names to their location on the filesystem, mappings of locale sources (ie. all "en-CA" definition files from all plugins and applications), etc. There may come a time when there are entirely cached pages or page views, but that will not be present at time of release.
conf: Anyone familiar with Vanilla 1 knows exactly what this folder is. The conf folder contains all of your custom configuration settings in a number of different php files as associative arrays. This folder and the cache folder will need write permissions for PHP.
library: This is the core libraries for Garden (aka. "where the magic happens").
plugins: This folder is the equivalent of the extensions folder in Vanilla 1. It contains folders which, in turn, contain all of the files for a specific plugin.
themes: View files, cascading stylesheets, and images that can be used for skinning all of the applications in your Garden installation.
.htaccess, INSTALL.txt, LICENSE.txt: These three files should be self explanatory.
default.php: This is the file that all requests to Garden are made through.
So, now that you know what the root folder looks like, let's take a look at one of the application folders. I'll use Skeleton since it is a basic representation of any application:
controllers: Garden is a Model-View-Controller (MVC) framework. The controllers folder contains all of the controllers for this application. Controllers handle all page, partial-page, rss, or any other kind of requests, and act as an intermediary between the models and the views.
design: Obviously there are themes available in Garden, but each application can also have it's own set of css and image files that it uses by default - those will be placed in the design folder.
locale: Localization files for this application.
models: Models in Garden will interact directly with your data sources (databases, flat configuration files, etc) and perform get, set, and delete operations. There is a general purpose model that Garden provides so that you don't need to create a model class to represent every data structure. However, there are times when you need to customize a model to suit the needs of your application. When you do, this folder is where you'll put those models.
settings: The settings folder contains the default application settings for this application. In Garden, it also contains the about.php file - a file which defines all of the information about this application, and the hooks.php file - which allows the application to use the Garden's event model to "hook" into other applications.
views: Of course, this folder represents the Views in the MVC pattern. This is where all of your xhtml for the pages will go, and it relates directly to the controllers that handle them.
|Edited June 2009 by Mark|