The service has now been discontinued but I’ve released the core source code under an OS license. Read the details here.
The UMLtoPHP tool automatically generates full-fledged PHP applications from UML class diagrams.
The generated application offers all basic CRUD (Create/Read/Update/Delete) functionalities to show and manipulate the application data (see the examples below). More specifically, this first version of the service generates a Doctrine (database abstraction layer used by most PHP frameworks) schema file that can be passed on to, for instance, the Symfony PHP framework to automatically generate all the CRUD code for the application.
The fully functional generated web application will contain (without writing a single line of PHP code!)
- Forms to create, update and delete objects
- Pages listing all existing objects. Lists are paginated and sortable
- Filters to search for objects satisfying certain conditions
- Form Validation checks (to guarantee that all mandatory attributes are filled, that the input text can be converted to the expected data type, that foreign keys are respected,…)
- Easy management of associated objects
- Batch deletion of selected objects
- Flash messages that give immediate feedback to the user
- Easy customization (e.g. changing the default CSS template)
CHECK THE SERVICE RUNNING IN THIS VIDEO (better in high resolution)
This tool is implemented as a service (SaaS). Simply upload the xmi file storing your UML class diagram, (optionally) indicate configuration parameters for the generation and, you will get as a result the file/s with all the scripts needed to immediatelly run your application!. The XMI model is removed after the generation, so you do not need to worry about the confidentiality of your designs
PHP CODE GENERATION IN TWO STEPS
Step 1: Provide input UML model
Select the input UML file and indicate the UML tool used to draw that UML model
Step 2: Configure the generation
Indicate the configuration options to be used during the generation process
and just like that, the resulting Doctrine YAML schema file is ready for download!!
Let’s see an example of a PHP application generated by this service. Given the following UML model (represented, FOR instance, by this ArgoUML 0.24 XMI file )
the service will generate this Doctrine YAML script (results may vary depending ON the configuration options chosen during the generation). Thanks TO the included comments, the script IS self-explanatory
This YAML file can then be passed on to the symfony php framework to generate the full CRUD application. This application includes all the expected functionalities (as ordering and filtering options, dropdown boxes FOR relationship fields, adequate UI controls depending on the field type,…). For instance, the next image shows a book list web page automatically generated from the Book entity description in the YAML schema.