Documentation


SEARCH

TABLE OF CONTENT

    1. Getting started 2. Basic concepts 3. Request dispatching 4. Context container 5. Dual MVC 6. Component model: 7. Security 8. Configuration 9. Session handling 10. I18n 11. Cache 12. Logging 13. Error handling 14. Advanced Topics 15. API reference

      Tutorials: Frequently Asqued Questions

      See also:


      Component types

      What a wonderful components world

      Table of Contents

      Classification

      Depending on the point of view we can consider the following component types:

      • Poolable and non-poolable components
      • Container and non-container components
      • Valueholder and non-valueholder components
      • Validator and non-validator components
      • A component can also be a composition from other components

      Poolable components

      Poolable components persist along the user session. Internally, the component lives within the component pool, a class designed for that purpose.
      A component implementing the __IPoolable is recognized by Lion as a poolable component. A non-poolable component just lives during the request, being not available to ajax calls nor the session.

      A component is created the first time the container view is rendered.
      A non-poolable component is created once and again the container view is rendered within different requests (during the same request, each component is created once).
      If the component is poolable, it persists during the user session.

      i.e. A textbox is created the first time the page containing it is shown. After that, it persists during the user session.
      It means that the textbox will remember the latest filled value, even if the user navigates to another page and come back again. In that sense, a component need to be reset or deleted to keep back the blank.


      Container components

      A component can (or not) contain more components. A component which is able to contain other components is a container component.
      A component implementing the __IContainer is recognized by Lion as a container component. A non-container component can not contain other components.

      It's a common practice to, instead of implementing the __IContainer, just extend the __UIContainer class.


      Valueholder components

      A component can (or not) be a valueholder. A valueholder component is a component containing a value (i.e. the typical form component, such a textbox).
      A component implementing the __IValueHolder is recognized by Lion as a valueholder component.

      It's a common practice to, instead of implementing the __IValueHolder, just extend the __InputComponent class.


      Validator components

      A component can (or not) validate other components. A validator is designed commonly in order to validate values contained in valueholders.
      A component implementing the __IValidator is recognized by Lion as a validator component.

      It's a common practice to, instead of implementing the __IValidator, just extend the __ValidationRuleComponent class.


      Composite components

      A component can also be a composition from other components.
      The most typical implementation is by a view defining the component from others, with defines his own event handler to dispatch events raised from children components.

      From outside the component, all the children components are part of the same component, which means that can't be handled individually.

      It's a common practice to, instead of implementing the __IComposite, just extend the __Composite class.