| Version 2 (modified by celso, 6 years ago) |
|---|
The Renderer's anatomy
This document provides simple instructions and a skeleton to build a Rendering Widget (ie: A Widget that displays a list of posts from an RSS feed).
SAPO::Widget namespace
This is where all the Widgets live. Each application's Widget should have it's own class and it's own method. For instance, Widgets for the SAPO Tags service are all implemented in the SAPO::Widget.Tags class.
What's a Widget ?
We call a Widget, something that takes a data feed (ie: an RSS feed), manipulates the data and presents the information dynamically that's rendered in the user's Web browser. Widgets can either be static or have user controls (ie: A photo album Widget can have previous and next buttons).
SCREENSHOTS AQUI
Basics
SAPO's Widget classes are build on top our own library. These classes often depend on other classes, depending on the functionality offered.
We can divide the Widget into 3 layers:
- The data layer (where you get the data from)
- The control layer (how you manipulate the data)
- The presentation layer (how you present the data, and draw the widget)
Data layer
Data is passed to Widgets as JSON arrays. These JSON arrays are often transformed RSS feeds. Our Webservices infrastructure provides real-time RSS-to-JSON transformations so we can have JSON arrays from any kind of RSS feed we know. This is an example JSON feed just transformed from it's original RSS feed.
Attachments
- mapwidget.png (42.3 KB) - added by celso 6 years ago.