This article gives a general overview of how to create, deploy, and maintain Mendix components such as modules, themes, and widgets.
Introduction
If you’ve made something in Mendix that other people (on your team, at BYU, across the internet) might find useful, you can and should share it. Modules and themes are both created in Mendix and are very similar. The three most common Mendix shared content are: modules, themes, and widgets. Anything said about modules is applicable to themes as well, unless otherwise specified. Widgets are slightly different, since they are more often custom-made in Java and then added to Mendix.
Creating a Module or Theme to Share
For one-off sharing, you can export and share the module as a Mendix package (.mpk) file. However, to keep shared modules up to date and documented, you should share modules, themes, and widgets through the Mendix App Store.
Export the module or theme file
Right-click on the module you would like to share
Click “Export Module Package”
A pop-up will appear, asking you to select dependencies
While it may be difficult to determine the files that your module depends on, try to eliminate as much as possible. Conflicting dependencies can break functionality.
Save the file as a .mpk to your computer
Creating a Widget to Share
Widgets are created in Java, and will need to be hosted by GitHub before being linked within the Mendix App Store. Once you have a component in GitHub, you will simply follow the steps below and point your component to its location in GitHub.
Uploading a Module, Theme, or Widget to the App Store
For widgets, go to Select from GitHub. For modules and themes go to Manual Upload and then click Upload.
Select the .mpk you exported
Click Save
It may take some time to upload, depending on the size
Add Release Notes
“Initial upload” is sufficient for the first version
Publish to:
Anything for the BYU space should be set to “Private App Store”
You can share objects to the entire Mendix community if you would like, but be sure that you aren’t sharing anything that should remain private and specific to BYU.
Name your component and give it an image
Set the Category
Module, Theme, and Widget are most common
Overview tab
Write a description of your component
While screenshots are optional, add them whenever possible
Documentation tab
Add the documentation for your component in this field.
If your component will be widely used across BYU, you will need to have the documentation added to BYU Common Components and add a link to that article in this section. For more information, refer to "Documenting Modules, Themes, and Widgets"below
The Statistics and All versions tabs are not relevant during your initial upload
Version Details
The version number updates automatically each time you update your component, depending on the scope of your updates. For more information, refer to "Managing your Content" below
Set the Mendix Studio Pro version to the version you created the content in.
Click Save Draft
If you click Save Draft at any point during the uploading process, you will receive an error message letting you know if you have missed any required sections. Add information to these sections and save again.
Downloading a Shared Module or Theme
For certain versions, downloading private App Store modules/widgets has been turned off at the moment for security reasons. The latest version of private App Store content can still be downloaded from the Company Content tab in the Mendix App Store and then imported into the respective versions of Studio Pro/Desktop Modeler. Once the module is downloaded, import it by right clicking Project File and clicking on Import module package.
Documenting Modules, Themes, and Widgets
If you are creating or working on an object that will be used frequently across BYU campus, the documentation should be hosted on Mendix at BYU. This can be done by working with a Technical Writer on your Agile Team. If you do not know your Technical Writer, contact Laura Bass or Paul Eden via Slack or email.
Managing Your Content
Generally speaking, you should update your component with each version of Mendix that is released.
Check to see if you have rights to edit by searching for the component in the BYU Mendix App Store. If you can edit, you will see an Edit button.
Note: You may be asked to update an app that was created by someone else. If you do not have access, check to make sure another user does not currently have a draft for that component. If there are no drafts, contact Paul Eden to get access to edit the component
Download the component to ensure you are making changes to the correct component.
Make changes to the component as desired. Make sure it functions correctly within the most recent version of Mendix Studio Pro.
Export the new .mpk file
Upload it to the App Store.
Click Edit on the component
Fill out the draft
Update Type and Versioning
There are four types of updates, and they adjust the version number accordingly: Major, Minor, Patch, and Custom. These correlate respectively with each value in the number version (0.0.0).
For example, if the app was version 1.1.1 and you did a major update, the version would change to 2.1.1, but if you made a minor update, it would change to 1.2.1
For more details on completing a draft, refer to the above section Uploading a Module, Theme or Widget to the App Store