ShowTable of Contents
Introduction
Many people confuse the concepts of widgets, Web widgets, Google Gadgets (hereafter called “Gadgets”), iWidgets, and IBM® Lotus® Notes® widgets, often asking what are the differences and relationships among the five terms. In this article, we describe them through some practical examples, helping readers gain a more intuitive understanding of the five terms and an appreciation of the convenience offered by Notes widgets.
Widgets overview
In general, the term “widget” refers to any discrete object. In computer programming, a widget is a reusable element of a graphical user interface that displays an information arrangement and provides standardized data manipulation (per the wikipedia article, “
GUI widget.”)
Normally, widgets are quite small applications, easily embedded, and can run very fast. They can display news, videos, maps, and weather, or be a small game and invite users to participate.
Widgets come in many shapes and sizes, but two of the major types today are:
Web widgets, which are intended for use on Web pages.
Desktop widgets, which are embedded on local computers.
For example,
Widgetbox generates Web widgets that can be used on almost any Web site (see figure 1), while
Apple Dashboard widgets can only be embedded on the desktop of your local (Apple) computer (see figure 2).
Figure 1. Widgetbox
Figure 2. Apple Desktop widgets
There is also a type of widget that's run in smart phones such as iOS from iPhone and Android from Google.
Figure 3 illustrates the relationships among a widget, a Web widget, a Gadget, and an iWidget. The Web widget is a kind of widget, and both the Gadget and iWidget are a kind of Web widget. We will discuss them later.
Figure 3. Widgets' relationships
Widgets have many advantages, in that they are small pieces, fast running, and multi-shaped and have powerful functions, pleasing UIs, customized services, and are easy to make.
Web widget
A Web widget is a portable, reusable application or piece of dynamic content that can be placed into a Web page, per the wikipedia article, “
Web widget”. Web widgets allow users to turn personal content into dynamic Web applications. For example, you can add a lot of useful, interesting and beautiful Web widgets to your Facebook page to make it “cool.”
Web widgets also allow Web developers to integrate any widget code provided by the third-party Web site and aggregate all kinds of information and resources in their own Web site. In this way, Web visitors need not go to several different Web sites to get information.
For example, "Weather Report widget" could report today's weather by accessing data from the Weather Channel, and "News Report widget" could report today's news by accessing data from the News Channel, so that users don't have to go these Web sites individually.
Typically “Web widget" is just called "widget" for short. Though Web widgets greatly improve the user experience, they have some shortcomings, such as major implications in the areas of site performance and Search Engine Optimization (SEO), per the wikipedia article, “Web widget”. Widgets can also pose a security threat because they can be used for malicious purposes. (Desktop widgets, on the other hand, do not impact SEO or Web page performance.)
Gadgets
Gadgets are powered by Google, are
miniature objects made by Google users, and can be placed on any Web page. So, in short, Gadgets are a kind of Web widget that are powered by the Google Company; however, you can also add Gadgets to a computer desktop if you have installed the "Google Desktop" software.
Figure 4 shows the directory of Gadgets that you can add to your Web sites.
Figure 4. Directory of Google Gadgets
Google encouraged users' participation in using and creating gadgets. Your value as a user is well represented; with only a little experience with Web design or programming, you can make gadgets by yourself, using the Gadgets API (see figure 5).
Figure 5. Gadgets API
Listing 1 is an example of Gadgets XML code.
Listing 1. Example Gadgets code
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="hello world gadget" />
<Content type="html">
<![CDATA[
<script type="text/javascript" src="hello.js" />
<script type="text/javascript>
function helloWorld() {
};
</script>
Hello world!
]]>
</Content>
</Module>
iWidgets
A number of browser-based frameworks, each with their own component model, have been independently developed, resulting in a direct tie of components to the framework. This loss of interoperability between components and frameworks introduces an unnecessary issue for users seeking to direct one another to useful components or seeking to migrate their usage of a component to a different framework.
The
iWidget Specification is powered by IBM and focuses on how to ensure interoperability of the components between frameworks.
This specification defines a simple component model and how it can be extended so that interoperability is enhanced without the loss of more powerful extended features.
The iWidget is also a small application or piece of dynamic content that can be easily placed into a Web page. It is a reusable application designed to work within the framework that is defined by the iWidget specification. So, iWidgets are also another kind of Web widgets and follow the standard defined by iWidgets specification.
The iWidget specification defines characteristics of HTML markup, metadata formats, and JavaScript services for enabling aggregation of iWidget components into a single Web application. It can run in different browsers and can be used to build situational applications and in a mashup environment.
Notes widgets
The
Notes widget is a powerful and useful function offered by IBM Lotus Notes 8.0.1 and later versions. Unlike Web widgets and Desktop widgets, Notes widgets run in Lotus Notes (displayed in a sidebar application called "My Widgets", as seen figure 6), and Notes widgets based on other existing resources, such as Web sites, Lotus Notes databases, Gadgets, or feeds.
Figure 6. My Widgets sidebar in Lotus Notes
What a widget does is based on the widget provider. There are many providers supported by Notes widgets (see figure 7), and the exceptional convenience offered by Notes widgets distinguishes it from the other widgets.
Figure 7. Notes widget providers
There are three important terms we need to know about Notes widgets:
- Catalog. Catalog is a special Lotus Domino database containing widgets (see figure 8). Users simply drag a widget from the catalog to the My Widgets sidebar to install it. In addition, Notes widgets can automatically receive updates from the catalog, and users can publish their own widgets to the catalog.
Figure 8. Widgets catalog
- Widget. Widget is an XML document. What a widget does is based on the widget provider and the configuration information defined in the widget's XML, an example of which is shown in figure 9.
Figure 9. Widget XML
- Live Text. Live Text is a customizable mechanism that allows users to act on their important data in a Notes document. Users define what data is important to them by creating their own recognizers using regular expressions.
Lotus Notes automatically recognizes the data in a Notes document (such as Notes mail), allowing users to act on the data to trigger a related Notes widget.
Figure 10 shows a Live Text string underlined by a broken line in a mail document. Lotus Notes recognizes that this data is an address and, if you click the button, this Live Text will trigger a related Notes widget.
Figure 10. Live Text
Notes widgets offers users more convenient services than other kinds of widgets, namely:
- An easy but effective way to create Notes widgets, using other existing resources (Web sites, Google Gadgets, feeds, etc.) without requiring users to write any code or script. Notes widgets configuration wizards make it easy to create and configure widgets from a Lotus Notes view, Web pages, feeds, plug-ins or even Google Gadgets.
As illustrated in figure 11, When you click the Getting Started with Widgets button, the Start Configuring Widgets window displays (see figure 11). Here you can choose which widget provider you want to use to create a new widget and just follow the wizard; you don't need to write any code.
Figure 11. Start Configuring Widgets window
Lotus Notes can also recognize the type of your current context automatically. So if you want to create a widget from Gadgets, you simply open the Gadgets directory and click the Configure a Widget from Current Context button, and Lotus Notes will help you create a new widget based on the Gadgets provider (as shown in figure 12).
Figure 12. Configure a widget from Google Gadget provider
- An elegant drag-and-drop mechanism for installing widgets. In addition to dragging and dropping widgets from the widget catalog (see figure 13), the widget XML documents can be dragged from the file system or a Web server; basically, My Widgets accepts URLs ending in ".xml".
Figure 13. Dragging and dropping
- With Live Text, Notes documents can automatically recognize important data for users and allow them to act on it to trigger the related Notes widgets.
For example, you see an address in your email that you want to search through Google Maps. Normally, you would open a Web browser, go to the Google Maps Web site, copy and paste the address string, and click the Search button to get the information.
But with the Notes widgets and Live Text, Notes documents can automatically recognize this kind of data, so that you just need to click on the address in your email document, choose the related action, and then you can get the information directly (see figures 14 and 15).
Figure 14. Enable Recognize Live Text in this Document option
Figure 15. Trigger a widget by using Live Text
Conclusion
The Notes widgets features described in this article make Notes widgets more robust and convenient than widgets, Web widgets, Gadgets, and iWidgets, and can increase individual and team productivity within your organization.
Resources
developerWorks® Lotus Notes and Domino product page:
http://www.ibm.com/developerworks/lotus/products/notesdomino/
IBM Lotus Notes/Domino Forum:
http://www-10.lotus.com/ldd/nd85forum.nsf?OpenDatabase
developerWorks article, “Building composite applications with Notes widgets in IBM Lotus Notes 8.0.1”:
http://www.ibm.com/developerworks/lotus/library/notes8-widgets/
About the authors
Yan Cao is a Software Engineer working on Lotus Notes and Lotus Expeditor products at IBM's China Development Lab in Beijing. You can contact her for more information at
cycaoyan@cn.ibm.com.
He Wang is a Software Engineer working on Lotus Notes and Lotus Expeditor products at IBM's China Development Lab in Beijing. You can contact her for more information at
wanghebj@cn.ibm.com.