Writing documentation for software is no fun. But what do you do when you have to document some code you've been working on, a network you're building, or a database you're designing? Get someone else to do it? Perhaps, but what if you have to do it? Easy. You draw impressive looking diagrams. After all, a picture is worth a thousand words, right?
Writing documentation for software is no fun. But what do you do when you have to document some code you’ve been working on, a network you’re building, or a database you’re designing? Get someone else to do it? Perhaps, but what if you have to do it? Easy. You draw impressive looking diagrams. After all, a picture is worth a thousand words, right?
Seriously, if you need to produce professional looking diagrams from time to time, Dia is the tool for the job. As the Dia web site (http://www.lysator.liu.se/~alla/dia/) explains:
Dia is designed to be much like the commercial Windows program Visio: it can be used to draw many different kinds of diagrams. Dia currently has special objects to draw entity relationship diagrams, UML diagrams, flowcharts, network diagrams, and simple circuits.
So, think of it as an open source version of the popular Visio.
Like the Gimp, Dia is part of the GNOME project. In fact, Dia feels a lot like the Gimp in day to day use. It sports a main window that floats independently of the workspace you’re working in, as show in Figure One. A right click within the workspace pops up a menu that allows you to manipulate the file you’re working on.
|Figure One: Dia’s main window|
Unlike some of the tools we’ve covered here, Dia is not terribly new. Alexander Larsson created Dia over four years ago, and has since been helped by a couple dozen volunteer developers.
Part of what makes a tool like Dia so powerful is that it comes with more than just the basics. In Dia, that’s the library of drawing symbols. Dia calls the various symbols objects — other tools call them stencils — and they’re organized into various sheets, which are collections of related objects.
As noted earlier, Dia comes with sheets to help with diagramming a network, planning circuits, and building flowcharts. In fact, Dia now ships with over 25 sheets. Not only are computer- and network-related symbols included, but you’ll also find objects for civil engineering, jigsaw puzzles, and a good collection of generic shapes, too.
Another interesting aspect of Dia is its choice of file format. It uses a simplified form of gzip-compressed Scalable Vector Graphics (SVG) rather than inventing yet another cryptic binary file format. When it come to exporting a diagram for use with other tools, Dia supports a ton of useful formats, including EPS, PNG, and even TeX.
Taking another cue from the Gimp, recent versions of Dia can be scripted and extended via Python plug-ins. There doesn’t seem to be many people taking advantage of this feature yet, but it’s new and doesn’t appear to have been well-publicized. If you’re into Python and want to create nice looking diagrams using code, give it a try. The API looks to be quite functional for basic work.
Finally, it’s worth noting that Dia has been ported to Windows, too. So if you find yourself stuck on Windows, you may not need to buy a copy of Visio after all.
Do you have an idea for a project we should feature? Drop a note to email@example.com and let us know.