How Mendix Runtime works (high-level)

4
Let me understand a bit how Mendix's interpreter works. Is it like any other interpreter? The visual models are translated into standard Java code, in runtime, and then executed by the JVM? Or are the models translated, in runtime, to an intermediate representation, and the model executes this intermediate representation? How is this intermediate representation executed? JVM/ OS calls? Is there a cache mechanism for models that constantly executed? And for (dynamic) pages that are constantly accessed?
asked
1 answers
8

Disclaimer: I am not working for Mendix, these guys have more information.

It is an interpreter but the models are NOT translated to Java. That is called code-generator.

The modeller maintains integrity of the model.

The entities are used to create tables and indexes.

Microflows are executed by an interpreter that caches it own workspace and transaction. At the end of the microflow all database updates are executed. In version 4 this is highly optimized with non-persistent objects and built-in batch handling.

Edit: The database changes are done at the time they are executed in a microflow, it's just the transaction mechanism that makes it 'commit' near the end. (Bas)

Java actions are compiled are called from the run-time.From Java the data and metadata is accessible.

Forms are xml formatted files that are processed by the run-time to add controls and data. These forms are cached by the web server.

You can learn more by enabling all logging in the console to debug. You can see the generated SQL, ajax-calls etc.

The advantage of this approach is that an new version with more optimization will result in faster websites without model-changes.

Why do you want to know this? Do not open up the toy, but use it and enjoy!

answered