Widget framework

The IMu Widget Framework is a set of components which can be added to an HTML page to provide ways to browse, search and display information from EMu.

IMu widgets can be added to any HTML page. The page which includes the widgets may be:

  • A static html file.
  • Created using a templating engine such as PHP, JSP or ASP.
  • Generated by a CMS such as Joomla!, Drupal, Umbrarco or one of many other CMSes.

IMu widgets are created using JavaScript. The components themselves are based on the jQuery library. Before using the IMu Widget Framework it is recommended that you have some knowledge of JavaScript and jQuery. Tutorials are available at the excellent w3schools.com web site for both JavaScript and jQuery.

The widgets are designed to be both portable and adaptable. This means that they operate on a wide variety of platforms and browsers and can modify their appearance and behaviour based on the type of browser being used.

Tip: For a full list of environments in which the widgets have been tested see Compatibility.

What is a widget?

A widget is an HTML element (frequently just a plain div) whose content is managed by JavaScript. The key feature of a widget is that its content is created independently of the page it is part of.

Many web sites use widgets to embed advertising in their pages.

The IMu Widget Framework provides a set JavaScript components which can take control of one or more HTML elements in a page (i.e. transform these elements into widgets) and use them to display data from EMu.

How do widgets work?

When a web page is loaded by a browser, the browser runs any JavaScript which is included in the page.

In a page using IMu widgets small pieces of JavaScript identify which elements are to be used and what kind of widgets they should be converted into.

Once the widget code takes control of an element it works out how to display information in the element. Many widgets operate by requesting information from a server using AJAX requests and then creating HTML to display the information inside the original element.

Read on