Renders the model into a form suitable for interaction, typically a user interface element. Multiple views can exist for a single model for different purposes.
Simply speaking it takes your model (data + Business rules) and make it the web page you see.
For example,
View today shopper bonus
Model:
Retrieve shopper points
Apply rules to it, 1000-3000 points= golden customer
Check today amount of money spent
Apply today promotions 1000-5000 $$ -- get --> Microwave
View:
Will take this information from the model and display a screen showing the prizes the customer won.
Tequila uses many elements to make a view
HTML template
Template engine
Language file
PHP file
Optional View strategies
Tequila likes templates but hates template sub-languages, still it would be pretty easy to adapt the template engine of your preference.
It depends mostly on your abilities, if you are more a designer or a developer,
I'm 100% developer:
You should start the application from the model,
Code the PHP _view page
Check if any strategy is good for you to save code writing
Make a simple template to match the data you are showing
Let a designer later on make a beautiful template using the elements that you used.
I'm more on the design side:
Start with a template
Make a good CSS and put it apart
Identify the section that repeat (i.e. product, employee, news list) and mark them as blocks
Move the text / labels from your design to the language file, i.e.
Language: $lang['lbl'][lbl_entername] = "Please enter your name...";
Replace any label (text not coming from db) for placeholders,
Template: "Please enter your name..." -------> {lbl_entername}
Work the PHP view file
Tequila prefers to keep the templates easy and to split design and functionality for real, we believe that while most template engines are very powerful they are not very clean and they force you to learn one more language, end of the day, we believe they have lost their purpose keeping code and design independent, not just making it a different language.
We found TemplatePower to be a very simple engine that do it's purpose
When your model is quite long or complex you need to make a lot of assignments and block creations, even more we find most of the stuff we need to code is very repetitive, i.e.
Display one object
Display one array
Display an array / collection of objects
Display a list
etc..
Tequila uses a set of strategies to perform this tasks, you can do this simple actions or even really complex ones, like YUI trees, auto complete fields, organizational charts, etc.. using strategies. View strategies for more info