[Part 2 in a 5 part series titled "How to build a widget"]
Widgets in reality are actually like little mini-web sites contained on a users blog/social page. The “embedded chunk†of code is hosted by the widget owner (you) but instead of just displayed on one location (your website), the widget is displayed virally on an infinite number if websites.
This “embedded chunk†requires some specialized tech to pull this off.
2)Â Choose the technology
There are basically two categories of technologies used to create widgets:Â HTML/JavaScript and third-party plug-ins.
HTML/JavaScript
A widget developer could craft the entire widget using HTML/JavaScript. With the combination of AJAX and DHTML a developer can create at least 4 of the 5 categories of widgets (I am going to leave out the “Games†category since advanced animation is tough to deliver in a JavaScript environment. Agree/disagree?) Â
HTML/JavaScript only relies on the browser to render the widget, making it the purest way to craft a web widget.Â
Pros:
- JavaScript can encapsulate the “embedded chunk†of code to a small snippet.
-Â HTML/JavaScript is a coding common paradigm known by many web developers.
Cons:
-Â Many social sites forbid JavaScript since it could promote cross-scripting attacks.
-Â Animations and other rich content are very hard or impossible to reproduce using JavaScript.
-Â The HTML/JavaScript code could be seen by site visitors.
Third Party plug-ins
The other common source of widget development takes place as third party plug-ins. The most popular third party widget platform is Adobe’s Flash. Flash allows the developer to create rich environments and user interfaces using their designer and ActionScript programming language. Flash debuted as a third party technology in 1996 and has over 90% browser saturation.

Adobe Flash
Â
Another third party widget platform gaining ground is Microsoft’s Silverlight. Silverlight allows you to create rich environments and user interfaces using MS .NET platform. Silverlight broke onto the scene in Dec 2006.

Flash still has more popularity as a widget platform due to its tenured status, but given the sheer volume of .NET programmers it may not be long before we see Silverlight as popular in widget development as Flash.
Pros:
-Â Flash is accepted by almost all blogs/social pages.
-Â Rich content and animation is very possible in Flash/Silverlight.
-Â Flash/Silverlight is much more locked down in terms of code visibility.
-Â Widget distribution sites generally favor Flash over JavaScript/HTML
Cons:
- Flash requires you to purchase Adobe’s Flash product to develop widgets.
- Learning .NET/ActionScript.
-Â Flash/Silverlight widgets are generally larger then HTML/JavaScript widgets in terms of download size.
When I was developing MyVGift.com Virtual gift widget I chose to use Flash for two reasons: One, I wanted it to be able to be deployed on as many blog/social pages as possible (This ruled out HTML/Javascript). Two, Flash is much more available (at present) then Silverlight.
I would like to possibly write my next widget using Silverlight since I have been working with programming Microsoft software for the last 14 years. I strongly believe that Silverlight will play a major part in having widgets grow across the web in the coming years.
So if you are just writing a widget that is targeting Blog sites, HTML/JavaScript may be a good choice. If your widget relies heavily on animation and you want it to have a wider reach, then Flash/Silverlight may be the option.
Next – Part 3 – Creating the widget.
Part 1 | Part 2 | Part 3 | Part 4 | Part 5