source: branches/PublicaMundi_David-devel/docs/_build/html/_sources/client/howto.txt @ 659

Last change on this file since 659 was 659, checked in by nbozon, 9 years ago

Massive update of zoo docs

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 provided `Mustache <http://mustache.github.io/>`_
44templates using `Node.js <http://nodejs.org/>`__. The ZOO-Client templates are located in the ``/zoo-project/zoo-client/lib/tpl`` directory downloaded from svn.
45
46* Install Node.js (see related `documentation <https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager>`__.)
47* Install Hogan, the JavaScript templating engine, using the following command:
48
49  ::
50 
51     sudo npm install hogan
52
53
54*  Use Hulk (Hogan's command line utility) for compiling the tempaltes
55   using the following command:
56
57   ::
58 
59     hulk zoo-client/lib/tpl/*mustache > \ zoo-client/lib/js/wps-client/payloads.js
60
61.. warning:: Using different versions of Hogan to compile and to use in a web application may lead to compatibility issue.
62
63Everything is now ready to work with :ref:`ZOO-Client <client-what>`. Read the :ref:`next section <client-example>` for an example JavaScript application.
64
65Building ZOO-Client documentation
66--------------------------
67
68You may also build the ZOO-Client API documentation using `jsDoc
69<http://usejsdoc.org/jsDoc>`__, with the following command:
70
71::
72
73    npm install jsdoc
74    ~/node_modules/.bin/jsdoc zoo-client/lib/js/wps-client/* -p
75
76This will build HTML documentation in a new directory named ``/out`` in
77your working directory.
78
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