MoreApp - Direct Connect

Geert Liet

Geert Liet

Published: 11 May, 2015

Connecting MoreApp

When using MoreApp as our digital form builder of choice, we love the simplicity and power of MoreApp. The fully exposed REST API gives the developer full control when developing applications that connect to MoreApp. When using the API for the first time, there is a learning curve and a level of complexity which takes some time to grasp and control. This is not a impassable barrier, but some help getting it all up and running and having a great head start could be the difference between success or failure.

Easy connecting

We developed a quick start for creating an application which uses MoreApp as an input source. Just for our convenience (and because it sounds cool) we'll call it MoreApp Direct Connect.

MoreApp Direct Connect (MDC) can help you get started or connect you from end-to-end without having to learn any MoreApp API. It provides a way to structure data received from MoreApp and handle these registrations in a flexible and easy manner. MDC uses types to identify registrations. When using types, the registrations from MoreApp become first class citizens which can be edited / exported and handled in any chosen way. The flexibility of MoreApp is retained while also making it possible to extend and export the registrations.

MDC - a case

For this case we have created a form in MoreApp which represents an object, a real physical object. For example a bracelet or a white cup, so basically anything that can be described. In MDC you have to configure for which form you want to retrieve the registrations and at what interval to check for new registrations. If configured correctly, MDC will retrieve all registrations at a fixed interval for the configured form. The data in the MoreApp form contains fields of which MDC can determine the type involved and classify the data accordingly. Based on this classification, the MDC web application can create full CRUD features for this data. MDC not only focuses on the data itself but also on the relations between the data elements. MDC has a graphical view of all registrations involved and its relations. An example of this graphical view looks like this:

Screen Shot 2015-05-06 at 12.24.19

MDC - Technical details

MDC is composed of three main modules:

  1. MoreApp integration
  2. Backend storage and API
  3. Webapp and visualizer

Consider this component overview:

MoreApp

The integration module is created with Camel. It uses the AHC component for connecting to the MoreApp API. All file data, like photos, are converted to base64 and combined in one message and delivered to the backend API for storage. The storage engine in this case is the Neo4j graph database. This database enables MDC to traverse and reason about the data with help of the Java API and Neo4j's cypher queries. The query box shown earlier has it's own language which is interpreted with ANTLR. When drawing graphs, one thing we wanted to do is to select a single node as the point of origin. This starting point should be configurable, Neo4j handles the data search queries from an interpreted query from ANTLR. An example of this ANTLR query is:

SET ORIGIN OBJECT('Bracelet-12')

Which sets the starting point, when drawing the graph, to the object with the identifier "Bracelet-12". The node related to the origin node can also have a relation with another node, this could be a really long list. From this origin it is possible to limit the number of relations to traverse.

The web application is written in ReactJs and uses D3 for help in drawing the graphs.

Finishing up

When using MoreApp there are several default options for exporting your registrations, for example email or PDF export. MDC supports in extending the export options and provides a complete platform for handling your MoreApp registrations.

Did you enjoy reading?

Share this blog with your audience!