07be7c49865b857b9e9dde35ea5478b533ed1df1
[mkws-moved-to-github.git] / doc / index.markdown
1 % MKWS: the MasterKey Widget Set
2 <!---% Mike Taylor
3 % June 2014-->
4
5
6 Add metasearching to your web-site painlessly
7 ---------------------------------------------
8
9 The MasterKey Widget Set provides the easiest possible way to enhance
10 an existing web-site with customised searching across multiple
11 sources, ranking and merging the results.
12
13 All you need to do is pull in our JavaScript and optional stylesheet,
14 then add `<div>`s to your page that have special `class` attributes. We
15 do the rest.
16
17 A minimal example
18 -----------------
19
20 Here is a completely functional (though ugly) MKWS-based
21 searching application:
22
23         <script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
24         <div class="mkwsSearch"></div>
25         <div class="mkwsResults"></div>
26
27 That's it. A complete metasearching application. Everything
28 else is refinement.
29
30 Documentation
31 -------------
32
33 * This file.
34   [<a href="index.pdf">PDF version</a>]
35 * The <a href="README.html">README</a> -- mostly technical details.
36   [<a href="README.pdf">PDF version</a>]
37 * The <a href="mkws-manual.html">MKWS manual, including a reference section.</a>
38   [<a href="mkws-manual.pdf">PDF version</a>]
39 * The <a href="mkws-developer.html">MKWS developers' guide.</a>
40   [<a href="mkws-developer.pdf">PDF version</a>]
41
42 Tools
43 -----
44
45 Here are the files that this web-site provides:
46
47 * <a href="mkws.js">mkws.js</a> --
48   JavaScript code that powers the MasterKey Widget Set
49 * <a href="pazpar2/js/pz2.js">pazpar2/js/pz2.js</a> --
50   Low-level JavaScript library for access to the MasterKey web
51   service.
52 * <a href="handlebars-v2.0.0.js">handlebars-v2.0.0.js</a> --
53   A local copy of
54   <a href="http://handlebarsjs.com/">the Handlebars templating library</a>,
55   since it doesn't like to be hotlinked.
56 * Local copy of <a href="jquery-1.10.0.min.js">jquery-1.10.0.min.js</a>
57 * Local copy of <a href="jquery.json-2.4.js">jquery.json-2.4.js</a>
58 * <a href="mkws-complete.js">mkws-complete.js</a> --
59   A single large JavaScript file containing everything needed for
60   MKWS to work: the widget-set itself, the API library, and
61   the prerequisites jQuery and Handlebars.
62 * <a href="mkws.css">mkws.css</a> --
63   A stylesheet which styles only MasterKey widgets, and does not
64   otherwise interfere with application-site's styles.
65 * <a href="mkws-jquery.js">mkws-jquery.js</a> --
66   An experimental jQuery plugin that provides an MKWS-based
67   metasearching applet.
68
69 Minified versions of the MKWS JavaScript files are also available:
70
71 * <a href="mkws.min.js">mkws.min.js</a>
72 * <a href="mkws-complete.min.js">mkws-complete.min.js</a>
73
74 Versions
75 --------
76
77 The links above to the various forms of the widget-set JavaScript
78 (<a href="mkws.js">mkws.js</a>,
79 <a href="mkws-complete.js">mkws-complete.js</a>,
80 <a href="mkws.min.js">mkws.min.js</a>
81 and
82 <a href="mkws-complete.min.js">mkws-complete.min.js</a>)
83 are always to the current versions of those
84 files. Applications that rely on a particular version can
85 instead use the specific numbered versions in
86 <a href="releases/">the releases area</a>,
87 for example
88 <a href="releases/mkws-0.9.1.js">releases/mkws-0.9.1.js</a>.
89
90 The current version number is always in
91 <a href="VERSION">the VERSION file</a>.
92
93 Version history is in
94 <a href="NEWS">the NEWS file</a>.
95
96 Examples using the widget-set
97 -----------------------------
98
99 It's worth viewing the source of these to see how small they
100 are and how various things are done.
101
102 ### Simple examples
103
104 * A very simple application at
105   <a href="//example.indexdata.com/simple.html"
106        >//example.indexdata.com/simple.html</a>.
107 * <a href="//example.indexdata.com/minimal.html"
108        >The absolutely minimal application</a>
109   listed above.
110 * <a href="//example.indexdata.com/language.html"
111        >A more detailed version</a>
112   that contains a configuration structure instead of accepting the
113   defaults. Includes a custom translation option to present the
114   application in Arabic.
115 * <a href="//example.indexdata.com/mobile.html"
116        >A version suitable for mobile devices</a>,
117   with a responsive design that moves components around depending on
118   the screen size.
119
120 ### Advanced examples
121
122 * An application that
123   <a href="//example.indexdata.com/lowlevel.html"
124        >uses lower-level MKWS components</a>
125   rather than the all-in-one `#mkwsResults` division,
126   allowing it to use a rather different layout.
127 * An application that specifies how to display brief and full records
128   <a href="//example.indexdata.com/templates.html"
129        >using Handlebar templates</a>.
130   (Read about
131   <a href="http://handlebarsjs.com/"
132        >the templating language</a>.)
133 * An application that
134   <a href="http://example.indexdata.com/images.html?q=portrait"
135        >displays thumbnail images</a>.
136 * <a href="//example.indexdata.com/localauth.html"
137        >An application that uses a local authentication regime</a>,
138   and the corresponding
139   <a href="//example.indexdata.com/apache-config.txt"
140        >Apache2 configuration stanza</a>.
141 * <a href="//example.indexdata.com/popup.html"
142        >A version that uses a jQuery popup</a>.
143
144 ### Non-standard interfaces
145
146 * <a href="//example.indexdata.com/dict.html"
147        >An application that uses MKWS to find dictionary
148   definitions of words when you highlight them</a>.
149 * <a href="//example.indexdata.com/auto.html"
150        >An application that runs an automatic search on load</a>.
151 * An existing web-site,
152   <a href="http://sagp.miketaylor.org.uk/"
153        >The Self-Appointed Grammar Police</a>,
154   which has been fitted with an MKWS searching widget.
155   (See also the MKWS-widget customisations in
156   <a href="http://sagp.miketaylor.org.uk/style.css"
157        >that site's stylesheet</a>.)
158 <!---
159 * Another existing web-site,
160   <a href="http://zthes.z3950.org/"
161        >The Zthes specifications</a>,
162   which has been fitted with a popup MKWS search-box.
163 -->
164
165 Target selection
166 ----------------
167
168 MKWS comes pre-configured to search in a set of a dozen or so
169 open-access targets, as a proof of concept. But you'll want
170 to use it to search your own selection of targets -- some open
171 access, some subscription.
172
173 We can set that up for you: email us on
174 <a href="mailto:info@indexdata.com"
175                >info@indexdata.com</a>.
176
177 - - -
178
179 Copyright (&copy;) 2013-2014 Index Data ApS.
180 <a href="http://indexdata.com">`http://indexdata.com`</a>