-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNOTES
26 lines (23 loc) · 1.48 KB
/
NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
1. With data-listing widgets, the problem is to take data and render it
in some fashion. So, the widget framework has to provide a way for the
widget user / provider to specify a format with the following enabling features:
- a way of naming individual data elements,
- a way to transform the named data,
- a way to render the transformed data using html elements along with styling,
- a way to attach other conditional processing
2. On the other hand, a template engine is more generic. It is a general engine
where html is interspersed with variables, along with a way to pick out data
from the context. For our purposes, we are going to focus on the data-listing
widget framework and not use the template-engine analogy.
3. The framework has to make possible the following:
- the widget provider should be able to modify the functionality of the widget
engine by simply writing additional code and use the widget-engine provided
hooks in the widget format code
- the widget user should be able to use the widget engine to pull json data
from wherever and render it using a widget format.
So, it should enable two distinct things:
- Help a site act as a widget provider by providing a json data feed and
writing a widget spec.
- Help a site owner to pull json data feeds from various sites and render
them on their site by writing appropriate widget specs for each of those
sites. Should make simple widgets easy to write!