Programatically generate graphical (ADAPT) models / diagrams of structured data [closed] - svg

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am searching for strategies or other starting points to generate diagrams from structured data stored in a database. To make a simplified example that would be very similar to my requirements:
Input: DDL SQL to create tables with attributes in a Database.
Desired output: ERD diagram of the tables with connections to each other as svg.
The type of diagram I want to build is ADAPT but since I'm sure there is no implementation that directly generates ADAPT diagrams I'd be happy with anything that can generate models like BPMN, EPK or something similar. A generator for ERD might be a start but since ADAPT is more complex than ERD it would require heavy customization.
I currently create a prototype using Drupal so something in that area would be nice but I am glad with any input where I can learn about solving the core problem: How to automatically create graphical models out of structured data (without data about or user interaction in terms of element placement, element size etc.)?
Sidenotes:
svg is no hard requirement (could be png etc) but seems the best option to me.
The application I am building records requirenments that then should become the models.
The solution needs to be integratable into a web application. (have some sort of api)
Activiti could be a base for the diagram drawing but I cannot find information about diagramm creation via API instead of the UI.
Graphviz might be a starting point but I haven't seen any work beyond ERD.
This is for a student project so the budget is limited.

There is a number of diagramming libraries available and each have their strengths and weaknesses. It strongly depends on your exact requirements. I suggest you evaluate some of the alternatives and see what suits you best.
What I think: In a commercial scenario, the yFiles suite of libraries for various platforms is probably an option. From what I can see the HTML/JavaScript based solution should satisfy your requirements quite well: It can easily be told to fetch the data from various input sources, automatically create the structure and most importantly calculate a layout for the diagram so that it can be viewed immediately without having to be arranged by hand. Also you can customize the library to a very high degree: you can make the items look like the ones in "ADAPT", customize user interactivity so that only valid model changes are allowed (if you need interactive editing), and of course do all of this programmatically using a flexible Javascript API.
There is a nice example of that capability here:
Interactive Graph Source
Full disclosure: I work for yWorks, however on Stackoverflow I do not represent my employer.

You can generate Graphviz' DOT language and then run Graphviz' DOT.exe program by command line, which inputs a DOT language file and outputs an .svg file. This approach is pretty simple since you don't need to use Graphviz by API, and instead, just generate text file from whatever your programming environment is.
Not sure if this help you at all; perhaps just the general idea may be useful.
Going further, though, I've done this in an open source project, with the salient differences from what you're specifically describing above being that my project takes tabular (self-describing, structured) data instead of SQL DDL as its user input. Output is information in the form of concepts and relationships that can be used in several ways (searched, manipulated, diagrammed), one of which is to generate an .svg output showing various colored and shaped entities interconnected by variously colored and labeled arrows. The .svg output is done by translating concepts and relationships into an appropriate DOT file and then running Graphviz by command line, and then launching Firefox on the .svg output. Lots of differences from what you need, still, layout is handled purely by Graphviz.

Related

How can I generate a UML diagram without a GUI

I'm trying to create a UML diagram from the command line without preexisting code.
Eventually I'll write code in C++/Java, but I need to create a diagram first.
I'm thinking of a header-like file, which could be read and could generate a diagram.
Of course, I could just create a header and generate it. However, I'm not supposed to write any code until I've submitted my diagram (I'd also just like to have an efficient way to do this for the future).
UML does not require application to draw. On the contrary one of the main usages of UML is to model the application that you're going to build to understand it better and make a better code as a result.
You also don't use application you create to draw UML diagram. You can use any application that supports UML modelling. Simple Google search or visit on Wikipedia will give you tons of options. You may even take a sheet of paper and a pencil. I've seen a course of UML, where participants did not use computers. They were supposed to learn UML, not tools that allow to draw it.
Finally (answering the question stated in the question topic), UML is in no way limited to model only graphical applications. Static structure and dynamic behaviour of the system exists regardless if user communicates with it through a GUI or command line.
Are you sure you understood the reason why you are supposed to make a UML diagram or do you disagree with that reason? What I can definitely suggest is to find a good book about IT business analysis using UML. This site is not to recommend specific books, but again Google will be your friend here.
As according to the comment the goal is to actually generate a UML class diagram from text let me add a second part of answer
First disclaimer. In general SO is not a place to ask for tools and that question is brushing it. Let me make my answer more generic though.
UML is in general graphical language so technically what you need is something that will parse text version of your "diagram" into a nice picture.
Most if not all tools keep UML in some textual format, be it XMI or some internal legacy solution. The problem with that is that the format is usually pretty complex.
There are some tools that are intended to "draw" diagram by typing text and that's probably something that would suit you best. In general I definitely prefer "normal" GUI but if you insist yuml.me has a nice and easy to understand textual layer based on which it generates really cool diagrams. You may expect you will find others as well, so as usually, ask uncle Google. As suggested by Thomas Kilian in a comment, PlantUML is another example as it can work without GUI and "is an open-source tool allowing users to create UML diagrams from a plain text language." (quote after Wikipedia)

FORTRAN graphic library on Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I started learning FORTRAN and need graphic library to plot output
As I'm not familiar with FORTRAN environment, I wanted to ask for recommendation
I'm used to matplotlib, and preferably looking for something similar. Similar in means of available features, and workflow concepts
Searching through Synaptic it seems like PGPLOT is the way to go
PS I know I could wrap FORTRAN code in Python in different ways
I've used PGPLOT, dislin and PLPLOT. In this era I'd use dislin or PLPLOT. PGPLOT was last updated in 2001 and only has a FORTRAN 77 interface, which can be used with Fortran 90/95/2003 but the compiler won't be able to check that your calls have the correct arguments. The other two have Fortran 95 interfaces. Of dislin and PLPLOT, I think dislin to be better documented. dislin also provides widgets for GUI input. dislin is free for some uses; for business uses one is supposed to purchase a license. PLPLOT is open source under the LGPL.
Yes, PGPLOT is an option.
You may also want to look into PLplot: http://plplot.sourceforge.net/
DISLIN - supports several platforms and languages (python included).
Have you considered using VisIt or similar software? VisIt can visualise very large datasets and has a mechanism for in-situ visualization with the libsim library. See this presentation for a nice introduction to in-situ visualization with VisIt: http://calcul.math.cnrs.fr/Documents/Ecoles/Data-2011/CouplageSimulationVisualization.pdf.
See here for the libsim api.
Finally, a few additional notes.
While you sate
I'm used to matplotlib, and preferably looking for something similar.
Similar in means of available features, and workflow concepts
using libsimwould be quite different, but it is very powerful.
and
Right now just general graphic package to plot intermediate data
products. If I do well then perhaps I'll look for package that handles
large data sets. But if I get there I'll probably know what to use
till then.
Rather than write a solution now and then change it to deal with large data sets, why not just write a scalable solution now?
Not familiar with FORTRAN plotting but in most languages a quick way to do easy-to-program static graphics is not to use a library at all but to find that language's equivalent of the C "system()" call, find a program that will do the plotting and write the equivalent of:
1. Write plot data to file.
2. Do system call running plot program with data file argument.
3. [Optional] Delete plot data file.
This gives your program the full functionality of the plot program with minimal programming. The plot data and plot program are likely to be in the disk cache so it's all in memory. It's also easily debugged.
People underestimate the system() call - it gives access to a vast array of functionality including scripting. Some would say it's not efficient or "pure" but the user won't care and it will often drastically reduce the amount of programming necessary. Don't reinvent the wheel.
You can use:
PLplot: http://plplot.sourceforge.net/
gtk-fortran. It is a GTK / Fortran binding which offers also an interface to PLplot: https://github.com/vmagnin/gtk-fortran/wiki

I don't like MDD but like UML - why should I use MDD if I think it is useless ? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am a java software developer/architect and I like UML.
Saying that I also hate the java generated code.
I don't see any value trying to generate the skeleton of my application:
creating empty classes is really easy and I don't need a tool to do that
also I cannot reuse the generated code because the way it is generated makes it impossible to reuse
The dilemma for me is that my requirements changed so quickly that I need to be able to implement the new demand immediately into an existing code.
My problem is that if I generate my code from my model and then manually develop inside the generated codebase, I cannot generate code again using a model because my modification would be erased.
Except I copy/paste the changes back and forth. That is an enormous effort for too few results. Therefore I do not use MDD but still use a lot UML.
Could UML be successful in a project without MDD code generation ?
I am asking this question because I have a new boss who wants to introduce full MDD process with IBM RSA and today I prefer to have live code and model synchronization or merge with Omondo.
Why change a running and proven system?
Why systematically generate code from a model while I can do it directly in the code and just merge it later with the model?
Why get crap database code generation which cannot even be deployed while I can add stereotype in order to get java annotation and use them with hibernate to generate my database?
One of the reason for boss's change is to get a better project documentation in HTML format. I highly doubt this and think he is looking for more control on delivery and does not know what else to invent!
Other argumentative reasons:
Use a product from a large and stable company.
Have a full model available which could be deployed in any other language.
(This is why for me MDD is stupid because it is impossible to deploy on any platform any server, any database just from a model. So why to waste my time?)
Please give me some arguments in order to come back at next meeting and crash this stupid new MDD fan who wants to reorganize the way we work today!
I think your post has the answer in it.
MDD has been plagued with 2 fundamental problems:
An input (modelling language) that is insufficiently expressive to capture the entire problem. Result: you need to complete the specification with another language (code).
The generators - i.e. the rules that convert models to code - are generally incomplete and/or not open for modification by the development team and/or generate poor quality code.
Put those two things together and you get the horrible mess you mention. Consequence: trying to splice together hand-written code with poor-quality generated code. Result: not pretty.
However. Please don't surmise from above that I'm anti-MDD. I'm not - in fact the opposite is true. BUT: the tooling and process need to address the two fundamental issues above.
I've come across /very/ few that do. I used RSA several years ago and it definitely wasn't one of them. (However it's had the intervening time to improve, so it may be there now).
A simple "temperature check" question is to ask whether the tool provides a full Action Language. If it doesn't, it'll fall foul of problem (1). If it fails that, chances are you're in for pain.
If all your boss really wants is good HTML documentation, then simply integrate UMLGraph or apiviz into your build.
So to answer your specific question:
Can UML be used successfully without MDD? Yes. Generally in two ways:
As an informal or semi-formal notation for whiteboard sketching while figuring out the problem and/or solution (what Martin Fowler calls UML as Sketch)
As auto-generated documentation from the code as part of the build process.
Where you'll end up burning unproductive time is creating formal UML diagrams (often with an expensive tool) that have no direct link to the code.
hth.
If you cannot control the generation, you are probably using the wrong tools.
What you generate - skeletons or framework specific code - is also depending on the tool. Use tools which allow you to create your own templates.
It is wrong to assume roundtrip engineering will ever work. You cannot transform less detailed model to more detailed code and then back without losing information. One way to solve this would be having same level of details in models as in code, which is not a great thing.
Better approach is to use one way generation from models combined with some good practices for combinening generated and manually written code.
You can use protected regions for manually written code:
you specify in template places - e.g. method bodies, which should be not overwritten when regenerating
Or the generation gap pattern:
you generate abstract classes and code using skeletons of concrete classes, which you complete manually).
There is still one other way to approach this - full code generation.
It might look similar to the bad practice of coding using models, but the point is to specialize for generating certain kind of applications - web apps, embedded apps. What you generate is then basically a framework specific code, which can be often expressed and maintained using models.
Don't forget, that modeling is not just about diagrams, you can use textual DSLs as well.
To your question - UML was not originally ment for MDD (many MDD practicioners don't use UML at all...), so you can use it for OO analysis and design as you like.
When it comes to your boss and RSA, try to find out what your boss really needs and wants, then try to provide him some better tools or practices.
As mentioned in the other answer, there are many tools for documentation.
With MDD, making changes to the design hopefully becomes cheaper: if the requirements change, in your approach you have to update the UML-based documentation, and the code. Now, if the code could be automatically generated, the changes to the code should follow automatically from the changes to the model, and you wouldn't have to do it manually (at least in those places where you don't add new stuff or need to change the business logic).
Assuming that MDD works (yeah, right ;), could you justify the double cost of maintaining the model (for documentation and design), and the code?
One argument in your favour could be that if the project isn't too big (whatever that means), that it's not worth having all the overhead.

Diagramming program to help in designing software? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm looking for a diagramming program that can help in designing software, right from the high-level requirements down to the low-level classes and functions.
I've seen a lot of UML programs, but they don't let you design at multiple levels of detail in the same map, like if you could "zoom in" and design the details of a part.
Do programs exist that help in such designing? Programs that let you design at the high-level and low-level on the same map?
Most of the UML products from large vendors will let you do what you want. "Rational Rose" and "Enterprise Architect" are just two examples that I have used. They both let you mix component, package and class level information in the same view. Both of them provide a way to specify requirements as part of the meta-data to a class and I believe, functions too.
Edit 8/23/09
I just found Topcased. It's free and does many of the same things as Rose & EA. I'm not sure about mixing different diagram types in one view, but you might want to give it a shot. I'm definitely going to investigate using it for my personal projects.
I recommend BOUML. It's a free UML modelling application, which:
has a great SVG export support, which is important, because viewing large graphs in vector format, which scales fast in e.g. Firefox, is very convenient (you can quickly switch between "birds eye" view and class detail view),
this can work as the "zoom" feature you're asking (I use such SVG exports my self, to be able to quickly overview relation of group of classes, and then zoom in into details of selected one),
is extremely fast (fastest UML tool ever created, check out benchmarks),
has rock solid C++, Java, PHP and others import support,
is multiplatform (Linux, Windows, other OSes),
is full featured, impressively intensively developed (look at development history, it's hard to believe that such fast progress is possible).
supports plugins, has modular architecture (this allows user contributions, looks like BOUML community is forming up)
The "zoom" feature you're asking can be obtained through SVG export. I use such exports my self in the way you're asking.
I've used Rational Rose and looks like it fits your needs.
You could try BOUML which, although it doesn't allow you to "zoom in", does cover all the aspects of UML, and allows you to view different parts of the design at once (in multiple windows). It is also free, which may or may not make it more desirable for you, and is quite cross platform.
First of all there are different diagrams for different things you want to express. During software design you dont only use UML, but also HTML sketches and things like that. So choose the right tool for the right task is my advice. Create a folder structure depending on your granularity, one for Frontend sketches (you can place it hiracially), one for class diagrams and so on. So try to establish a process that fullfils all your needs. Often the holy grail programm doenst exist or is not good, just because of the fact that it tries to satisfy to many customers.

Yet Another diagram / modeling software suggestion request [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm currently looking for diagramming software that allows me to quickly map stuff and jot down concepts such as a filesystem directories represented by nested boxes containing icons (representing files.)
Off course the simplest solution of all would be to just use paper and pencil, but unfortunately i have such poor motor skills that after minutes i cannot even distinguish the shapes I've drawn myself, never mind have these notes be of any use to someone else in order to have him/her work with them.
So far I've tried a ton of software packages but none of it seem to be simple/flexible/powerful enough to help fulfill the modeling /sketching tasks I'm trying to achieve
Visio,
smartdraw
Edraw
conceptdraw
Vue
yEd
Dia
Kivio
paint.net
photoshop
Illustrator
GIMP
in addition I've played around with modeling tools including staruml,argouml and Visual Paradigm as well as Eclipse modeling, but most of them were too complicated, too constricting and in some ways completely alien. On a side note, I absolutely HATE eclipse, I'm used to writing shellscripts with nano on a shell, The sheer amount of features (That i will never ever have any use for) make it hard for me to find that which I'm really looking for. YAGNI GDDMM*T!
Allthough UML modeling is at times important, such models are more for the next follow up phase and would be overkill (as well as a creativity killing burden) when I'm trying to come up with something from scratch.
Right now I'm looking for something new, I would be more than happy if someone could perhaps suggest something,
Most importantly i would like to find a program where the software allows me to do add new shapes and with the parent shape automatically growing so that that added shapes all fit inside of it rather than that i have to manually resize the parent shape
Your problem is a common one, and in recent years the big UML tool vendors have started adding functionality for sketching, as opposed to traditional modelling. My favourite, Enterprise Architect from Sparx Systems, has got "whiteboard" sketching and is also able to import from Visio.
It boils down to whether you know you'll just want to sketch, in which case you should get a tool which does that really really well (that last feature you mentioned is something I haven't seen in any UML tool). If on the other hand you know that you'll eventually want to turn the sketches into UML models, you need to consider whether you'll want to start over (which might be the easiest option, honestly) or have some sort of in-tool support to do that.
For "UML as a Sketch" I use the Hruby UML Stencil for Visio. These do not enforce eny semantics, so you can be as sketchy as you need to quickly record ideas and communicate.
See http://www.softwarestencils.com/uml/index.html
I use Dia. It is cross platform. Very simple tool.
However, My favorite has always been to sketch it on paper and scan (fotopragh it on my mobile) and keep it for records. Nothing beats pen and paper yet !
I tried yEd recently, because I happened to see it mentioned in another thread here. I'm quite impressed with it. Its pretty easy to use. I think the feature I liked the most is that I can draw my diagram regardless of the spacing and orientation. Then 1 button and poof, the whole things rearranges into the ordering I want.
As a linux diagramming tool, im pretty impressed with it.
this one is good for remote team members.
Nothing to install
http://www.dabbleboard.com/
I've used Visio for so long IMHO nothing beats it.
That said, I rarely use Visio in meetings to take initial notes. We'll diagram on whiteboards (get someone else to do the diagramming while you "facilitate") and then I take pictures of the result. Transcribing the photos to a Visio diagram helps me think it through.

Resources