Terça-feira, 10 de Março de 2009
[caption id="attachment_188" align="alignnone" width="450" caption="This diagram shows the overall structure of the Widget Platform"]

[/caption]
Let's make some sense out of all of this, step by step.
Widgets in the Cloud
This component represents all the widgets that are available for display inside the platform. These should be implemented using the
UWA specification, an API made available by
Netvibes. Both the location and business logic of these widgets are completely separated from the platform itself, allowing for independent widget design. Besides this, by using UWA to power the widget platform we gain instant access to an already huge library of user-developed widgets, as well as ensure widgets built by our team run in a growing number of platforms supporting the UWA standard:
Netvibes,
iGoogle,
OSX Dashboard and
Windows Vista Gadgets, to name a few.
Widget Server
Based on the
open-source Netvibes platforms, the Widget Server comprises two key components:
- the Exposition Server which, in its essence, is a PHP application that parses and prepares widgets for display in two different formats: standalone mode (used for widget development purposes) and frame mode (this is the mode used by the Widget Platform);
- the Javascript Runtime, which creates an execution environment for each widget, and is responsible for adding all the behaviours specified by the UWA.
I've modified some of the original files, in order to make the platform run completely independent of the Netvibes servers, as well as to be able to incorporate in each widget a custom stylesheet which gives it some basic styling rules (which can obviously be overridden by specifying new ones in the widget code).
I'm also considering the possibility of using this same method to add one (or more) Javascript files, in order to include the (most awesome)
jQuery library. I've received some complaints from the widget development team that the methods specified by the UWA are too shallow and limited, and they wish to harness the power jQuery offers in order to build more attractive and functional widgets.
Widget Platform
The Widget Platform itself is currently little more than XHTML, CSS and Javascript. In the near future, it will be integrated in a CakePHP application for dynamic behaviour. The widgets are parsed by the Exposition Server, rendered in frame mode and then displayed inside iFrames (yes, I know this sucks, but I couldn't get around it no matter what). The widgets are able to communicate with the platform through this
very well documented technique. Once again, I've modified some of the core files in the Javascript Runtime to allow for custom messages to be sent to the platform. The platform receives these messages and decides accordingly on what to do.
The rest of the platform uses jQuery to allow for full interactivity with both the widgets and the platform environment itself. The currently supported features include:
- Different user-defined areas in which to place widgets, as well as creation of new areas;
- Three-column resizable layouts to arrange widgets in;
- Dragging and dropping widgets around, either inside the same area or across different ones;
- Ability to collapse, expand, refresh, edit and delete widgets;
- Ability to attribute different colours to each widget's title bar;
Only partially implemented right now is the 'Add Content' menu, which allows the user to search for widgets (either by full text search or by category lists) and drop them in an area of choice.
Future plans include the ability to select from a list of different area layouts (so the user is not limited to the initial three column layout), support for different themes and customization of the header space. Also in the works is the ability to attribute custom names for areas.
I hope you enjoyed this small technical intro to the widget platform. It is still only in a (very) alpha state, and it should take some rather dramatic leaps in the very near future. If you're interested in seeing the current look and feel of the platform, feel free to check out
this screencast I made (it's spoken in Portuguese, but you can pretty much get what is going on).
[...] Widget Platform Technical Specification em SAPO Campus [...]
Comentar: