Once a controller method is called to handle the request, how is the xhtml of the page put together? Views.
There are two types of views in Garden: "Views" and "Master Views". A view relates directly to the controller method that called it and handles rendering content related to that request. You can typically think of a view as the content for that page. For example, if a Vanilla->Discussion->All() method is called, the view for that method would handle rendering all of the discussions. Everything that is rendered around the discussions is handled by the Master View.
The Master View allows you to create a consistent layout for the pages in the application. A single master view defines the look and feel and standard behavior for all of the pages (or a group of pages) in the application.
Let's go back to the filesystem so you can get a better picture. In the following example, the request in the url would have been: http://myserver.com/garden/profile/index/mark
So, this means that Garden's "Profile" controller was requested, the "index" method was requested from the profile controller, and the first argument into the index method is "mark". In other words, the request was: $ProfileController->Index('mark');

Let's take a look at the profile controller's index method:
public function Index($UserReference = '') {
$UserModel = new UserModel();
$this->User = $UserModel->GetByReference($UserReference);
$this->Render();
}
Simply put, the index method grabs some data that can be later used in the profile controller's "index" view, and then calls the Render() method. The Render method is defined on the base Controller class; the class from which all controllers are extended. The Render method performs the following tasks:
In the most simple example, the view will be as it appears in the image above: in a "profile" folder within the "views" folder, and named after the method that was called: /views/profile/index.php.
By default, the controller will fetch that view from the context of the FetchView method of the base controller class. In plain-English: the view file is included within a method on the Controller class called "FetchView". That is why I placed the user data within a $this->User property in my $ProfileController->Index() method, above; so it could be accessible from within my view file. The view file likely will contain something as simple as this:
Basic Information
Once the view is fetched, it is added to an asset collection. By default it is added to the "Content" asset collection. The rest of the page (the "Frame" of the page) is handled by the master view. By default, the "default.master" master view is used unless another master view is specified. In the image above you can see that there are a few different master views available in the Garden application: default, email, error, and setup. The css files for each of those master views are named accordingly, as well. So, the default.master view has a default.screen.css file, the error.master view has an error.screen.css file, etc. Again, in the most simple of examples, the master view is located in the "view" folder of the application, and the related css files are located in the "design" folder of that application.
Here is what the default.master view looks like:
<;head>
RenderAsset('Head'); ?>
$BodyIdentifier, 'class' => $this->CssClass)); ?>>