Rolling
[mkws-moved-to-github.git] / tools / htdocs / whitepaper.markdown
1 % Using the MasterKey Widget Set to embed metasearching functionality in any web-site
2 % Mike Taylor
3 % 26 July 2013
4
5 Introduction
6 ------------
7
8 There are lots of practical problems in building resource discovery
9 solutions. One of the biggest, and most ubiquitous is incorporating
10 metasearching functionality into existing web-sites -- for example,
11 content-management systems, library catalogues or intranets. In
12 general, even when access to metasearching is provided by simple
13 web-services such as [Pazpar2](http://www.indexdata.com/pazpar2),
14 integration work is seen as a major part of most projects.
15
16 Index Data provides several different toolkits for communicating with
17 its metasearching middleware, trading off varying degrees of
18 flexibility against convenience:
19
20 * libpz2.js -- a low-level JavaScript library for interrogating the
21   Service Proxy and Pazpar2. It allows the HTML/JavaScript programmer
22   to implement simple JavaScript functions to display facets, records,
23   etc.
24
25 * masterkey-ui-core -- a higher-level, complex JavaScript library that
26   uses libpz2.js to provide the pieces needed for building a
27   full-featured JavaScript application.
28
29 * MasterKey Demo UI -- an example of a searching application built on
30   top of masterkey-ui-core. Available as a public demo at
31   http://mk2.indexdata.com/
32
33 * MKDru -- a toolkit for embedding MasterKey-like searching into
34   Drupal sites.
35
36 All of these approaches require programming to a greater or lesser
37 extent. Against this backdrop, we introduced MKWS (the MasterKey
38 Widget Set) -- a set of simple, very high-level HTML+CSS+JavaScript
39 components that can be incorporated into any web-site to provide
40 MasterKey searching facilities. By placing `<div>`s with well-known
41 identifiers in any HTML page, the various components of an application
42 can be embedded: search-boxes, results areas, target information, etc.
43
44
45 Simple Example
46 --------------
47
48 The following is a complete MKWS-based searching application:
49
50     <html>
51       <head>
52         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
53         <title>MKWS demo client</title>
54         <link rel="stylesheet" href="http://mkws.indexdata.com/mkwsStyle.css" />
55         <script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
56       </head>
57       <body>
58         <div id="mkwsSwitch"></div>
59         <div id="mkwsLang"></div>
60         <div id="mkwsSearch"></div>
61         <div id="mkwsResults"></div>
62         <div id="mkwsTargets"></div>
63         <div id="mkwsStat"></div>
64       </body>
65     </html>
66
67 More sophisticated applications will not simply place the `<div>`s
68 together, but position them carefully within an existing page
69 framework -- such as a Drupal template, an OPAC or a SharePoint page.
70
71 - - -
72
73 Copyright (C) 2013 by IndexData ApS, <http://www.indexdata.com>