source: branches/branch-1.6/docs/client/howto.rst @ 811

Last change on this file since 811 was 755, checked in by djay, 9 years ago

Link to jsdoc fixed.

  • Property svn:keywords set to Date Author
  • Property svn:mime-type set to text/plain
File size: 2.9 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
67<client-what>`. Read the :ref:`next section <client-example>` for an
68example JavaScript application.
69
70Building ZOO-Client API documentation
71-------------------------------------
72
73You may also build the ZOO-Client API documentation using `jsDoc
74<http://usejsdoc.org/>`__, with the following command:
75
76::
77
78    npm install jsdoc
79    ~/node_modules/.bin/jsdoc zoo-client/lib/js/wps-client/* -p
80
81This will build HTML documentation in a new directory named ``/out`` in
82your working directory.
83
84.. note::
85    Building the ZOO-Client API documentation is optional, please
86    refer to `the up-to-date ZOO-Client API Documentation
87    <http://www.zoo-project.org/jsDoc/index.html>`__ for the current
88    API version.
89
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

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