Do you want iWidgets with that?

I’ve been looking at widgets and mashups a fair bit recently and one of the questions that comes up is around what the best approach for widgets is; should a single widget do a lot, or should multiple widgets be used instead. Obviously every situation is different and there may be reasons to favour one approach over another at different times. The following example occurred to me which might show what the pros and cons are.

Say I was developing a clock widget. There are already Google gadget clocks, so it seems like a reasonable widget to want to have. I could split different parts of the clock across multiple widgets, all sending/receiving events to coordinate the display of a particular time. In the example below, there’s a widget for the hour hand, minute hand, second hand, and whether it’s the morning or afternoon. There’s nothing technically wrong with the resulting mashup – I can tell what time is being shown – but using that many widgets does not really add any value, and there’s not a lot of space left for anything else on my screen.

clock-widgets

At the other end of the scale, the example below uses a single widget to display the time. On its own, there wouldn’t be much point using a widget to show the time. It might look funky (well, if any time had been spent making the clock look better than my quick sketches) and I could move it around but you could do all that with a bit of javascript and style sheets on any old web page. Except, if the widget sends and receives events, you can use it in a mashup. There’s plenty of room for other widgets, and in this example selecting a person shows where they are located and their local time, so I know if it’s a good time to phone.

time-mashup

Obviously a clock is a pretty specific, and simplistic, example. There’s a pretty good illustration in the Enterprise Master Data Management book (Figure 2.3, page 73) which shows the two extremes in more general terms:

The first clock was modular, but it was tightly coupled; there were several pieces but only one usage.

karvajavi-puzzle

Photo (cc) Karva Javi

The second clock, and other widgets in the mashup, were modular and loosely coupled; there were several pieces and many usages.

200px-Tangram-man.svg

(Now i just need to think of an example of a widget that does too much!)

Advertisements

One thought on “Do you want iWidgets with that?

  1. Pingback: I’m back « dale lane

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s