source: branches/branch-1.5/docs/client/howto.rst @ 973

Last change on this file since 973 was 725, checked in by djay, 10 years ago

Fix issue with rst files displayed from Trac. Fix strings to be translated. Always use the same string in all messages.

  • Property svn:keywords set to Date Author
  • Property svn:mime-type set to text/plain
File size: 2.7 KB
Line 
1.. _client-howto:
2
3Using ZOO-Client
4==================
5
6This section will help you to get started using :ref:`ZOO-Client <client-what>`.
7
8Prerequisites
9----------------------
10
11ZOO-Client is based on the following Javascript libraries
12
13- jQuery (`http://www.jquery.com <http://www.jquery.com>`_)
14- x2js (`https://code.google.com/p/x2js <https://code.google.com/p/x2js/>`_)
15- Require.js (`http://requirejs.org <http://requirejs.org/>`_ )
16- Hogan.js (`http://twitter.github.io/hogan.js <http://twitter.github.io/hogan.js>`_ )
17- query-string (`https://github.com/sindresorhus/query-string <https://github.com/sindresorhus/query-string/>`_ )
18
19.. warning::
20
21     `Node.js <http://nodejs.org/>`__ is also required on your system
22     for compiling ZOO-Client templates.
23
24Download
25-----------------------
26
27If you did not :ref:`download <install-download>` the ZOO-Project
28source code already, please proceed to a svn checkout with the
29following command:
30
31::
32
33  svn checkout http://svn.zoo-project.org/svn/trunk/zoo-project/zoo-client
34
35
36.. warning::
37   You do not necessarily need to :ref:`install <install-installation>` the ZOO-Project server for using ZOO-Client. The corresponding svn `directory <http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-client>`__ is needed only.
38
39
40Compiling ZOO-Client templates
41------------------------------
42
43In order to work with ZOO-Client, you will first need to compile the
44provided `Mustache <http://mustache.github.io/>`_ templates using
45`Node.js <http://nodejs.org/>`__. The ZOO-Client templates are located
46in the ``/zoo-project/zoo-client/lib/tpl`` directory downloaded from
47svn.
48
49* Install Node.js (see related `documentation <https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager>`__.)
50* Install Hogan, the JavaScript templating engine, using the following command:
51
52  ::
53 
54     sudo npm install hogan
55
56
57*  Use Hulk (Hogan's command line utility) for compiling the tempaltes
58   using the following command:
59
60   ::
61 
62     hulk zoo-client/lib/tpl/*mustache > \ zoo-client/lib/js/wps-client/payloads.js
63
64.. warning:: Using different versions of Hogan to compile and to use in a web application may lead to compatibility issue.
65
66Everything is now ready to work with :ref:`ZOO-Client <client-what>`. Read the :ref:`next section <client-example>` for an example JavaScript application.
67
68Building ZOO-Client documentation
69---------------------------------
70
71You may also build the ZOO-Client API documentation using `jsDoc
72<http://usejsdoc.org/jsDoc>`__, with the following command:
73
74::
75
76    npm install jsdoc
77    ~/node_modules/.bin/jsdoc zoo-client/lib/js/wps-client/* -p
78
79This will build HTML documentation in a new directory named ``/out`` in
80your working directory.
81
Note: See TracBrowser for help on using the repository browser.

Search

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png