Naming Conventions

0
What Naming Conventions should we use in Mendix for Microflows because on Mendix Academy Learning Paths the naming convention used is Capital Letters whereas on Best Practices page its mentioned in Small Letters   Below is a screenshot from Mendix Academy Course :   Below is the screenshot from Mendix Best Practices Page :   Would appreciate your help, Thanks in advance !
asked
4 answers
1

Best practice is to stick to the latest programming standards. They do not tend to change a lot. The academy training courses have been developed over the last decade, and when the standard prefix changed from ACO_ to ACo_ it is just too laborious a task to change every occurence in every text and screenshot in every training. Even the persons that have created the training, nowadays usually follow the latest guidelines (or at least they should).

answered
3

Mendix has changed there best practice documentation a while ago from the capitalized

“Action” → ACT_ and “After Commit” → ACO_

to the one you found.

Act_ and ACo_

I find the recent ones slightly easier to read but still find myself using ACT_ most of the time. Nevertheless I would recomment the latest best practice if you start new.

But since one of the reasons to use these prefixes is to make it easier to find such microflows in a search – and the search is case insensitive – it is on the other hand a matter of taste and you should mainly align it with your team.

Addendum:
It is a widely used pattern to prefix submicroflows with a SUB_, however this is not part of the official mendix best practices. 

answered
2

IOP Fabian gives the best advice by saying you should align this with your development team.

I would also add that it is a good idea to introduce some kind of automatic check to make sure everyone is following the agreed upon guidelines for example by using ACR or another tool. ACR covers many of the naming conventions and a lot more see for example https://sdf-docs.mansystems.com/docs/acr-rules/project-hygiene/microflowprojecthygienesubinnanoflow/

 

answered
0

I would stick with all caps for the prefix. These are some examples:

  • AST_AfterStartup
  • SUB_CheckValidity
answered