Using the Mendix Platform and Model SDK to automate repetitive tasks. Presented by Alistair Crawford and Iain Lindsay at the Mendix Maker Meetup in London on 17th October 2019
Size: 1.15 MB
Language: en
Added: Oct 18, 2019
Slides: 24 pages
Slide Content
M endix Platform and Model SDK Iain Lindsay (AuraQ) | Alistair Crawford (Mendix) 17 OCTOBER 2019 Automating the boring stuff
Introductions SDK Overview Core use cases Getting Started Samples / examples Analysing naming standards Changing colour of microflow activities Creating validation microflows Generating model documentation | Agenda
| SDK Overview Two SDKs – Platform and Model Platform provides access to model server Creating an app Creating a branch Opening a revision Model provides access to the application model Retrieve information about all application objects Manipulate existing objects Create new objects Typescript based SDKs Strongly typed javascript
| Core use cases Migrate Analyse Export Modify Analyse your Mendix applications. Identify duplication, complexity, non conformance to dev standards. Update your Mendix applications. Automate repetitive and/or time consuming tasks Export your Mendix applications to code, documentation or test cases. Convert legacy applications into Mendix applications.
| Dev environment Dependencies Node + NPM https://nodejs.org/en/download/ Typescript npm install –g typescript Initialising a new project mkdir my-project cd my-project npm init --yes npm install mendixmodelsdk mendixplatformsdk when @types/when –save tsc -- init
| Connecting to the platform Generating an API key Developer key not project key
| Connecting to the platform Creating an online working copy – Existing project
| Connecting to the platform Creating an online working copy – New Project
|Understanding the metamodel Reverse engineer an application Recognisable objects are easier to understand https://github.com/lindski/mx-sdk-modelexport Export objects as code functions. Builds on https://docs.mendix.com/apidocs-mxsdk/mxsdk/generating-code-from-the-model
SAMPLES / EXAMPLES
| Analysing naming standards Enforcing Best Practises Check your model against your team’s standards Demo: Report on all Microflows that don’t have an appropriate Prefix https://github.com/mxcrawford/sdk-examples
| Analysing naming standards Set your rules
| Analysing naming standards Analyse
| Changing colour of microflow activities Make your model easy to identify Demo: Make sure all Microflows are set to their correct colour based on the nature of their action Create Object Change Object Delete Object https://github.com/mxcrawford/sdk-examples
| Changing colour of microflow activities Load it
| Changing colour of microflow activities
| Creating validation microflows Typical pattern for committing objects Main commit microflow Sub validation microflow Auto creates validation microflows with basic rules Treats every supported attribute as required. Stores microflows in separate folder https://github.com/lindski/mx-sdk-validationcreator
| Generating model documentation Generate documentation for your application artefacts Extend with custom documentation Enrich with Markdown Generates documentation using Docsify https://docsify.js.org/#/ Add your own documentation tool E.g. Confluence https://github.com/AuraQ/MendixDocumenter
| Draw inspiration Some of many existing examples to be found https://forum.mendixcloud.com/link/questions/12432 More ideas Enforcing Best practises and standards e.g. check and alert for any commits in a loop Migrating over to Mendix e.g. convert HTML page to Mendix page Accessibility Make sure all pages have h1 widget Make sure all Delete, New and Save buttons are correct “colour” Pure fun e.g. Microflow Art by converting image to Microflow