One of the problems we’ve had over and over at Index Data is that we build all these cool back-end tools — things like the metasearching middleware Pazpar2 — but then don’t have a good way to show them off. We’ve never really focussed much on building UIs, so we have to do demos that go like this:
… And then you just type this 200-character URL into your web browser, and you can see this XML response that comes back, and then you just take this identifier from this bit of the XML structure and use it to build this other 200-character URL, which …
Yesterday, we launched a new toolkit that changes that — the MasterKey Widget Set, or MKWS for short. The idea is that you can add widgets to your existing web-site — ILS, content management system, blog, or whatever. The widgets provide broadcast searching quickly and painlessly, customised to fit the way you do things. One widget for a search box, one for result records, one for facets, one for switching between UI languages, and so on. Mix ’em and match ’em. The individual widgets are HTML <div>s with well-known ids beginning with mkws: for example, <div id="mkwsSearch"> provides the search box and button.
So for example, the following three lines of HTML constitute a complete, functional (though ugly) metasearcher:
The search-related content (search boxes, results, facets, paging controls, sorting controls) are all styled with CSS using MKWS-specific classes. You can easily override those classes with your own CSS, to match the widgets to your own web-site’s look and feel.
Once you move past this very simplest kind of MKWS application, you can have a lot of control over behaviour. We’ll look at some of the other options in subsequent posts, but if you want a sneak preview, take a look at the MKWS manual, Embedded metasearching with the MasterKey Widget Set. There are plenty of examples linked from the home page, too.