README.md 2.98 KB

DEEPCLIENT

Is a simple javascript library that allows the connection with DEEP and the inclusion of a Datalet within a HTML page developed by the UNISA TEAM for the ROUTE-TO-PA PROJECT.

Table of contents

Quick start

Clone the repo: git clone http://service.routetopa.eu:7480/isislab/DEEPCLIENT.git.

What's included

Within the download you'll find the following directories and files. You'll see something like this:

DEEPCLIENT/
├── js/
│   ├── bootstrap-3.3.4-dist
│   └── deepClient.js
│   ├── jquery-1.11.2.min.js
└── ├── jquery-2.1.0.min.js

Bugs and feature requests

Have a bug or a feature request? Send a mail to developers@routetopa.eu

Usage

This is a minimal example of deep client usage.

We create an empty HTML document with a single DIV. On document ready event we create a datalet_params object, this object contains information for Datalet retrieving and initialization.

datalet_params contains : component : the Datalet name to be sent to DEEP (Eg. datatable-datalet) params.data-url : the datasource URL (Eg.http://demo.ckan.org/api/action/datastore_search?resource_id=8324a4c9-66d6-47bf-a898-94237cc39b9f&limit=50) fields : an array with user selected fields from datasource (Eg. Array("Supplier", "Amount")) placeHolder : the ID of the DOM element where place the Datalet

ComponentService.getComponent function take a datalet_params object as parameter. This function is responsible for Datalet info retrieving from DEPP and Datalet code retrieving from DEEPCOMPONENTS. Once the Datalet code is available DEEPCLIENT add the Datalet to the document DOM and initialize the Datalet with the data and fields parameters. Now the Datalet is able to complete its lifecycle.

The programmer must specify the DEEP endpoint through the variable ComponentService.deep_url.

Versioning

v0.1

Creators

UNISA Team - Dipartimento di Informatica - Università degli studi di Salerno - Italy

Code released under the MIT license.