- FIWARE Orion Context Broker (aka Orion) is a General Enabler (GE) that provides object allocation, query and Pub/Sub operations. Formally, Orion is implemented following the NGSI10/NGSI9 specification.
- BackboneJS is a JavaScript framework which enables us to build rich web apps.
- Orion 2 Backbone (aka O2BB) is "the glue" between these entities. With O2BB we can integrate our project quickly in an easy way with FIWARE's Orion.
O2BB enables to companies accelerated by FIWARE a rapid, easy and cross-platform integration with Orion GE
We've developed O2BB for Outbarriers project
O2BB is pretty straightforward.
-
Include the orion.js file after Underscore & Backbone references:
<script src="/underscore.js" charset="utf-8"></script> <script src="/backbone.js" charset="utf-8"></script> <script src="/orion.js" charset="utf-8"></script>
-
If you want to create a Backbone Model, you must extend it from
Backbone.OrionModel
. In case of a collection,Backbone.OrionCollection
. Due to Orion functionality, you must set up atype
prototype object. If your access to Orion requires anaccess token
, you also must set up thetoken
prototype object. -
Voilà!
This demo connects to Orion Context Broker Test Bed. That instance runs on the following address http://orion.lab.fiware.org:1026 and it's public but you need an access token.
It's necessary a simple HTTP proxy server made in NodeJS because of Orion Test Bed instance does not implement CORS and we can't talk directly with it.
Follow these steps to run the demo:
-
Clone this repository
git clone https://github.com/digitalilusion/o2bb.git
-
Install NodeJS packages
cd o2bb npm install connect serve-static proxy-middleware
-
Run the server.js
cd o2bb node server.js
-
Open your browser, enter the address http://localhost:8080/html/orion_test.html and follow the instructions!
MIT License.
© 2015 Digitalilusion S.L.