Modeling Tool Approaches
EMF Cloud provides two complementary approaches for implementing the model management. Each approach is tailored to specific requirements of modeling solutions and is integrated as a core part of the framework. On this page we provide an overview of both approaches and give recommendations which approach is the right for your modeling tool.
Model Hub Approach
This approach focuses on a model-first, command-based model management. It is built around a central Model Hub that offers robust capabilities such as command-based editing, state management with undo/redo, and persistence. This is ideal for scenarios where fine-grained change control and model-oriented clients are most vital for your modeling tool.
For more details, see the Model Hub Approach section.
Langium-Based DSL Approach
This approach is designed for modeling tools that are built around textual domain-specific languages. Leveraging Langium, it provides advanced textual language features including parsing, reference resolution, workspace indexing, and language server integration, but extends it with a modeling-tool-oriented API to simplify accessing the models via an API for non-textual editors.
For more details, see the Langium-Based DSL Approach section.
Selecting the Right Approach
Most modeling tools can be built with either of the two approaches, however, many modeling tools have rather a text-file-oriented model management perspective or a model-oriented model management perspective, at least they tend in one or the other direction. Tending in the one or the other direction makes certain implementation strategies a more natural fit.
Instead of enforcing one approach for all modeling tools, EMF Cloud embraces these differences and provides a set of different components for both implementation strategies.
Summary of Approaches
The table below highlights the key differences between the two approaches. For further guidance on integrating and customizing these approaches, please consult the dedicated sections in our documentation.
Feature Category | Model Hub | Langium-Based DSL |
---|---|---|
Core Model Management | ✓ Comprehensive management with command-based editing and undo/redo | ✓ Includes DSL-specific model management |
Model API | Advanced and flexible | Basic integration for DSL |
Command-based Editing | ✓ Built-in support for complex model edits | - |
Multi-Client Support | ✓ Real-time updates and coordination | ✓ Supports multi-client scenarios |
Validation Framework | Comprehensive model validation | DSL-based text validation |
Persistence Layer | Customizable strategies | DSL-driven approaches |
Language Infrastructure (LSP) | - | ✓ Full Language Server Protocol support |
Reference Resolution | Basic built-in resolution | Advanced symbol and reference management |