Reusability in Mendix from a Construction side perspective
Did you know that The European Union has about 25 million companies, with 6.3% of companies in the construction industry? This makes it about 1.5 million companies in construction.
As a Mendix developer, I sometimes feel like being on the construction side as well. We deal with heavy machinery as AWS cloud, Additional Project and API-testing tools for doing the heavy work. In addition, we have a lot of automated tools, and processes that help us get things done fast, like Code-checking at deployment, A simple Commit-button that invokes a complete deployment pipeline, Database Connections, Reusable Ccomponents and widgets, etc. And ofcourse, the precise instruments to fix the little details, like Xpath-expressions, String functions and property setting. All of them work as an orchestrated symphony to get the job done.
Many construction sites have one or 2 large machines doing the same thing over and over again. for example a crane; it only lifts stuff. Maybe different types of stuff, but still; the crane only lifts up and down. The same for the trucks moving sand, the drive from A to B. That’s all they do.
Ofcourse, you probably see the link with re-usability. It would be crazy to get a new truck for loading and moving the sand for each bach, because there will be too many of them, creating a mess or traffic jam. In addition, many trucks will also get in the way of other construction processes.
There is, however, another important factor about the lack of reusability within a construction context; you lose oversight and control. For sure, each truck driver knows where to go and each crane operator knows how to lift. But what if for all the trucks, inspection is needed? or a driver needs to be hired? or fuel needs to be bought? The bottom line is; process have dependencies, and the more processes you have the more dependencies. Reusability does not have that.
Now, lets go back to our Mendix Construction Side. How can we run our Mendix Project as a multi-million construction side, when running ,for example, a retrieve?
- How about we place a Building (Entity) with one crane for the lifting (Retrieve).
- We use our electric drills and sawing machines to get the basics parts out of the lifted goods (List Operations & aggregates).
- Then we close up with making the basic parts pixel-perfect instruments to make it look stunning (Expressions, css & data formatting).
And in case we start building the next floor, we can probably reuse the crane, machines and instruments.
It’s good to mention that the context of your Mendix application often dictates how to deal with reusability. Sometimes, a simple expression reduces complexity over running a List operation. And sometimes a Retrieve-count-combination is way better than a reusable Retrieve and count later. The best practice for reusability is not to make less microflows, but keeping your Mendix modeller, easy to maintain, free from complexity and scalable.
