Stephan Bruijnis .dev


Be Informed - best practices and patterns (case events)

Mar 12, 2021
Be Informed
Best practices, Patterns

Be strict with event data # Values and attribute sets quickly accumulate in events. With handler groups, execute events, schedule events etc. it is very hard to keep track of where which values are set and available in the context. It is advised to tidy up values and attribute sets in events after usage. Only let them continue to exist in the event if you are certain they should and will be used further on. ...

Be Informed - Errors and Warnings

Mar 12, 2021
Be Informed
Errors, Warnings, Debugging

Note: implementation specific labels are replaced with X in the error and warning messages Server log # Component not found # ERROR Either the user misspelled the URI (e.g. used an old bookmark to a part of the application that has a new URL) or there is a redirect handler configured that leads to a wrong URL. Check in local dev environment whether the URI should exist. Could not evaluate expression in ‘X’ with expression ‘X’: Identifier is unavailable or value is null # ERROR Could not evaluate expression in 'X' with expression 'X': Identifier is unavailable or value is null. ...

What the (c)heck

Oct 7, 2017
Peer review, Checklist

Code review or peer review is the process of systematically reviewing each others code/work for mistakes, errors and quality. It is a fundamental and highly effective process to increase quality in software development. I use the following checklist and questions when reviewing the work of others and it has proven to be very useful: ▢ Objective based ▢ Unbreakable ▢ Security ▢ Performance ▢ Maintainability ▢ Testable ▢ Reusability Objective based # The code achieves its purpose. ...

Fast manipulation of large tables

Jul 13, 2017
Performance, Batch processing, Transactions

Mendix applications can accumulate large sets of data originating from various sources and created for various reasons. In order to work efficiently with large datasets extra attention to performance is needed. This post will provide recommendations for speed and performance when modelling manipulations of large datasets. Use batches (limits and offsets) # Batches are the execution of actions each on a set or “batch” of inputs, rather than a single input. ...

Writing better commit messages

Jul 5, 2017
Commmit message

A commit message is a communication between you and your co-developers. Creating a habit of writing good commit messages serves many purposes and can save everyone a great amount of time and frustration. The good, the bad and the ugly # A good commit message serves several purposes: Explanation of the commit (the what and why) Speed up the reviewing process Writing release notes Future maintenance and reference Information for merging Writing a good commit message does not happen by accident, however a bad and ugly one happens by default. ...

Applying security to inheritance

Jun 1, 2017
Security, Inheritance

Configuring the security of a Mendix application is an important but sometimes tedious task. Misunderstanding of how security is applied by the Mendix platform can lead to failing security with great consequences. It is the developers task to constrain each entity with access rules. This post is a quick guide to setting up security in the context of inheritance. Knowledge of How to: Create a secure app and Security Best Practices and Improvements for Mendix Applications is assumed. ...

Use Cast Object to get the specialisation

Aug 17, 2016
Cast object, Inheritance, Performance

The Mendix platform queries the entire hierarchy when retrieving the specialisation from the database, in order to guarantee a consistent data structure. When retrieving the generalisation it will also retrieve the entire hierarchy. Thus, developers should never retrieve a specialisation from database if the generalisation is already available. Use Cast Object with an inheritance split to get the specialised members of the object. This is much faster. Inheritance # A specialisation is an entity that inherits attributes, associations, events etc. ...

Scheduled events might not work the way you would expect

Aug 12, 2016
Scheduled Events, Intervals

Scheduled Events (SE) allow you to execute microflows at a specific time. These events can be repeated based on an interval (e.g. every day). The Mendix platform calculates when the next iteration of an event should occur based on fixed intervals. These intervals are configured by the developer but the execution of these intervals might not meet expectations. For example, an event scheduled at monthly interval will run every 31 days instead of every month. ...

Using Google Tag Manager with Mendix

Feb 19, 2016
Google Tag Manager, GTM, Analytics

Analytics are essential in monitoring and reacting to traffic and usage of your application. The widget for Google Analytics in the Mendix Appstore lets you track events, pages and transactions, but can be time-consuming to configure. With Google Tag Manager you can launch new tags with a few clicks. Instead of adding new events in Mendix, the Google Tag Manager allows marketers to add new tags without the need for changes to the model and deployments of Mendix. ...

The developers guide to performance

Jan 31, 2016
Performance, Optimization, Database, Microflows, Improvements

End-users expect fast and engaging web experiences. Yet the application landscape is becoming more complex. Your Mendix application can meet these rising expectations and impress users on both desktop and mobile devices. Learn how to locate and analyse performance issues, improve application performance and gain insight in how design decisions impact your application. This post is a comprehensive reference guide for developers to optimize their applications. Introduction # Performance is vital to creating a successful fit-for-use application. ...