Contexts

The LemonEdge platform enables you to work on multiple items at once. Depending on the client you're using these can be pulled out into their own windows to work across multiple monitors. In either case each item you're working on belongs to their own isolated context.

Context Features

A context is what the LemonEdge platform uses to connect to the LemonEdge database and perform all possible operations. When you login to the platform you can connect using the following ways:

  • Direct Database Connection
  • Web Service Connection

In either case a context works across either connection and provides the following functionality:

  • Ability to query all system entities or custom entities (including those created through our API) to retrieve that data
    • Queries enable full querying of data including, but not limited to, filtering sorting, hierarchical filtering, grouping, joining, and more.
  • Ability to track following changes: 
    • Updates
    • Inserts
    • Deletes
  • Ability to commit all pending changes at once as single transaction
    • Performs custom processes
    • Performs validation
    • Performs permission checks
    • Saves everything with same date time stamp in single transaction
  • Ability to run any SQL Wrapper to retrieve custom results.

As with everything in the LemonEdge platform, these contexts can run entirely "As Of" a prior datetime or entirely within a specific Canvas.

A Context holds all changes being made in an isolated and secure manner. Contexts can be saved at any point to commit all your changes in a single transaction to the database.

The main advantage of Contexts is the ability to work on multiple sets of data at the same time. You don't have to loose your changes to go to some other area of the system, update that data, and then go back to what you were working on - you can do it all at once side by side.


Displayable Items

Each item that is loaded to be displayed to a user is loaded into its own Layout. This layout is customisable and can be configured to be different for each user/role/team/etc [more info].

A displayable item can be something as simple as a single user, or a collection of users, or really any item at all. The key point is that the platform loads a defined Layout to display it and provides that layout its own context.

Everything that is done within that Layout happens in that context. A context can span more than one Layout if you are working in a layout and create new child items that open in their own Layouts. Seeing as they are part of the changes you were making in the original Layout they now share the same context. The system highlights this to you by colouring those Layouts the same - any save will save the changes in all those layouts (which is really just one context) at once.


Example

Here is a typical illustration of various different layouts and their contexts:

Here we have the following contexts:

  1. Chart Context
    This context is displaying all charts
  2. Unfunded Context
    This context is displaying the Unfunded chart. It has changes in the context illustrated by the "* " in the name of the tab on the layout. [more info]
  3. Portfolio Transactions Context
    This context is displaying the Portfolio Transactions Dataset
  4. My New Dataset Context
    This context is spanning two layouts.
    The Datasets layout had a context of its own. Then we created a new Dataset from it and it opened that new item in another Layout, but they share the same context. As such the system highlights each layout with the same colour so we can see they shared the same context.

There is one command that applies to a context and all its layouts, that is the Save command. This will save all changes in the context of the currently active layout. If this context spans more than one layout then all those layouts will be reloaded when the save is complete as they have all been affected.
This isn't the case with other commands such as Close or Refresh Tab. See those commands for more information on how they react across shared contexts.


User Interface

Contexts are a powerful feature of the platform that enable you to work on multiple things at once. Most of the time they are transparent to you and you need not worry about them. When a context does span more than one layout the system highlights this visually to you so it is obvious.

Depending on the client application you are using, the screen real estate may not support itself to multiple layouts visible at the same time. If that's the case the system keeps them in memory and you can switch between them to view one at a time. If the application allows it (such as the Full Windows Desktop application in the example above) then you can view and work on multiple layouts at the same time across multiple screens.