Welcome to the modelix samples!
The examples are currently work in progress and are develop alongside the modelix platform development. |
Introduction
The modelix samples repository contains a couple of examples that show various aspects of the modelix platform. The primary focus of the samples is to show how you can apply modelix to bring languages and models defined in MPS into the web. On the basis of (meta-)models defined in MPS, external access is provided using JVM (Java/Kotlin) and web frameworks/tools. Everything shown in the samples is intended to enable you to come up with your own use-cases and architectures based on what is provided here.
Not all features of modelix are shown here so this is not a complete demo of everything modelix can do. |
None of the examples try to reuse editors defined in MPS. If your goal is to reuse MPS editors as is then modelix itself ships with a projector integration to achieve this.
While all the examples use the same language defined in MPS they are not meant as one complete example but rather as individual parts. The purpose of the examples is to give inspiration of what is possible with modelix and make you think and envision your own use-cases.
Getting Started
Build components using Gradle
Build from console
The modelix project uses Gradle to build the individual components. Simply call the following in the top level folder of a repository:
./gradlew build # mac/linux
or if you are on windows use:
gradlew.bat build # windows
IntelliJ Idea
Wherever possible we use the latest IntelliJ IDEA IDE to manage projects in our repositories. Consequently, opening any repository with IntelliJ will also allow you to build and eventually contribute.
modelix Artifact Publication
At the moment most modelix artifacts are stored on the itemis nexus with no access restriction. As a consequence, when you build modelix or use modelix components via Gradle there is no repository access setup required.
How to set up GitHub packages authentication
This is optional when you want to obtain modelix artifacts from GitHub packages rather than the itemis nexus server. |
Most packages are also published to GitHub packages for which a GithHub account and credentials are required.
To access GitHub packaged you need to specify your credentials.
First of all you will need to generate a personal access token with access to GitHub Packages.
The project assumes that your username is available as the variable gpr.user
and the token as gpr.key
.
The easiest way to configure the credentials is copy the example below, paste it into the gradle.properties
file in the repository and replace the values with your credentials:
gpr.user=<your GitHub login>
gpr.key=<your personal access token>
Gradle also supports other locations for specifying these properties.
Entry Points
Once the initial build has completes you can dive in with the following:
-
Read explanations in the Courses Domain: MPS Language and Model
-
Read the use-cases these samples cover in the Use Cases of the Sample project
-
Understand the repository in the Sample Repository Structure
-
Inspect and edit the project with the code editor of your choice.
-
The top folder in the repository provides
IntelliJ
configurations, -
the
mps
folder is a sub-project can be opened usingMPS 2021.2.6
, and -
the
spa-dashboard-angular
folder is aWebStorm
project.
-
-
Start sample components which realize use case samples:tutorial/startup-usecases.adoc