Skip to content

FarmBuild/farmbuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FarmBuild Developer Guide

The FarmBuild services are composed of a set of web service and open source code APIs developed by DEDJTR for use in third party agricultural software systems.

Table of Contents generated with DocToc

Registration

The FarmBuild APIs are open source and can be accessed through GitHub. The Web services and associated data sources are published from a DEDJTR server and registration is required to use these.
DEDJTR requests that all users to register their interest in using FarmBuild components to enable DEDJTR to provide better support and planning for future releases.
To register please visit FarmBuild main website at:
http://farmbuild.github.io/farmbuild/farmbuild_registration.html

GitHub Repository Structure

Going through the FarmBuild components, you will see that all components have a standard project structure, inspired by JavaScript community conventions. To briefly describe the project structure, it includes:

  • "src" folder: contains all source files. The distribution (ie compiled) version of the APIs are generated from the source via a build process.
  • "dist" folder: contains the production ready version of the API libraries that you can use in your applications.
  • "docs" folder: contains API documentation of the component.
  • "lib" folder: contains external libraries used in the component.
  • "examples" folder: contains a series of example pages to demonstrate how to use the component's API. Examples have mainly been created using AngularJS JavaScript library, which is described in the "Technology Stack" section of this document, althugh a JQuery example is also provided for the Nutrient Calculator component.

At the root level of the project you will find a bunch of files. Some of them are concerned with the project's build proccess and the project's development. One that requires your careful attention is the LICENSE file which describes the conditions under which you may use FarmBuild components. Please read it carefully before you start using FarmBuild.

Where can I find documentations?

Examples vs API

We often use terms API and Example when describing different components. To clarify further, APIs are the main delivery of the FarmBuild components. It is expected that you as a third party software developer will read through API docs and find the proper API to support your desired use. APIs are not meant to be altered by third parties unless in the future you wish to work with DEDJTR to extend the API.
If you believe there are issues with any part of the APIs or you need a specific type of functionality which is nice to add to the APIs, please report that through the GitHub "Issues" page which you will find in each repository. The FarmBuild team will respond to the issues.
Each FarmBuild component is accompanied by a series of examples which demonstrate how you can to consume web services and call the APIs. These examples are meant to be for demonstration purposes only ie they do not deliver working applications, although you may choose to use the example code as a "kick starter". You can look at example source code to get an idea of how to use FarmBuild components in your project.

FarmBuild components include:

FarmBuild Core

FarmBuild Core provides Common functions used in other FarmBuild components.
These functions include Google Analytics integration and the collection API and validation module. It is primarily an internal dependency in higher level components such as Dairy Nutrient Calculator, Web Mapping and FarmData.
Some of its APIs, such as Google Analytics, are exposed as part of the higher level components' API.
To understand more about the FarmBuild Core please visit following links:
Git Repo: https://github.com/FarmBuild/farmbuild-core
API doc: https://rawgit.com/FarmBuild/farmbuild-core/master/docs/farmbuild-core/1.0.41/index.html

FarmData

To facilitate the exchange of information between FarmBuild applications and other on-line environments a standard farm data block has been established which stores all data used and generated by the FarmBuild applications within a simple JSON structure.
To understand more about FarmData please visit following links:
Git Repo: https://github.com/FarmBuild/farmbuild-farmdata
API doc: https://rawgit.com/FarmBuild/farmbuild-farmdata/master/docs/farmbuild-farmdata/1.1.4/index.html

Web Mapping

Web Mapping is an open source farm mapping API javascript library. A demonstration page is provided as part of the examples in the web mapping repository which shows how users or developers can map and access spatial farm data for applications both within FarmBuild API's and their own environment.
To understand more about Web Mapping please visit following links:
Git Repo: https://github.com/FarmBuild/farmbuild-web-mapping
API doc: https://rawgit.com/FarmBuild/farmbuild-web-mapping/master/docs/farmbuild-web-mapping/1.1.0/index.html

Dairy Nutrient Calculator

This JavaScript library can be used to model nutrient flow in and out of a dairy farm. Since Australian dairy farms generally import larger quantities of nutrients than they export, knowing the nutrient balance of a farm gives farmers the potential to improve the efficiency of their operations and potentially save money.
To understand more about Web Mapping please visit following links:
Git Repo: https://github.com/FarmBuild/farmbuild-dairy-nutrient-calculator
API doc: https://rawgit.com/FarmBuild/farmbuild-dairy-nutrient-calculator/master/docs/farmbuild-dairy-nutrient-calculator/1.0.0/index.html

Soil Sample Importer

To further support nutrient management on-farm, a soil import API Javascript library and demonstration page has been developed to enable the import, linking and nutrient status classification of soil test data to the farm paddock structure, such as is generated by the web mapping component.
To understand more about Soil Sample Importer please visit following links:
Git Repo: https://github.com/FarmBuild/farmbuild-soil-sample-importer
API doc: https://rawgit.com/FarmBuild/farmbuild-soil-sample-importer/master/docs/farmbuild-soil-sample-importer/1.0.0/index.html

Web Service APIs and associated data sources

The web services and associated data sources are published from a DEDJTR server. The web services are available to access from the GitHub ‘FarmBuild’ account. They are provided with an agreed service level, but the source code is not published.
You can find an example of how to access these web services by going through examples found in the Web Services Demo GitHub repository.
https://github.com/FarmBuild/farmbuild-web-services-demo

Web services include:

  • Web Feature Services

    • Soils of the Goulburn Murray Irrigation Region
    • Victorian Rural Parcel Agricultural Land Use
  • Soil Information Services

    • Soils Area Calculation Services
      This service will return calculated areas of soil types in the Goulburn Murray Irrigation Region for a defined area (ie. Farm or paddock boundary)

Technology Stack

The FarmBuild components use a range of client-side and server-side technologies.
On the client-side, the FarmBuild APIs use the AngularJS framework to provide a modular architecture and to enable good separation between different modules.

AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code you would otherwise have to write.
To read more about AngularJS please visit the following links:

All of the Farmbuild Javascript APIs are available as AngularJS modules.
You are however not forced to use the AngularJS framework in your application in order to use the FarmBuild APIs. The Farmbuild Javascript APIs are also available via the farmbuild global name space. (eg farmbuild.webmapping) and in the case of Diary Nutrient Calculator in addition to AngularJS examples there are a full series are examples available which use JQuery to demonstrate API usage.

Apart from AngularJS, FarmBuild also uses the OpenLayers3 and Turf.js Javascript libraries in the Web Mapping component to provide map display and vector editing tools. For developers to be able to effectively make use of the Web Mapping component in their applications, they will need to have a good understanding of OpenLayers3.
To read more on these libraries please visit to following links:

About

No description, website, or topics provided.

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.pdf

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published