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