...
The FarCry framework is based on a variation of the classic Model-View-Controller pattern. The COAPI (or Content Object API) is a high level name for the MVC engine inside FarCry. Without getting bogged down in the details of the framework, its good to have a high level or "helicopter" view of how things work under the hood. We'll expand on these themes gradually as you go through the course.
Mockup | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
Requests from users are processed by FarCry's built-in "smart controller" which automatically determines wiring based on the URL convention or the friendly URL sub-system. The COAPI always ends up calling a principal content type (a special type of class) that manages how we interact with the model
and view
. When thinking of views
(or webskins) its important to realise that they are always executed in the context of a specific content type.
...
Consider the following real world examples of composite views from the Fandango theme.
Mockup | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
Note |
---|
FarCry doesn't prescribe a specific templating architecture - you can get pretty sophisticated in your approach or keep it dead simple. Fandango is a good best practice starting point. |
...
Looking at our dmHTML content type in Fandango, we have at least the following views available:
- displayPageStandard
- displayTeaserStandard
- displayHeaderStandard
- displayFooterStandard
- displayBody
- displaySimpleSearchResult
Webskin Tracer
The tray that appears at the bottom of the website when you are logged in, contains a marvellous developer utility called the "Webskin Tracer". You can activate it for any page by simply selecting the webskin tracer option.
...