Creating Mashups in Intel Mash Maker

Submit New Article

Last Modified On :   October 15, 2008 5:25 PM PDT
Rate
 


Table of Contents

Creating Mashups

Mash Maker mashups can be categorised into the following categories:

  • A Widget: is a interface component, written in javascript, providing a graphical interface for semantic data.
  • A Path: is a property of an item on the page that can be found by following links on the page
  • A Join: adds information from another page by connecting it to data on the current page 

In this section we will be talking about how to create join widgets. Path mashups are created automatically by mashmaker, and widgets are created using an interface that has not been fixed at the time of writing.

If you want to see some example mashups, right click on any mashup button and select "edit this mashup" to see the definiton of the mashup.

Note that the mashup creating interface is rapidly evolving and this document may not always be entirely up to date.

Copy and Paste

The key principle of mashup creation is copy and paste, using the copy and paste buttons on the toolbar. If you want to augment page A with content from page B then you first browse to page B, click "copy", then browse to page A, and click paste. Assuming both pages are understood by Mash Maker, when you click paste you will be presented with a dialog box like the following: 

The fields can be interpreted as follows:

  • Add to each element on the page: If checked, the mashup will annotate elements on the page with additional content. If false, the information will be added to the page as a whole. [In the future, this may be extended to support elements of a particular type] 
  • Input: Arguments to the website being pasted. See the section on arguments.
  • Output: What we should add to the page. See the section on output.
  • Sharing: Metadata used when sharing with other users
  • Name: The name to use for this mashup. Note that, at present, mashup names must be globally unique.
  • Description: A description for this mashup. This is the description that will appear in a tooltip when the user hovers over the mashup button
  • History: When editing an existing mashup, view past revisions, and revert to a previous version if necessary
  • Keep this mashup private: This mashup is unlikely to be of use to other people, and should not be made visible to other users. Please do not make a mashup public if it is just a test.

The blue header bar gives the title of the page being inserted, as specified by the arg handler (if present) or the extractor.

 

Passing Arguments

When you click copy on a page, Mash Maker does not actually record that page, but instead records what it believes that page means. For example, if you go to a Google Search and click "copy", Mash Maker does not copy that page, but remembers the concept "Google Search". See the chapter on arg handlers for more information on what copy actually means.

If a page has an argument handler registered for it, then the paste dialog will have an "input" group, allowing one to provide values for each of the arguments that the website has. Arguments will typically correspond to form arguments of the form that generated the page.

There are two ways to specify the argument. Either type in a constant value (e.g. "food"), or use the drop-down menu to select a property of the object being annotated:

The properties listed will include properties that were added by other mashups. In the screenshot above, the "address" property was generated by a path mashup.

You can also select global properties such as "current location" - which corresponds to the user's current location, or you can leave the value to be specified later.

Output Types

 The output panel allows one to select what kind of information one would like to add to the host page. The screenshot below shows the available options:

The options are as follows:

  • The Entire Web Page: Insert the web page as it is. This is the only option of the page does not have an extractor.
  • All items on the page: Display all items on the page in a table widget
  • A property of the first/last item: Add a property (to be selected) of the first or last item extracted from the page being pasted
  • A property of a particular item: Select a particular item based on certain criteria
Selecting an Element

If the output mode is set to "a property of a particular item" then the user interface expands so that you can specify the criteria used to select which item should me selected:

At present, the interface is restricted to allowing you to specify a property of the item being selected, and operator, and a property of the item (or page) that data is being inserted fore.

Deferred Arguments

You don't have to specify all arguments now - you can leave some for later. To do this, simply select "? ask me later" as t he value of the argument. Mash Maker will then use this mashup as a template for creating new mashups, based on pages that the user browses to. For example, if you create a mashup for adding listings from Yelp, but don't specify what you are searching for, then Mash Maker will guess things that the user might want to search for, based on their past behaviour, and automatically generate instances of this mashup to search for things the user might be interested in.

If you make some arguments deferred then you will need to include markers in the name and description that tell Mash Maker where it should insert the final values when it generates instances of this mashup. If one of the markers is ommitted then Mash Maker will warn you. The markers are written as $n, where "n" is the argument that was deferred. See the screenshot below for an example:

The screenshot below shows examples instances of the above mashup that Mash Maker creates. In this case we can see that Mash Maker suggested plumbers because the user currently had a search for plumbers open. The search for food is suggested because the user was looking at food recently.