Reputation: 2217
So recently at work I have been tasked with creating a Flowchart library. I would just like to get some general suggestions on how I should approach this. We use mongodb for persistence, and Tornado Web Server as a backend. Basically what I need is to create a library in javascript that has a means of importing JSON in order to display a flow chart. This flowchart will definitely not be trivial, and I will require the ability to model loops, conditions, etc. Basically everything that a standard UML activity diagram would be required to model. I plan on using Raphael to draw the vectors connecting each node on screen. I guess my biggest question is, how would I model loops and conditions in JSON? Are there pre-existing open-source libraries that do what I am suggesting to use as reference?
Upvotes: 0
Views: 1720
Reputation: 43243
Wouldn't it be easiest to just define different types of nodes in the flowchart, and then define which nodes each node is connected to?
Simply display each type as different looking node and connections would simply be drawn as lines between them.
Why do loops or conditions need to be any different from the rest? They too are just nodes which are connected to others.
Upvotes: 1