How mendix/extensionapi-samples works
Project Type and Purpose
• This is a sample repository for Mendix Studio Pro Extensions. It aims to demonstrate various extension use cases (e.g., adding context menus, dockable panes, custom menus, microflow manipulation, and modal webview dialogs).
• The central purpose is educational: to show how different parts of the Mendix Extensions API can be utilized in real projects.
File Structure
• The top-level directories include an extensive “API Reference” folder where every aspect of the Extensions API is broken down into components (BackgroundJobs, ConsistencyCheck, DomainModels, Microflows, UI components, etc.). This illustrates a modular design in the API itself.
• There are separate tutorial directories (tutorial_basics, tutorial_contextMenus, tutorial_dockablePanes, tutorial_menus, tutorial_microflows, tutorial_modalWebviewDialogs). Each one is a self-contained project with its own .csproj and manifest.json; these serve as discrete examples that hook into the core API.
• A solution file (MyCompany.MyProject.ExtensionSamples.sln) ties these sample projects together, suggesting a suite of interconnected examples.
Key Architectural Components
a. Core Extensions API (Library Layer):
• Represented by the API Reference folder.
• Contains interfaces, classes, documentation, and service components for Background Jobs, Domain Models, Microflows, UI components (e.g., Dockable Panes, Menus), etc.
b. Sample Projects (Extension Implementations):
• Each tutorial (Basics, Context Menus, Dockable Panes, Menus, Microflows, Modal Webview Dialogs) implements a specific extension.
• They serve as entry points that interact with the core API – each defined via their respective project file and manifest.
c. Integration and Deployment:
• The sample projects illustrate how to integrate with the core API. They may depend on specific Mendix API services (such as IBackgroundJobService, IMicroflowService, or IMenuExtension).
• The manifest.json in each sample provides metadata for integration, showing how the extension is configured within Mendix Studio Pro.
Relationships and Interactions
• Each sample should be individually represented – as separate blocks that connect back to the central API components.
Architectural Patterns and Technologies
• The API design follows an interface-based modular design, as evidenced by the many “I…” prefixed interfaces.
• Each sample project adheres to the same API, demonstrating dependency injection or service-oriented principles.
• The repository is designed to be extensible, allowing for new sample extensions to be added easily by following the provided patterns.