Git Product home page Git Product logo

deep-client's Introduction

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 [email protected]

Usage

This is a minimal example of deep client usage.

<html>
<head>
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="js/webcomponents.js"></script>
<script type="text/javascript" src="js/deepClient.js"></script>
 <script type="text/javascript">
	jQuery(document).ready(function($) {
	   var datalet_params =
              {
	    component   : "DATALET_NAME", 
        params : {
		    data-url        : "DATA_URL",
        }
        fields      : Array("FIELD1", "FIELD2"),
        placeHolder : "HTML_PLACEHOLDER"
       };
	   ComponentService.deep_url = 'DEEP_URL';
	   ComponentService.getComponent(datalet_params);

    });

  </script>
</head>
<body>
<div id="HTML_PLACEHOLDER"></div>
</body>
</html>
</code>

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 params.data-url : the datasource URL fields : an array with user selected fields from datasource 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

Copyright and license

Code released under the MIT license.

deep-client's People

Contributors

andrpet avatar isislabunisa avatar luigser avatar rended avatar robcalla avatar giuseppeciulla avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.