Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alexandra Rogova
jio
Commits
1cb52dfb
Commit
1cb52dfb
authored
Feb 23, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update documentation
parent
af44eae9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
132 deletions
+12
-132
docs/_static/jio-2.0.0-wip-min.zip
docs/_static/jio-2.0.0-wip-min.zip
+0
-0
docs/_static/jio-2.0.0-wip.zip
docs/_static/jio-2.0.0-wip.zip
+0
-0
docs/authors.rst
docs/authors.rst
+1
-0
docs/developers.rst
docs/developers.rst
+1
-50
docs/getting_started.rst
docs/getting_started.rst
+7
-79
docs/manage_documents.rst
docs/manage_documents.rst
+2
-2
docs/query.rst
docs/query.rst
+1
-1
No files found.
docs/_static/jio-2.0.0-wip-min.zip
deleted
100644 → 0
View file @
af44eae9
File deleted
docs/_static/jio-2.0.0-wip.zip
deleted
100644 → 0
View file @
af44eae9
File deleted
docs/authors.rst
View file @
1cb52dfb
...
...
@@ -4,4 +4,5 @@ Authors
* Francois Billioud
* Tristan Cavelier
* Sven Franck
* Romain Courteaud
docs/developers.rst
View file @
1cb52dfb
...
...
@@ -53,56 +53,7 @@ Create a constructor:
}
}
Create 9 methods: ``post``, ``put``, ``putAttachment``, ``get``, ``getAttachment``,
``remove``, ``removeAttachment``, ``allDocs``. ``repair`` method is optional.
.. code-block:: javascript
MyStorage.prototype.post = function(command, metadata, option) {
var document_id = metadata._id;
// [...]
};
MyStorage.prototype.get = function(command, param, option) {
var document_id = param._id;
// [...]
};
MyStorage.prototype.putAttachment = function(command, param, option) {
var document_id = param._id;
var attachment_id = param._attachment;
var attachment_data = param._blob;
// [...]
};
// [...]
(To help you design your methods, some tools are provided by jIO.util.)
The second parameter ``metadata`` or ``param`` is the first parameter provided by the jIO user.
The third parameter ``option`` is the option parameter provided by the jIO user.
Methods should return:
* **post()**, **put()**, **remove()** --> id of the document affected (string)
* **putAttachment()** or **removeAttachment()** --> no specific value
* **get()** --> document_metadata (object)
* **getAttachment()** -->
.. code-block:: javascript
new Blob([data], {"type": content_type})
* **allDocs()** --> list of all documents (restricted by a query, if given). (object)
After creating all methods, your storage must be added to jIO. This is done
Your storage must be added to jIO. This is done
with the ``jIO.addStorage()`` method, which requires two parameters: the storage
type (string) and a constructor (function). It is called like this:
...
...
docs/getting_started.rst
View file @
1cb52dfb
...
...
@@ -10,34 +10,12 @@ Getting started
.. code-block:: html
<!-- jio core + dependencies -->
<script src="sha256.amd.js"></script>
<script src="rsvp-custom.js"></script>
<script src="rsvp.js"></script>
<script src="jio.js"></script>
<!-- storages + dependencies -->
<script src="localstorage.js"></script>
<script src="davstorage.js"></script>
<script ...>
With `RequireJS <http://requirejs.org/>`_, the main.js should look like:
.. code-block:: javascript
require.config({
paths: {
// jio core + dependency
sha256: 'sha256.amd', // AMD-compatible version of sha256.js
rsvp: 'rsvp-custom',
jio: 'jio',
// storages + dependencies
localstorage: 'localstorage',
davstorage: 'davstorage'
}
});
#. jIO connects to a number of storages and allows adding handlers (or
functions) to specific storages.
You can use both handlers and available storages to build a storage
...
...
@@ -90,65 +68,15 @@ Getting started
Download & Fork
---------------
Please note that the current (2.0.0-wip) version is not stable yet.
You can use one of the ZIP packages, which include all the dependencies and storages:
`Full download (172k) <_static/jio-2.0.0-wip.zip>`_
`Minified download (87k) <_static/jio-2.0.0-wip-min.zip>`_
or you can create your own set of files, which are are provided in the above packages and the source repository:
Core
^^^^
* sha256.amd.js
* rsvp-custom.js, AMD only version: rsvp-custom.amd.js
* jio.js
Storage dependencies
^^^^^^^^^^^^^^^^^^^^
.. XXX this is a little confusing.
* `jquery.js <http://code.jquery.com/jquery.js>`_
* `Stanford Javascript Crypto Library <http://bitwiseshiftleft.github.io/sjcl/>`_, `sjcl.zip <https://crypto.stanford.edu/sjcl/sjcl.zip>`_
* `pajhome.org.uk sha1 <http://pajhome.org.uk/crypt/md5/sha1.html>`_, AMD-compatible version: `sha1.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha1.amd.js>`_
* `anmar.eu.org jssha2 <http://anmar.eu.org/projects/jssha2/>`_, `jssha2.zip <http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip>`_, AMD-compatible versions: `sha2.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha2.amd.js>`_, `sha256.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js>`_
Storage connectors
^^^^^^^^^^^^^^^^^^
* Localstorage
* MemoryStorage
* IndexedDB
* WebSQL
* DavStorage
* Dropbox
* Google Drive
* ERP5Storage
* s3storage.js (WIP)
* xwikistorage.js (depends on jQuery) (WIP)
Storage handlers
^^^^^^^^^^^^^^^^
You can get latest jIO release by using on of those links:
* Zipstorage
* ShaStorage
* UUIDStorage
* QueryStorage
* CryptStorage
* UnionStorage
* FileSystemBridgeStorage
* Document Storage
* Replicate Storage
`Full download <https://lab.nexedi.com/nexedi/jio/raw/master/dist/jio-latest.js>`_
`Minified download <https://lab.nexedi.com/nexedi/jio/raw/master/dist/jio-latest.min.js>`_
Unit tests
^^^^^^^^^^
You can get latest RSVP release by using on of those links:
We monitor code quality with a `test agent <http://www.j-io.org/quality/unit_test>`_ that runs
the test suite with each release.
`Full download <https://lab.nexedi.com/nexedi/rsvp.js/raw/master/dist/rsvp-2.0.4.js>`_
`Minified download <https://lab.nexedi.com/nexedi/rsvp.js/raw/master/dist/rsvp-2.0.4.min.js>`_
Fork jIO
^^^^^^^^
...
...
docs/manage_documents.rst
View file @
1cb52dfb
...
...
@@ -104,11 +104,11 @@ Promises
Each jIO method (with the exception of ``.createJIO()``) returns a Promise object, which allows us to get responses into
callback parameters and to chain callbacks with other returned values.
jIO uses a custom version of `RSVP.js <https://
github.com/tildeio
/rsvp.js>`_, adding canceler and progression features.
jIO uses a custom version of `RSVP.js <https://
lab.nexedi.com/nexedi
/rsvp.js>`_, adding canceler and progression features.
You can read more about promises:
* `RSVP.js <https://
github.com/tildeio/rsvp.js#rsvpjs--
>`_ on GitHub
* `RSVP.js <https://
lab.nexedi.com/nexedi/rsvp.js
>`_ on GitHub
* `Promises/A+ <http://promisesaplus.com/>`_
* `CommonJS Promises <http://wiki.commonjs.org/wiki/Promises>`_
...
...
docs/query.rst
View file @
1cb52dfb
...
...
@@ -79,7 +79,7 @@ Example:
How to use Queries outside jIO?
-------------------------------
Refer to the `JIO Query sample page <http
://git.erp5.org/gitweb/jio.git/blob/HEAD:/examples/example-queries.html?js=1
>`_
Refer to the `JIO Query sample page <http
s://lab.nexedi.com/nexedi/jio/blob/master/examples/example-queries.html
>`_
for how to use these methods, in and outside jIO. The module provides:
.. code-block:: javascript
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment