Commit 9013a8b6 authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Next version usable until "Modeling Data Catalogs for ..." inclusively

parent c1865422
== Overview
== Introduction
[IMPORTANT]
====
This overview talks about the work of the author and others, but without bibliographic references. Currently, it is just meant as background to better understand the technical documentation in the sections to follow.
This introduction talks about the work of the author and others, but without bibliographic references. Currently, it is just meant as background to better understand the technical documentation in the sections to follow.
Maybe it could be developed into a more serious paper later.
====
......@@ -27,10 +27,10 @@ This very short history on technologies for development of software in general,
* formal textual domain specific languages (DSLs) dedicated to solve specific tasks with ease
* formal graphical DSLs.
****
====
Note that DSLs more tend to describe _what_ shall be achieved by a computation instead of describing in detail, _how_ to achieve it.
Therefore, DSLs usually look more like a model than like an algorithm.
****
====
Now back to the task at hand.
......@@ -67,14 +67,14 @@ Instead, we decided to use a DSL for data modeling and use code generation whene
Since SimStadt was developed within the Java eco-system we followed this standard approach:footnote:[A similar approach is in use to standardize extensions to CityGML via so called application domain extensions (ADE) like the energy ADE for exchanging energy related data.]
. Developer and domain expert create a first version of the data model as XML Schema Definition (our DSL).
. For plausibility checks any standard XML editor can be used to create example data conforming to the XSD.
. For plausibility checks use any standard XML editor to create example data conforming to the XSD.
. With JAXB, the Java Architecture for XML Binding, Java code is generated to read our XML catalogs into Java objects that, in turn, can be accessed by SimStadt workflows to generate and parameterize simulations.
. If required, developer and domain expert go back to step one to refine data model and catalog data
. If required, developer and domain expert go back to step one to refine data model and catalog data.
After the data model for building physics catalogs had matured, we developed an extra application for convenient creation and maintenance of building physics data catalogs separate from SimStadt.
It was developed in Java with a user interface written in JavaFX and was well received by domain expert users.
However, as a different catalog for building usages had to be created, it was quite difficult to reuse the XML schema and application code from the building physics catalog: The usage catalog data model was "pressed" into a form similar to the building physics catalog data model, and the UI code was "over-engineered" to accommodate both catalog's requirements.
However, as a different catalog -- this time for building usages -- had to be created, it was quite difficult to reuse the XML schema and application code from the building physics catalog: The usage catalog data model was "pressed" into a form similar to the building physics catalog data model, and the UI code was "over-engineered" to accommodate both catalog's requirements.
=== Low-Code-Development of Data Catalogs
......@@ -90,23 +90,32 @@ On the other hand, user interfaces and generation and parameterization of simula
Now, in 2020, several developments in different projects provide an opportunity to re-think the topic of data catalogs for simulations, namely:
. Plans for a new Urban Simulation Platform at Concordia University, Montreal
. New implementation of INSEL front-end based on the Eclipse application framework and Eclipse-Sirius diagram editors
. Enhancement of existing building physics and usage catalogs from SimStadt and their adaptation to new regions
. Plans for a new Urban Simulation Platform at Concordia University, Montreal.
. New implementation of INSEL user interface based on the Eclipse application framework and Eclipse-Sirius diagram editors.
. Enhancement of existing building physics and usage catalogs from SimStadt and their adaptation to new regions.
. Development of a new comprehensive catalog of electric systems components to be used in SimStadt as well as in Concordia's Urban Simulation Platform.
====
In what follows, the new technology stack used to implement (4) is documented in detail.
Plans are to use the same approach also for implementation of (3).
It uses four technologies to replace manual coding by code generation from models:
* _Ecore_ to model the catalog's data and generate Java classes and persistence layer from it.
* _EMF Forms_ for modeling and generating tables, forms and buttons to **c**reate, **r**ead, **u**pdate, and **d**elete data (CRUD).
* _E4_, the Eclipse way of modeling the application user interface itself, e.g. the placement and behavior of views, editors, toolbars, menus, and more.
* A template engine called _Handlebars_ to generate fully parameterized simulation models from textual templates without programming.
The new technology stack is rooted in the Eclipse application framework and eco-system.footnote:[A comparable, but completely different approach would be to combine several web applications and services via portal software in web browsers.]
Its main advantage is the possibility to implement CRUD (Create, Read, Update, Delete) applications like data catalogs and their underlying data models with no or very view lines of handwritten code (_low-code-development_).
Its main advantage is the possibility to implement CRUD applications like data catalogs and their underlying data models with no or very view lines of handwritten code (_low-code-development_).
====
Plans are to use the same approach also for implementation of (3).
Since task (2) and maybe (1) will use Eclipse, too, close integration of data catalogs and simulation environments seems feasible.
E.g., a user could drag an electric system component from a catalog onto an INSEL block for parametrization.
The Eclipse application framework offers:
* OSGI plug-in mechanism and UI framework for integrating applications and services
* _E4_ application model to declaratively describe user interface's structure
* General notion of _project_ with specific file types, help system, preferences etc.
* IDE support for important general purpose languages like Java, https://marketplace.eclipse.org/content/pydev-python-ide-eclipse[Python], Ruby, C, Fortran, C++
* Support for creating textual and graphical DSLs (https://www.eclipse.org/Xtext[XText], https://www.eclipse.org/sirius[Sirius])
......@@ -114,7 +123,7 @@ The Eclipse application framework offers:
* Industry proven DSLs and code generators for data models and form based UIs via the https://www.eclipse.org/modeling/emf[_Eclipse Modeling Framework_] (EMF) providing:
** https://www.eclipse.org/ecoretools[_Ecore_] for model driven generation of Java classes and persistence layers for XML or data bases
** https://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements[_EMF Forms_] for describing and generating form based UIs
** Mechanisms to adapt or extend data models and forms to special needs (e.g., we added a quantities -- that is numbers _with_ units -- to Ecore and EMF Forms, a feature very important for data catalogs)
** Mechanisms to adapt or extend data models and forms to special needs (e.g., we added quantities -- that is numbers _with_ units -- to Ecore and EMF Forms, a feature very important for data catalogs)
* Rich open source eco-system with lots of plugins and projects important for an urban simulation platform:
** model server for distributed access and work on Ecore models, including model comparison and migration (https://projects.eclipse.org/projects/modeling.emf.cdo[CDO], https://www.eclipse.org/emf/compare[EMFCompare])
......
== Accessing and Using Data Catalogs
=== Accessing XML-Catalogs
Add JAR file or plugin with Ecore data model
Load an XML catalog and access corresponding Java-Objects in code
.Add Ecore data model to a third-party Java application
TBD: Access from Python?
*TBD*
=== Java template engine Handlebars for creating Insel models in SimStadt
Parameterization of blocks
.Load XML Data Catalog and Access Corresponding Java Objects in Code
*TBD*
.Access from Python?
*TBD*
=== Create Insel Models with Handlebars Templates
Handlebar templates to access data catalogs and create/parameterize textual simulation models.
.Parameterization of blocks
*TBD*
Creation of submodels, e.g. for parameterized functions
Access of catalogs / Integration into simulation models:
.Creation of submodels, e.g. computing parameterized functions
*TBD*
* Template Engine Handlebars to access catalogs and create/parameterize textual simulation models
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment