Contribute to the PHP Custom Generator Project!

php - uml to php

We’re reaching out to the user community for help in creating custom code generators for GenMyModel. The first project is for PHP. Read on to find out more.

The Idea

We recently introduced a new feature that allows you to upload your own custom code generator to GenMyModel so that you can generate code from your UML models that best meets your needs.

We’re launching this new project for PHP enthusiasts to develop an awesome code generator that can translate UML models into PHP.

Our idea is to create a real design and code generation platform on the web that can serve as a tool for the entire developer community. We took a large step towards this with GenMyModel that allows you to design UML models online and the addition of branched code generators.

The goal is to create a base of open source code generators that are well suited to the user community. We hope this will help to simplify your projects.

How the Code Generators Work

1. Design UML class diagram in GenMyModel

class diagram - uml to php

2. Customize your code generator hosted on Github and written in Acceleo

template - uml to php
Part of the template

3. The code is generated matching your template

php code - uml to php

The Project

Team members Vince and Ali have developed a basic PHP 5.4 generator for UML class diagrams available on Github that can generate code from classes, attributes, generalizations, and packages and generates a main.php.

We are giving this to the community as a starting point for a custom PHP generator.

You can build off of it and add operations, interfaces, abstraction, associations, and/or data types.

You can also start a completely new generator if you’d like.

You may find our quick start guide helpful when beginning or editing a custom code generator.

Want to contribute?

If you create a code generator for UML to PHP or build off of the one Vince and Ali started and would like to make it available to the user community, please contact us. We’d be happy to share it with others.

Other languages?

Interested in working on code generators for other languages? We will soon be creating similar projects for other programming languages (like C# and C++).

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedIn

About the author

Shannon Team

Shannon - GenMyModel Community Manager