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:


      The Component Execution Model

      How components live

      Table of Contents

      Overview

      The component execution model is the piece in charge of:

      • Synchronize status between components and their client representation.
      • Execute the appropriate code in response to events, by delegating on the event management system.

      Let's see it in a diagram:

      Most important pieces within this diagram are:

      • Event handler: The event handler is notified about events as soon as they are fired from the user interface. Lion brings a default implementation, really useful since it has a naming convention to define methods associated to events and components: The __EventHandler class.
      • End-points: End points are classes representing properties, callbacks and whatever we need to bind between components and their interface representations.
        In that sense, there are 2 kind of end-points:
        • Client end-points, representing what we need to bind from the client-side (i.e. a text property within an HTML input element)
        • Server end-points, representin what we bind to components (i.e. a text property within a server-side component representing a text area).
        A pair compound by a client and a server end-points is what we associate in what we know as UI Binding, a rule about how client and server are synchronized to.
      • Component Pool: A collection where all the components within our application are living in. Components implementing the __IPoolable are stored automatically in the component pool during the user session until they are deleted.
      • Component Handler: Contain a reference to all the components associated to a concrete view.

      Event handler

      Everytime an event is fired in the client-side (i.e. a click on a button or just by changing the selection in a combobox) a piece within the server side will catch the event and execute a concrete code (if defined) as a consequence of it.

      The event handler is the piece in charge of perform this task. To read more about event handling in Lion, take a look at Event Handlers.

      End-points

      End-points represents properties, callbacks and