View Objects

set('View Demo');

setTitle('Sample Frame');

Views are Objects capable of producing HTML output.

There are many standard view classes.

View is a fundamental building blog representing the area on the HTML page. View classes inherit from either AbstractView or "View" class.

Any view has a template property containing a SMlite instance. Normally the render() method will append content into owner's template. Property "spot" determines where output appears exactly.

Table of Contents:

Goals and Features of View

  1. Represent self-sufficient object which can be re-used on different application pages
  2. Separate UI logic (view) from template. Allow to use same logic with template of choice
  3. Move heavy processing logic into render() while keeping init() lightweight
  4. Permit Controllers and sub-objects also add output into view's template
  5. Support chaining which is used to define view's configuration
  6. Implement js() method for easy event binding
  7. Populate some tangs automatically

Other Resources

Other Resources, Blog posts: