9.0

Last update: Edit

9.0.2 Beta 1

Release date: December 22nd, 2020

Download

New Features

MxAssist Performance Bot

MxAssist Performance Bot is now available as an intelligent virtual co-developer bot that helps you improve the performance of your app project by inspecting your model against Mendix development best practices. It detects anti-patterns during the design and development, pinpoints these anti-patterns for you, suggests how to resolve them, and in many cases can automatically fix these issues.

MxAssist Performance Bot is built using the statistical analysis of thousands of anonymized Mendix app projects to learn common anti-patterns. In addition, it uses the best practices from Mendix Expert Services in the development of microflows, domain models, pages, and security. It consists of three levels of assistance:

  1. Detection – The bot inspects the app model, identifies the issue, and pinpoints the document/element causing the issue for you.
  2. Recommendation – The bot explains the identified issue, the potential impact, and how to fix it. There is also a link to a detailed best practice guide with steps for fixing the issue.
  3. Auto-fixing – After the user acknowledges, the bot can automatically implement the best practice and fix the issue.

New Merge Algorithm

In the Preferences dialog box, you can enable a new merge algorithm. This algorithm is used when doing an Update or a Merge to combine changes in the app project model. The new algorithm has the following advantages compared to the old one:

  • Fine-grained conflict resolution – When there are conflicting changes to a document, you no longer have to choose between whole documents (your whole page versus their whole page). Instead, you can resolve conflicts at the level of individual elements, such as data views, entities, attributes, and microflow activities. Also, all non-conflicting changes are accepted automatically from both sides.
  • Ability to make parallel changes to a list of widgets – Parallel changes to a list of widgets no longer lead to a conflict. For example, two developers inserting a widget in the same data view, do not result in a conflict now, while in the old algorithm, you have to choose between these changes. If the changes are too close, there is a list order conflict to remind to decide on the final order of the widgets in the list.

For more information on the new merge algorithm, see New Merge Algorithm with Fine-Grained Conflict Resolution.

Also in the Preferences dialog, we removed the option to go back to the old version of the Changes pane.

Progressive Web Apps

Studio Pro 9 adds support for building offline-first progressive web apps (PWA). PWAs offer offline-first capabilities similar to native mobile apps, but do not require you to publish your app in any app store.

You can create an offline-first PWA by adding one of these new navigation profiles to your app project: Responsive offline, Tablet browser offline, or Phone browser offline. Web browsers that support the necessary offline features (currently Google Chrome and Microsoft Edge) will load the offline profile. Other browsers will gracefully fall back on the online profile.

PWAs on a Device’s Home Screen

With the new PWA functionality, end-users can easily add a Mendix PWA to the home screen on both iOS and Android devices. This makes it easy for end-users to open the app again and gives the app a more native-mobile feel by showing a splash screen and hiding browser controls when launching.

To enable this, configure the icon in the navigation profile. When an end-user opens the app on their device for the first time, the browser will ask if the end-user would like to add the app to the home screen (this can vary per browser). The icon will be shown on the home screen and as the app starts up.

Improvements

  • We improved the getCaption and getKey expression functions to not throw an error for an empty parameter. Instead, they return an empty string (just as the toString function does).
  • We improved the nanoflow execution time, including for passing lists to sub-nanoflows. (Ticket 110062)
  • When migrating files created before Mendix 6 to modern files, we now log the missing files instead of failing the migration. (Tickets 110317, 110969)
  • In the domain model editor, microflow editor, page editor (only in Structure mode), and document template editor, it is now possible to use keyboard shortcuts for zooming in/out and resetting the zoom level (via the control with +, -, and 0). The toolbars of the page editor and document template editor now also have a drop-down menu for setting the zoom level.
  • We have added a new tab to the View mobile app dialog box so that you can now easily access your web app or PWA from your phone or tablet by scanning the QR code.
  • We added support for named exported classes and functions in web widgets. You no longer need to export your widget class as a default.
  • We made it possible to use associations in the microflow expressions used in a pluggable widget’s expression properties and as a page title in the Show a page action.
  • The way we interact with binaries stored in third-party systems like AWS S3 and Azure has been improved. Now, we keep track of external changes using a two-phase commit that prevents unknown orphaned files.
  • We have made the Mendix session ID available in a web socket endpoint.
  • You can now use image uploader widget inside a containment or repeatable containment pluggable widget.
  • We improved the accessibility of action buttons like Call microflow button and Link button. You now have a configuration option to set the role of these buttons. For more information, see Button Properties.
  • We now also show error badges on elements in the page editor’s Design mode.
  • We no longer support non-persistent sessions.
  • In the Runtime API, we made the following improvements:
    • We removed the floatsEqual, currenciesEqual, parseFloat, formatFloat, and toFloat functions, because the float and currencies types no longer exist. These functions were also removed from Studio Pro.
    • We removed the deprecated IWebserviceResponse.getSaxSource and Configuration.getWebServiceCertificates methods.
    • We removed the deprecated <R> R execute(IContext context, String name, Object... params) throws CoreException, <R> R execute(IContext context, String microflowName, Map<String, Object> params), and <R> R execute(IContext context, String microflowName, boolean executeInTransaction, Map<String, Object> params) methods from the Core. Use Core.microflowCall and Core.userActionCall methods instead.
    • We removed the deprecated void setSystemAction(boolean isSystemAction) from CoreAction. The method should not be used and there is no replacement.
    • We removed the deprecated <R> void addBeforeEvent(Consumer<R> consumer, Class<?> returnType), <R> void addBeforeEvent(Consumer<R> consumer, Class<?> returnType, boolean raiseExceptionOnFalse), and <R> void addAfterEvent(Consumer<R> consumer, Class<?> returnType) methods from ActionListener. Use alternative overloads of the same methods instead.
    • We removed the deprecated void setValue(IContext context, byte[] bytes) and void parseAndStoreValue(IContext context, String value) from MendixBinary. Use setValue of IMendixObjectMember instead.
    • We removed the deprecated void commitValueAsFileDocument(IContext context) and void setLength(Long length) from MendixBinary. commitValueAsFileDocument should not be used and setLength was an optimization. There are no replacements.
    • We removed the deprecated Long getLength() method from MendixBinary. Use MendixBinary.getLength(IContext context) instead.
    • We removed the deprecated constructor RequestHandler(Object component) of RequestHandler. Use the default constructor instead.
    • We removed the deprecated getType() method from IDataValidation. Use the getValidationType method instead.
    • We removed the deprecated getRemoteSource() method from IMetaObject. This was an internal method, and should not be used. There is no alternative.
    • We improved the performance of the Core.getActiveSession(userName) method.
    • We improved the type-checking on Core.evaluateExpression(). It now accepts exactly the same expressions as Studio Pro and no longer accepts other expressions that were wrongly accepted in previous versions. Concretely, the following constructs are no longer accepted (these changes apply only to Core.evaluateExpression(), as Studio Pro already does this):
    • ceil and floor previously accepted any type. They converted the value to a string, tried to parse the string into a decimal, and then rounded it. Now, only decimals and integers are accepted, and all other values are considered runtime errors, because applying ceil and floor does not make sense for non-numeric types.
    • max and min previously accepted either integers, integers mixed with decimals, or integers mixed with decimals and strings. In the latter case, it converted all values into a string and then did a lexicographical comparison. Strings will no longer be accepted. Strings can still be compared to each other using <, <=, >=, and >.
    • round previously accepted either integers or decimals for the precision argument. Decimals are no longer accepted, only integers are accepted, as it does not make sense to round to a non-integer number of digits.
    • The add (+) operator previously allowed any value to be concatenated to a string. It converted the value to a string and then concatenated it. This is no longer allowed, and concatenation of strings is only allowed with strings or strings with decimals or integers. If date/times, Booleans, or enumerations need to be added to a string, use the toString() function to convert them to a string first. Note that an empty/null value is still concatenated as 'null'.
    • The equality (=) and inequality (!=) previously allowed enums to be compared with strings. This is no longer accepted, and only enums are allowed to be compared to enums. Comparing them to strings can still be done by first converting the enumeration to a string using the toString() or getKey() function.
    • The equality (=) and inequality (!=) previously also allowed binary values to be compared. This is no longer allowed. Note that comparing with empty is still valid (for all types).
    • The dateTime and dateTimeUTC previously allowed integers and decimals as its arguments. Decimals are no longer accepted, only integers are accepted, because it does not make sense to initialize a date/time from floating point numbers.
    • Most string functions previously allowed any type for the first argument. The value was converted to a string and then the operation was performed. Now, only string values and theempty value that we treat as an empty string ('') are accepted.
    • The toString function previously accepted all types and converted them to strings. Binary values, objects, and lists are no longer accepted, only strings, integers, decimals, Booleans, enumerations, date/times, and an empty value (that results in an empty string) are accepted.
    • The toDecimal function was removed as well, since it does not exist in Studio Pro at all.

Fixes

  • We fixed a faulty conversion that caused Close page activities in native mobile apps to not close any pages after your app project had been upgraded from Studio Pro 8.11 or above. (Ticket 111576)
  • We fixed an issue where using an attribute over an association in the sort order of a pluggable widget’s data source caused an exception or an incorrect sorting.
  • We fixed an error that occurred in the client when retrieving data after a fast redeploy.
  • We fixed an issue where closing multiple pages in a native mobile app caused the Back button text to display the page title of the page that was being closed. In addition, if closing multiple pages removes all pages, the back button will no longer be shown during animation.
  • We fixed an issue regarding the Change list microflow activity where if a list was set to itself, the contents were cleared. (Ticket 109243)
  • Deployment is now aborted before synchronization starts on MySQL if the combined length of attributes or the count of attributes of an entity exceeds the maximum supported amount. (Ticket 90823)
  • We added a warning to indicate when the Synchronize to device microflow activity is being used in unsupported flows such as synchronization.
  • We fixed a problem with the Show page and Close page microflow activities when the target page has the Bottom bar property set to Yes but there are no visible bottom-bar items.
  • We fixed an issue where it was not always possible to move widgets from pluggable containment widgets in Design mode.
  • Microflow execution behavior has been modified to handle interruptions more consistently. Previously, when a microflow was interrupted, the commits executed up to the interruption were retained, but the microflow was canceled, as if an error had happened. With this fix, we ensure that interruptions are handled the same way other errors are handled.

Deprecations

At Mendix, we want to provide our customers with a future-proof platform, a significant part of which is always determined by underlying technology. We believe that native mobile apps and progressive web apps (PWAs) are the future for mobile apps, in that they deliver a best-of-breed approach for building app store- and browser-based mobile apps. For more information, see the Establishing Your Mobile Architecture Strategy session from last year’s Mendix World.

We do not consider hybrid mobile (which is based on Cordova) to be future-proof technology anymore. Therefore, hybrid mobile apps are deprecated in Studio Pro 9. It is no longer possible to create new navigation profiles for hybrid apps.

In addition, the report grid widget has been deprecated and will be removed in a future version. We advise against using it in your app projects.

Breaking Changes

  • We now fail the synchronization if it is unable to set the Read Commit Snapshot Isolation in SQL Server.
  • We removed support for the runtime uniqueness validation. This means that from now on, attributes and associations will be validated for uniqueness in the database.
  • It is no longer possible to add mathematical expressions in an XPath outside of tokens. Mathematical expressions should be calculated outside of the XPath expression.
  • The previously deprecated API for globally styling the status bar and header of native pages has been removed. Use the Page and Layout classes instead.
  • We have removed app services, which were deprecated in Mendix 8.
  • The version of big.js library available for widgets has been updated from 5 to 6. The changes between versions are minimal, so we do not expect that your code is affected.
  • Native mobile apps now use React Native version 0.63.3. The libraries that are exposed to native mobile apps have been updated as listed in the React and React Native section of Client APIs Available to Pluggable Widgets. Any pluggable widgets or JavaScript actions that use React Native APIs should be updated accordingly.
  • Studio Pro 9 removes support for Internet Explorer 11. Welcome to the new era! You can check the updated System Requirements documentation to see the list of supported devices and browsers.
  • Deprecated hybrid mobile applications cannot be run anymore in Android emulators. However, on real (up-to-date) devices, they will still successfully run.

Known Issues

  • Creating new apps in this version will work, but upgrading and converting existing apps may fail because not all App Store modules and widgets have been made compatible for Mx9. This will be fixed for the general availability release of Studio Pro 9.0.
  • When you update a consumed OData service with a new version from Mendix Data Hub but close the document without saving, the blue arrow icon will no longer be shown to notify you about the available update for that service.
    • Workaround: Closing your app project and opening it again fixes this issue.