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