Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Proposal #7: Applications Support

mbarto edited this page Dec 3, 2014 · 15 revisions

Overview

Support MapStore Applications that are composed by a core MapStore together with custom plugins and templates, without the need to create a MapStore branch.

Proposed By

Mauro Bartolomeoli (mbarto)

Assigned to Release

TBD, tentatively 1.7

State

Choose one of: Under Discussion, In Progress, Completed, Rejected, Deferred

Motivation

Developing MapStore for several customers, we identified the necessity to build custom plugins and templates that cannot be generalized for common use (and so integrated in the master MapStore repo).

The usual pattern is to create a new branch of MapStore, where the custom stuff resides, together with a full copy of MapStore.

This can be difficult to mantain if we want to be always in synch with the MapStore master.

The issue can be solved using two different repositories for MapStore and the custom stuff. The custom stuff will be packaged into a standard structure, to create a MapStore Application.

Proposal

The MapStore Applications mechanism

An application is basically a tree of files that reside inside the mapcomposer/app/applications/<application_name> folder.

So, each application will have its own root folder, that will reside on a different repository.

Inside the application folder these files will be present:

  • config.js: RingoJS file with endpoints for the application
  • index.js: and other RingoJS that implement a particular endpoint for the application
  • buildjs.cfg: js build file, including custom plugins and needed standard ones
  • templates/app_template.html: one or more custom template for the application
  • static: container folder for the static custom stuff (plugins, widgets, config files, css, images)

The static folder will usually contains:

  • config: folder for application configuration files
  • css: folder for application stylesheet files
  • images: folder for application image files
  • script: folder for application javascript files (plugins, widgets, etc.)

A first prototype together with a sample application can be found here: [https://github.com/mbarto/mapstore/compare/mapstore_application?expand=1]

Launching a MapStore application in debug mode

To launch a specific application in debug mode, simply launch the command (from the root MapStore folder):

ant debug -Dapplication=application_name

The application_name is the name of the folder containing the application files.

Building a MapStore application

To build a specific application war, simply launch the command (from the root MapStore folder):

ant war -Dapplication=application_name

The application_name is the name of the folder containing the application files.

Feedback

This section should contain feedback provided by members who may have a problem with the proposal.

Backwards Compatibility

Voting

Mauro Bartolomeoli: +1

Lorenzo Natali:

Lorenzo Pini:

Tobia Di Pisa:

Clone this wiki locally