Skip to content

Extending Bindaas

Ashish Sharma edited this page Jun 14, 2017 · 7 revisions

Bindaas is highly extensible and gives developers the ability to interface with new database management systems or create plugins that can allow you to tweak an API request/response. To extend Bindaas, you first have to setup a development environment. This is a one time setup and is described below. Once you have completed the setup, checkout the guide to [creating new data providers](creating new data providers) (if you want to add support for a new DBMS) or [creating modifiers](creating modifiers) (if you want to create a plugin that can act upon an API request/response).

Step 1. Checkout Source Code

The source code of Bindaas is hosted and managed on github. Use the following command to clone the Bindaas repository:

git clone https://github.com/sharmalab/bindaas.git

Directory Structure: The directory structure of Bindaas source tree is shown below
Bindaas Directory Structure
source/dependencies : This directory contains third-party and startup bundles, along with OSGi configuration file.
source/maven/master : This is parent directory for all maven projects. In order to incorporate a new Bindaas eclipse project into existing build, a new maven project must be created under this directory. Refer #TBD to see steps required to add a project to maven build.
projects : Parent directory for all Bindaas projects
projects/core : Home for all core Bindaas projects. These projects are included in standard binary distribution of Bindaas and are mandatory with few exceptions.
projects/misc : Home for experimental or non-critical projects
projects/plugins : Parent directory for all types of Bindaas plugins. The data_providers directory contains different Data Providers. The transformers directory contains other types of plugins such as Query Modifier, Query Results Modifier and Submit Payload Modifier.
Bindaas Plugins
projects/security_providers : Home for all projects providing implementation for Bindaas's Security API
projects/test : Junit Test cases

Step 2. Run maven build

In order to complete this step make sure you have maven installed and that $MAVEN_HOME/bin is present on the system $PATH

Compile the source code using maven:

$ cd $BINDAAS_HOME/source/maven/master
$ mvn clean install

It should build the entire Bindaas repository. The artifacts generated are stored in target directory of respective maven projects found under master.

Step 3. Setup Eclipse

Bindaas has been developed exclusively using Eclipse IDE. Although, it may be possible to develop Bindaas plugins using other IDE(s) it hasn't been tried.

Eclipse is a powerful and feature rich IDE for Java with native support for developing OSGi applications. This section documents steps required to setup eclipse for developing Bindaas based plugins. Eclipse can be downloaded from eclipse.orgeclipse.org. Version greater than or equal to 4.0.0 is required. Alternatively, since Bindaas heavily relies on Spring Framework, you could install the Spring Tool Suite, Eclipse based IDE, from here Confirm that the Java Runtime Environment is set to use JDK 8
Configure the Target Runtime Environment : The following screencast describes the process of setting-up OSGi Target Runtime Environment and creating a new run configuration. List of directories to include in Target Runtime Environment

  • source/maven/master/dist/bundles/system
  • source/maven/master/dist/bundles/third-party
  • source/maven/master/dist/bin

Step 4. Verify Setup

To verify everything is setup correctly visit the following url in your web-browser
http://localhost:8080/dashboard/
This would take you to the Bindaas Landing Page Landing Page

Clone this wiki locally