Diagrams

Why Diagrams? Diagrams

 

The UML - Unified Modelling Language - Diagrams are the most standarts and intuitives ways to describe the operation of a project. The Sequence Diagram, for example, it is one excellent way to understand a code execution. The Class Diagram, another way, it is a better one to show what classes are related, their attributes and depencency.

The BPMN - despide not be a UML Diagram, but much like the UML Activity Diagrams it become the enterprise standart one of modeling process. The Database Modeling using the Entity-Relationship Model

All this diagrams, used it in the pre-project phase are very common to describe the excepted behavior from some software. From the sequence diagram it is possible to developer test diagram, as check if all the features used on it was as described into the planning phase as the use cases, for example.

Diagramas Weaknesses Diagrams

 

When the diagram it is used to describe the features into the code level, as the interaction of objects, using methods, it is possible to plan how the classes will be. But, as the code development evolves, been caused by the analysis fail or by requirement change, the diagrams will losing the link with the reality losing consequently the descriptive function to one analysis history function.

Also, to require the existence of one diagram to each test methods of some project will bring a huge spent of time, into it's creation as is in the maintenance. This is because each change of some method name or attribute name will require a change into all diagrams what involve it.

Tools Weaknesses Diagrams

 

When the Diagram it is created in the planing moment. It should be possible to created it without the code need. Many tools are able to create sequence diagrams but big part of them are not able to keep on sync all the diagrams created to the team members, most of then are monoplataform, not colaborative, without history of changes, close format file, etc.

In addition all design changes must be replicated in all the diagrams of the project and for all team members. Therefore, keep all update subtopic diagrams will become an increasingly expensive activity until it becomes unfeasible. The diagrams then become mere representations of how the project was originally designed without contemplating the continuous modifications and losing a lot of utility to enable the understanding of the current version of the project without the need to consult the source code.

Code to Diagram Proposal

Introduction Code to Diagram Proposal

 

This application proposal it is to provide ways to create diagrams based on PHP code execution or by web tools or based on XML files / API making possible convert the result from each one tool to another.

So, external tools can create the XML Files what can be converted into diagrams and edited. The diagram can be created by some API call. PHP Code executions can create XML files of diagrams what can be export to anothers applications. Diagrams can be created into the web application exported to XML file what can be be read by some external application what can create code, for example.

In addition all design changes will be automatically replicated in all the diagrams of some project and for all team members. Moreover, each change will be keeped into history, what can provide informations of who, when and why some change had to be done.

When the implementation provided in the diagrams, become a reality, a new diagram can be formed from the execution of that code. This new diagram will remain faithful to the reality of running the code, contemplating your changes.

Code Instrumentation Code to Diagram Proposal

 

Just appending one line into your PHP bootstrap file(s) the execution will be sniffer by the Code to Diagram - Code Instrumentation Application what will log each method call and return, each function call and return and convert this log into a XML what can be see as a Sequence Diagram or Class Diagram using ours web editors of diagrams.

Web Diagram Editor Code to Diagram Proposal

 

A web application to create and edit UML Diagrams what can read the XML files generated by the code instrumentation application and save the diagrams into others XML files. The diagram can be export as image. This web tool can be called by some external application what can send the diagram description into a XML form into the post data.

Code to Diagram Tool Kit

Code Instrumentation Tool Code to Diagram Tool Kit

 

This tool provides the creation of the XML of diagrams based on some code execution using code instrumentation or XDebug log analisys.

Sequence Diagram Web Editor Tool Code to Diagram Tool Kit

 
code to diagram sequence diagram thumbnail

This tool provides the creation and edition of sequence diagrams what can read and write the XMLs files generates by the code instrumentation tool.

Diagrams can be created based on data received by post from external applications. The diagrams can be created and changed into a drag drop application created in javascript / php what can exported the diagrams as images.

Future implementations will bring to this web tool the feature of history, web syncronization and enterprise application using the google wave and google applications.

Class Diagram Web Editor Tool Code to Diagram Tool Kit

 
code to diagram class diagram thumbnail

This tool provides the creation and edition of class diagrams what can read and write the XMLs files generates by the code instrumentation tool.

Diagrams can be created based on data received by post from external applications. The diagrams can be created and changed into a drag drop application created in javascript / php what can exported the diagrams as images.

Future implementations will bring to this web tool the feature of history, web syncronization and enterprise application using the google wave and google applications.

 

Limitations

Internet Explorer Output Limitations

 

While still not fully working on Internet Explorer because the Internet Explorer Problems, the generator already makes life easier for those responsible in maintaining this kind of diagrams. We welcome anyone with the patience and desire to make the CSS changes need for it to work on Internet Explorer but the diagram web tool is been rewrite into canvas tag can make the Internet Explorer compatibility more hard to do.

Under Development Limitations

 

Also, fully compliance with UML 2.0 is still under development. Anyone interested in working in these fields is more than welcome to join the team. And if you have a patch on add-on to send, feel free to do so. Just send an e-mail to me thiago.henrique.mata@gmail.com . And remember, this is free software, in development, and as such, I can give you no warranty. Use it at your own risk. It's not for the faint of heart. Tag names can and should change. New tags can be add anytime. Stay tunned for more news.

The web tools have been rewrited as canvas web tools that should bring some unstable versions and big changes into application code.

The speed of development is slow mainly due to lack of investment in project. Case you think this project interesting and would like to see new features on it pretty soon, you can make a donation.