Yes, constants :)
You could use constants, but you could also create a setting entity in your model with all you different settings. This way you don't need a restart of your application when you want to change some environment settings.
Hello all, I've been considering this something similar for an app I'm working on.
I use constants but have been thinking these should really be in an entity which I load up on start-up.
This way I can change them via an admin screen if necessary.
But what is the best way to populate the entity, do I load them from constants? Can anyone tell me what is the preferred Mendix way to tackle this problem?
Regards
Adrian
Hi Adrian,
What I have seen being used (in the AuditLog module for example) is that the default value on the Enttiy's attributes is used to do the initial set up.
You have to make sure to document this, thought. Another approach would be of course constant, or hardcoding.
-Andrej