1
votes

Our team develops on AngularJS, node.js and mySql\Oracle. As part of our application documentation our organisation wants us to capture our User Stories/Use Cases in Enterprise Architect and then have it generate sequence diagrams of interactions. At the moment this is a manual process and every time the application changes, the documentation has to manually change. This is time and resource intensive.

Are there any js tools or EA plugins that allow developers to comment their code as they write which can then generate as part of the build process some sort of .json/.xml/.xmi/.yaml file which effectively has an EA model in and can then be imported into Enterprise Architect ? This is in a similar way to tools like Swagger but instead of generating html it generates an EA model in a file. The goal I would imagine is to generate a list of user stories or use cases, with Actors, acceptance criteria, exceptions, test cases etc

1
what you are looking for in software design and analysis is called "reverse engineering". This link may help: sparxsystems.com.au/resources/demos/vea/… - quirimmo
@quirimmo thanks for the comment. "Reverse engineering" is certainly one approach but I'm looking for Code Driven Documentation - sarin
So as pointed out in the answer, in js you have js doc and then there are few tools with node in order to generate directly html of the doc. But in your question you ask how to have the sequence diagrams back from code changes. This is reverse engineering and this is impossible from code documentation. In the code documentation you comment the current method for example. Not relations between class/objects, what sequence diagrams actually show. - quirimmo
Try to take a look at that video they put code in the analyser and it seems that diagrams are updated analysing the code. Unfortunately I switched from EA to Visual Paradigm a lot of time ago so I am not so aware of EA - quirimmo
There's nothing like that in EA. You have to script that yourself. You should know that your question is OT the way you asked. Voted to close. - qwerty_so

1 Answers

2
votes

I must admit I don't know anything about EA but, as a more generic answer, I'd advice you to have a look at JSDoc. It allows you to build documentation based on comments:

/**
 * Represents a book.
 * @constructor
 * @param {string} title - The title of the book.
 * @param {string} author - The author of the book.
 */
function Book(title, author) {
}