User interface (UI) components, also known as controls or just components, are elements in charge of the interaction with the end user. It's done in several ways: by rendering the interface, sending client events to the server side, showing pieces of the model to the client, ...
Creating UI elements as components (like a calendar or a rich HTML input component) makes development easier because the core functions are encapsulated within a reusable piece of code.
You just need to care on where to place the components as well as which logic will be executed for each event. If you have experience on classic desktop application development, you'll probably understand what we are talking about.
A well defined, familiar idiom for UI design
Are configurable, reusable elements that compose the user interfaces of Lion application
Can be simple, like a button, or compound, like a table, which can be composed of multiple components
Extensible through composition, adding new components
Accessible via tags in template pages
The component model
The Lion component model is compounded by the following parts:
A component tag language to easily define components within our templates.
A component execution model which includes an event management system in charge of dispatch events fired from client side as well as synchronize component values between client and server.
A default set of user interface components out of the box.
Component Tag Language
The component tag language eases the definition of user interface components within our templates.
Component tag language offers an extendible XML-based syntax that is interpreted by the framework and replaced by client-side specific code in run-time (i.e. XHTML + javascript code).
Note that Lion does not parse our templates once and again. Instead of that, it moves some information regarding the components to the cache in order to optimize the rendering process.
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 to the event management system.
Component events (such a click in a button) are intercepted by Lion and sent to the correspondent Event Handler.
All the views have an event handler associated to. The event handler usually contains specific logic to be executed in order to handle each event.
See the Event Handlers section for more information about event handlers.
See the The Component Execution Model section for more information about how the Component Execution Model works internally in Lion.
Default set of user interface components
There are several user interface components out of the box within the Lion distribution