Hacker News new | ask | show | jobs
by a_c 2177 days ago
Sort of tangential. While there are lots of tools to convert code into diagram, I wonder if there are tools to convert diagram into code with defined rules.

Am asking because there are lots of programming illiterate colleagues. By encoding the business rules into drawing rules, one could potentially delegate the business logic writing part to non-coding staff

3 comments

There's a whole discipline around converting diagrams to code, called Model Driven Engineering. The idea is that you capture business entities and rules in various well defined diagrams, which then can be converted to code through code generation tools, i.e. can be turned into programs.

This was mainly promoted and developed by the creators of UML and has strong ties to it. That was UML's vision after all, a visual diagram language that unambiguously captures the essense of a program.

The Eclipse Modeling Framework is a framework that implements this approach.

I think MDE was up and coming around the end of the 2000s. As far as I know it didn't really go anywhere.

You could perhaps do something with the dot language and gvpr[1]. It's not super easy to use though, but I've used it to generate a Javascript representation of a graph before.

[1] https://manpages.debian.org/testing/graphviz/gvpr.1.en.html

webgme.org, with a fair amount of work
Thanks for the pointer! Will check it out