FrontM.js App Structure
  • Updated on 17 Aug 2019
  • 1 minute to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

FrontM.js App Structure

  • Print
  • Share
  • Dark
    Light

Each App created with FrontM.js has the same basic structure:

frontmjs layers

The darker boxes are provided by the framework; the lighter boxes are created by the App developer.

Abstraction layer

The App developer creates a script that talks to an abstraction layer. This layer exposes a number of Objects and Classes to the developers. The abstraction layer also controls the flow of the messages through the system and decides whether to run code on the Edge or in the Cloud.

Capabilities

The FrontM.js capabilities layer deals with the lower layers of the architecture controlling the network, Natural Language Processing engine, storage, API access etc. This layer cannot be called directly by the App developers, since they work with it through the abstraction layer.

User-developed App

The abstraction layer, the capabilities layer, as well as the final App, are all written in Javascript ES6.

The developed App is a JavaScript function that returns an array of Intent objects implemented within it. The flow of the App can be implemented in multiple ways using the tools available within the abstraction layer.

The intelligence of the App can be implemented entirely within the script, within the NLP, or a combination of both.

Natural Language Processing (NLP)

The App script is the piece of architecture nearest to the user. However, the script often hands control over to the NLP agent in order to determine the user's Intent.

In doing so the NLP agent will, in some scenarios, send a response back to the user. At present, we are using Google Dialogflow as our NLP engine.

Was this article helpful?