Code generator quadrant


Code generator quadrant

Code generators come in many flavors. In this article we present a code generator quadrant based on the black-box versus white-box x-axis and the non-developers versus developers y-axis. As there is no code generator to suit every purpose, choosing the best option is a matter of anticipating its application and actual user.

What is a code generator?

Our definition of a code generator is ‘a software tool that generates source code based on meta code’. The generated source code can be Java, C#, Angular or any other language and framework. The meta code can be a representation of a process, an enriched model description or a combination of both.


Code generator assumptions

Especially software engineers can be rather reluctant with regards to code generation. Some assumptions we often encounter are:

  • “Limited to boilerplate
  • “For initial project set-up only
  • “For simple applications
  • Customizing generated source code is hard”
  • Creates code generator dependency
  • Poor performance”
  • Ugly source code”
  • “For the business, not for IT”

But these assumptions simply do not apply to all code generators. Please read our explanation.

Black-box versus white-box

A black-box code generator produces source code that cannot be influenced by the user. Some black-box code generators do not even show the generated source code. The user simply adds meta code and the black-box generator will produce source code and that’s it. The advantage of black-box code generators is time: the process will get your application within a fraction of the time you normally need to create a similar application by hand.

White-box code generators are more flexible. Users of white-box code generators can control the produced source code. By optimizing the meta code, you can create the same source code as you would have done manually, but faster and more consistent. The downside of white-box code generators is that you have to build and maintain a meta code library that fully suites your software architectural needs. That will take some time and investments.

Non developers versus developers

Some code generators focus on business users, or non developers. These code generators enable you to create, and often deploy a program without having IT development skills. A user friendly drag-and-drop interface helps creating your entities, processes, screens and reports.

Code generators for developers can provide a wizard that assist you in creating your meta code. Some graphical editors might be present. But code generators for developers often offer a text based interface to maintain your meta code.

Code generator quadrant

If we combine the black-box versus white-box x-axis with that of non developers versus developers y-axis we get a code generator quadrant. Let’s focus on each quadrant:

vergelijk codegeneratoren

I – The simple applications, instant result quadrant (black-box for non developers)

In the black-box non developers quadrant you will find some popular code generators like Mendix, Outsystems, Betty Blocks and Camunda. There are many more, but our selection will give you a good idea of the quadrant. As they are black-box code generators you will get your application fast. A drawback is you cannot control the generated source code. Maybe that isn’t your problem as code generators like these are not likely to be used for business critical IT applications. Black-box non developers code generators are also known as low-code development platforms.

II – The quick start quadrant (black-box for developers)

Tools like JHipster, JBoss Forge and Spring Roo can be found in the black-box developers quadrant. Great tools if you want to make a quick start with an application. You add your meta code to the tool and your source code will be generated according to the architectural decisions made by the tool provider. Code generators in the black box developers quadrant are great for initial project set-up. After project set-up you alter the source code manually.

III – The complex applications quadrant (white-box for developers)

You will have to invest in tools in the white-box developers quadrant. Tools like Rascal, Eclipse Modeling Project and our MetaFactory give software engineers the possibilities to generate code as if it were written manually. You will have to adjust the meta code to let the code generator do exactly what you want it to do. After building a library of meta code in your organisation, the consistency of your software will increase. The productivity during software development and maintenance will improve dramatically.

These tools are valuable for both simple as well as business critical applications.

IV – The holy grail quadrant (white-box for non developers)

Wouldn’t it be great to develop business critical applications that fully apply to the coding standards within your organisation without any IT development knowledge? We haven’t seen any code generator that fits in this quadrant. The holy grail is not yet here.

Road map MetaFactory

In order to reduce the investment time and learning curve to create your own code instruction sets, MetaFactory is making available ready to use code instruction sets on GitHub. This enables developers to start using MetaFactory as a black box developers tool, found in the quick start quadrant. But MetaFactory is offering developers the tool and training to modify the code instruction sets to change them to their own architectural design principles.

Leave a comment