[TSTIL] Mendix2Java

[ This is a part of "The Software That I Love", a series of posts about Software that I created or had a small part in ]

2015 - Mendix2java

Roald called me up one day and said we had a problem. We were about to close a major deal with a large company that I can't name here, but the sales process was stuck at the last stage. Roald was co-founder and pretty important and he never called me, so that was interesting.

He's an interesting character: driven, business focused, and very smart. He's unbeatable at the interplay of tech and sales. He's very confrontational, so I had to get used to him in the first couple of years, but after that I deeply respected him. He's confrontational because he cares. I think the respect was mutual because he called me in this crisis, and we worked together quite a bit when I was a PM.

This almost-customer was stuck on vendor lock-in. Building things on any platform is risky because it's expensive to migrate off of it. The more value a platform provides, the more it costs to get out of it. Mendix is no exception. Our sales people were able to convince most customers that this was not unique to Mendix and that it was alright, but here they didn't budge. Roald knew my reputation for getting sh*t done and that I had done all these crazy projects in the past, like mprtools and Access2Mendix. So, he called me up and said we needed a demo of exporting the logic in a Mendix project to a "normal language like Java". We'd need it Friday. Today was Tuesday and I was flying to a conference that was happening on Wednesday and Thursday. Time was tight to say it mildly.

"What do you need to get it done?"

In times like this, having lots of people doesn't help. A group of 2 to 3 people that already work together extremely well could work. I knew that I needed David. Done. He was on the team. David and I already worked really well together, being good hackers and now both Product Managers. We had a good vibe. He's very clever and had good theoretical knowledge about language fundamentals and transpiling. I don't, but did have all this previous hands-on knowledge.

We knew this prototype was going to be a demonstration that an export to a different language could be done. We were not selling the tool to the prospective customer. We were showcasing that the high-level abstraction in Mendix allowed exports like this. So we were off to the races. Using mprtools we created export-logic for the Domain Model to SQL table creation statements. Not super hard. Then we started extracting the logic in Microflows to Java classes. Ok, this got complicated quick.

In Mendix microflows, every arrow in the diagram is basically a go-to statement. We had to eliminate the go-to's and migrate them to for-loops, if/then/else constructs, etc. . There was some research from the 70s on this topic but it was useless right now. We decided to build the easy cases first and drop down to a "TODO" statement for too complex cases. The people working on the export would have to figure this out for themselves. When I was boarding my plane we had gotten quite far and David worked on it for some more days. At the end there were only very few cases left that the exporter could not handle.

I wasn't there, but apparently the Friday demonstration went great. "If you can do this within a couple of days, it's clear that it's possible and you have a great solution for vendor lock-in." Huge parts of the code were still missing, and the secret ingredients of the Mendix Runtime could not be included in the export at all. How useful was this actually? But, we did a lot better than our competitors and we got the deal! If we were in Pre-Sales, David and I would have probably gotten a fat bonus, but we were in R&D.  Sometimes the intellectual challenge is its own reward. It's certainly a cool story.

next2016 - Mendix Cloud v4 - Part 1 - How it got started

previous2015 - buildpacks for Docker


Popular posts from this blog

AI programming tools should be added to the Joel Test

The unreasonable effectiveness of i3, or: ten years of a boring desktop environment

The long long tail of AI applications