Views are Objects capable of producing HTML output.
There are many standard view classes.
Goals and Features of View
- Represent self-sufficient object which can be re-used on different application pages
- Separate UI logic (view) from template. Allow to use same logic with template of choice
- Move heavy processing logic into render() while keeping init() lightweight
- Permit Controllers and sub-objects also add output into view's template
- Support chaining which is used to define view's configuration
- Implement js() method for easy event binding
- Populate some tangs automatically
Other Resources, Blog posts: