Tuesday, November 11, 2014

Java and JavaScript Support for Microsoft Visio

I often create unified modeling language (UML) diagrams to design and document computer programs and systems and to communicate with my students and clients. Because I use the UML diagrams to document and not just design, I want to be able to make changes to my diagrams and print them for many years after I first create them. On many occasions, I have spent substantial time creating a diagram using open source or other UML diagramming tools only to find that I cannot change or print the diagram one year later because the latest version of the diagramming tool that I used is not backwards compatible. This has caused me substantial rework and frustration.

Microsoft Visio is a powerful diagramming tool that includes support for UML 2.0 diagrams. It is a stable tool that is backwards compatible with previous versions and consistently produces professional looking diagrams. Quite simply, Visio works version after version, which is not true of many other UML diagramming tools. Unfortunately, Visio does not include support for Java or JavaScript. It does not include the native Java and JavaScript data types or any of their API classes and will not reverse engineer Java or JavaScript source code to create UML class or sequence diagrams. Also, Visio will not produce Java or JavaScript classes from UML class diagrams. In spite of it not being able to read or write Java and JavaScript code, I have adopted it exclusively for all of my UML diagrams because Visio always works.

Since I often write programs in Java and JavaScript, I have created two Visio files, JavaAPI.vsd and JavaScriptAPI.vsd, that contain Java and JavaScript primitive types and many of their API classes. Both files are far from complete, but they have saved me much work when creating new UML diagrams. If I need to design or document a small program, then I simply add the diagram to one of these files. If I need to design a large system and create many diagrams, then I make a copy of the file and create the diagrams in the copied file.

The Java API file contains many classes from the following Java packages

  • java.awt
  • java.awt.event
  • java.awt.image
  • java.io
  • java.lang
  • java.math
  • java.net
  • java.security
  • java.security.spec
  • java.sql
  • java.util
  • java.util.zip
  • javax.crypto
  • javax.crypto.interfaces
  • javax.crypto.spec
  • javax.swing

The JavaScript API file contains the following classes

  • Array
  • Boolean
  • Date
  • Math
  • Number
  • RegExp
  • String

1 comment:

  1. It is very nice. Thanks! Thanks for you. This is a great work for software modeling tool.

    ReplyDelete