11# XUMLIDOT
22
3- A Ruby UML XMI and DOT generator
3+ A Ruby UML XMI and DOT diagram generator
44
5- ## VERSION 0.1.0
5+ ## VERSION 0.2.0 - Whats new?
66
7- - xmi and dot output works quite nicely (see examples folder), however there are still a few buggy cases.
8- - works with any ruby project (will break on broken code though)
9- - works with rails but doesn't add the model attributes (yet)
10- - can parse rails itself so * should* work on your project - please let me know if it doesn't.
11- - pretty comprehensive output but missing delegation (TODO), dynamic methods, etc. etc.
7+ - Works with Ruby 3! Many thanks @leoarnold
8+ - Problem with internal classes fixed, see #42 , Many thanks @sinecode
9+ - Fixes for the command line --exclude options. Many thanks @ned-pcs
10+
11+ ## WHAT DOES IT DO SO FAR?
12+
13+ - XMI and DOT output works quite nicely (see examples folder), however there
14+ are still a few buggy cases.
15+
16+ - XMI should be importable into tools such as Visual Paradigm.
17+
18+ - Works with any ruby project (will break on broken code though) since it isn't
19+ dependent on the code being set up to run. Download a repo, generate a
20+ diagram.
21+
22+ - Works with rails projects but doesn't add the model attributes (yet). Look at railroady if you need this.
23+
24+ - Can parse rails itself so * should* work on your project - please let me know if it doesn't.
25+
26+ - Pretty comprehensive output but missing delegation (TODO), dynamic methods, etc. etc.
27+
28+ ## WARNING
29+ xumlidot will quite happily trundle away and create some simply massive xmi or
30+ dot files. When these are converted to an image, these will often get scaled
31+ down by graphviz and even if they don't, some image viewers stuggle with large
32+ svg/png images. Visual Paradigm can absolutely choke. Consider the
33+ ` --no-inheritance ` and ` --no-composition ` options to reduce the
34+ complexity/size, or just focusing in on specific directories to create smaller
35+ diagrams.
1236
1337## WHY?
1438
15- This is a tool I made for myself (hence the 3 years gap between releases). I'm
16- a fan of Model Driven Engineering and whilst there are * great* tools like
39+ This is a tool I made for myself (hence the long gaps between releases). I'm a
40+ fan of Model Driven Engineering and whilst there are * great* tools like
1741Railroady and Xamin out there, the focus on Rails makes them less useful than I
1842personally would like since Ruby != Rails. Also Railroady has never had a
19- working xmi option meaning that we can't import the output into tools such as
43+ working XMI option meaning that we can't import the output into tools such as
2044Visual Paradigm - one of my primary use cases (although being able to output
21- wall spanning class diagrams is * cool* ).
45+ wall spanning class diagrams is very * cool* ).
2246
2347In addition, one of the major problems (IMO) with the approach taken by other
24- tools is that they ` require ` files hence you need a project with all the
48+ tools is that they ` require ` files, hence you need a project with all the
2549dependencies set up and working; fine most of the time but I've come across
2650more than one project so environment dependent that even the specs would not
27- run without vagrant or docker. I want a tool where I can ** quickly** get a
28- high level view of the code from an Object Oriented perspective.
51+ run without spooling up vagrant or if you're lucky docker.
2952
30- Hence xumlidot ...
53+ I wanted a tool where I can ** quickly** get a high level view of the code from an
54+ Object Oriented perspective. Hence xumlidot ...
3155
3256## INSTALLATION
3357
@@ -42,11 +66,11 @@ to a projects Gemfile and `bundle exec` it, but I've not had cause to.
4266
4367 xumlidot OPTIONS dir_a dir_b dir_c ...
4468
45- xumlidot basically expects multiple directories from which it will create the
46- dot/xmi output. You can of course just point at an entire project but I've found
47- it useful to exclude tests/specs, and in a rails project, you don't _ really _ want
48- the migrations so I tend to use something like ` xumlidot --xmi app lib ` for a
49- more focused model.
69+ xumlidot basically expects a list of directories from which it will create the
70+ DOT or XMI output. You can of course just point it at the root of a project but
71+ I've found it useful to exclude tests/specs, and in a rails project, you don't
72+ _ really _ want the migrations, so I tend to use something like `xumlidot --xmi
73+ app lib` for a more focused model.
5074
5175## USE CASES
5276
@@ -106,12 +130,24 @@ all the method_names, and set the layout to orthagonal, then exported to png.
106130
107131The raw output is just text sent to stdout so Graphviz dot/VisualParadigm are needed for the pretty stuff.
108132
133+ On Ubuntu I tend to do something like:
134+
135+ ```
136+ xumlidot app lib | dot -Tsvg -o diagram.svg && xdg-open diagram.svg
137+ ```
138+
139+ Which creates a quick diagram to see the structure of a project.
140+
109141### Graphviz
110142Have a look at examples_output/README.md for a couple of examples using dot. dot is beyond the
111143scope of documenting here do please look at https://graphviz.org/ for further info.
112144
113145#### Visual Paradigm
114- I'm still playing with VP and hope to add some tips of how to obtain the best results at somepoint.
146+ I'm still playing with VP and hope to add some tips of how to obtain the best
147+ results at somepoint. Tweaking the box size so as to fit all the method_names,
148+ and setting the layout to your preference orthagonal seems to be all that is
149+ needed for a reasonable diagram; be warned however, things can be slow and there
150+ may be VP settings you need to tweak for large projects.
115151
116152## DEPENDENCIES
117153
@@ -146,3 +182,5 @@ me parsing ruby superfast.
146182using to just get an idea of the XMI structure.
147183
148184- Thanks to MyMedsAndMe for the 10% time to work on this project.
185+
186+ - Thanks to everyone who has submitted a PR or an issue. Sorry, I'm so slow to respond but it is greatly appreaciated!
0 commit comments