Visual Paradigm for UML by lame user’s eyes

Edit 13.8.2014: This post applies to version VP10. Things may have been improved in further versions.

After my previous fast-scan through a few UML tools I decided to try Visual Paradigm for UML for the following reasons:

  • I knew Sparx Enterprise Architect a bit already and wanted to try something new (plus the lowest edition price was a bit lower),
  • outputs look really nice compared to free alternatives (just like Sparx does, and both produce way nicer diagrams than Rational),
  • I tried VP before (a few years actually), it impressed me then, and it impressed me the second time again.

I went for the Modeler Edition as I needed mostly just diagrams and nothing sophisticated behind. It all started with a bit of communication with the company about their one year support policy (simply put, without support you can get fixes, but no version upgrade, if I understand it correctly) and after that I bought one license with one-year support plan.

When I started to draw class diagrams I was satisfied with overall quality (as expected) but some features were surprisingly… well… indigested. It seemed to me like no user before me ever tried to work with gradient fills before. My creed is “nothing changes if nothing is said”, so I went on their support page and told them. There is no Jira-like open bug-tracking, but support is responsive and deals with your problems mostly in a matter of days – and I had a few more issues with my naive approach to diagrams, trust me. 😉 And all of them were solved to my satisfaction. Whow, really – for a company that has such an non-transparent issue tracking (for other users) I’d hardly expect score to be so great.

I was very happy about class, state machine and activity diagrams – though in case of activity I rather don’t like the UML notation. However I was less happy about object diagrams because it was rather complicated to get some attributes with specified values in it (far harder than adding an attribute in class diagram). Here you have to dive into dialogs and the VP magic is suddenly over. Also I didn’t like one thing about sequence diagram – I wanted to model interaction between an instance of a class – but I was not able to create life-line with just the type name (or turn off the name of the type, or something similar). (Edit 13.8.2014: You can hide classifier, which hides the class name.) In the end I rather created life-line with names I wanted (often the same as types) without actually using the existing type from the model. Maybe UML problem rather than VP’s – I don’t know – but I just didn’t want to have life-line boxes SO wide.

Apropos, so wide… all boxes have auto-size icon (bottom right corner), but when you write a long note, it wants to make it one line and extra wide. Also note text never goes under the curled corner rendering part of the box useless and always empty. And positioning of some elements is rather funny when you use grid – I had two associations between the same two classes and I wasn’t able to align cardinality number equally on both of them (to line or column, whatever the direction was). Alignment of these texts (association name, cardinality, …) somehow depends on the overall box size instead of text’s baseline. And it’s also not very easy to understand presentation settings and their defaults because some of them are checkboxes in contextual menu of the diagram (this menu is quite deep sometimes and after every change you have to open it again to switch another checkbox), but others are just actions. For instance turning off names of the association end (I display both association and attribute – and attribute is the name of the association role at the particular end) as a preferred behavior is done somewhere else (Tools/Options, but not diagram contextual menu).

And I also don’t like all the clutter in the Model explorer – this view is bloated by too many associations for instance – and you can’t tell which one is which, because it’s not so easy to find usages and show them right on the diagram (or maybe it is, but I remember doing this in Sparx EA much easier without checking the manual).

All in all, I’m happy using this software, but I didn’t realise one serious limitation. Modeler Edition is not limited only on features, but you can’t use it for commercial activity. Not even as a single person when you own it. And that is very serious limitation and suddenly makes the price too high. For just a few more bucks you can go for Enterprise Architect Desktop edition – I’m not aware of any such limitation there. And quality wise you probably don’t loose any bit.

Soon our company will evaluate where to go with our choice of UML tool – I hope for our sake we will leave Rational and use something that cares about actual usability – and Sparx EA is quite a hot candidate. Visual Paradigm seems to be very solid too, but there are less references around us, less actual users. I can use my license forever now (at least it’s perpetual) but only for some other (non-commercial) activity. Happens when you don’t read licenses properly. 🙂

Edit 19.4.2013: See comments, it seems that there is no non-commercial limitation for this edition anymore.

The worst way to explain dependency injection

I don’t know, but sometimes I feel like I’m talked to like a child. When I read a book about some technology I expect to learn how to use technology too. I remember reading one book about UML with such a nonsense example from real life that it debased the whole explanation and made it ridiculous. Add a few cases where picture said something and description something else and a few flaws that were clear even to new learner (yet still confusing) and you have one of those books I can’t recommend at all (I think it was some older edition of Teach Yourself UML in 24 Hours – and in Czech translation that probably added just more to it).

Now I’m reading (among too many other things) Spring in Action – and there is that first chapter with Knight and Quest and how you can send Knight for a Quest using dependency injection. But who would do that? Now I was thinking: “Is it possible to manage runtime relations with Spring? Can I control entity creation and inject something to them?” What a stupid questions these are when you know what Spring really is, right? But why they are using Knight and Quest? Who would ever create a system with a knight (or a few of them) and *configure* them and their quests with Spring? Obviously – nobody.

And just this evening I was checking presentations from one local Oracle conference and professional Java Developer Advocate was explaining CDI and ManagedBeans with one SpaceCapsule and a Cosmonaut who’s ManagedBean was named “yuri”. How real is such an example? It’s not! It’s misleading altogether and that’s what is likely shown to CDI/DI/IoC newbie nowadays! I just can’t understand why…

Of course, we all play some little games with our code here and there, but I’d expect from new technology introduction also the right way how to use it. What type of situations, when yes and not. I don’t want them to suggest (or just accidentally imply) that I can manage various cosmonauts in my system in CDI – because that’s just wrong. I can name roles for managed beans, what they should act like in this and that scope… but “yuri”? Come on. Stop it. Please.

Or do you, readers, think this is the good way? Maybe it is, I don’t know. Sometimes I’m just off the crowd, really – and not always the right time. 🙂 If you feel it some other way, drop me a line in comments.

Skimming the world of UML tools

This is just another “skimming” and it will not be objective nor in depth. I needed to draw a few UML pictures and I prefer having some model behind. I honestly believe that tools should be easy, intuitive and just working. I remember how I liked IntelliJ IDEA right from the start (not that it is flawless or without learning curve!).

What I want – some class diagram to model my entities (ER diagram will be done in Oracle SQL Developer Data Modeler, that is set in our team), some enums, state machines for enums (some of them are state values) and some sequence diagram here and there. Nothing big, nothing MDD.

In our company we use IBM Rational Software Modeler 7.5.4. I can’t say how it looks in newer versions, but this one is just killing me with it’s “hey! I’m built on Eclipse platform!” approach. I created model for instance, and I went for some design template that I felt is best for me. Alas, the template didn’t have state machine diagram. Can you add it somehow? I don’t know, there is no obvious way? Can you google how? I don’t know, it seems that IBM/Rational did the best job in anti-SEO. Their documentation is most difficult to find with search engines, and kinda… IBMish. I created new model without template and copied my old model into that one – what a fix. Even if there is way how to add diagram that is not in template (there always should be!) or how to convert model to another template – these functions are not easy to find. That’s like they are not there.

And the UI itself – it’s massive click-fest with minimum keyboard shortcuts (how I love IDEA, because it always tells you in pop-up menus what the shortcut is). Results are quite OK, if you know how to export them. Default export dialog is just another Eclipse-style hell, the same goes for import, you know one expects import where you just specify the file and it’s imported, but in Rational it’s always difficult – you have to know dozen of steps to do before the actual import. Eclipse based software traditionally has very poor consistency between contextual menus. You have File, Save As Image File… on right click in the diagram itself, but you don’t have it when you right click the diagram node in Project Explorer, nor you have it in main menu in any expected place. I honestly admire bravery of all those working with this tool.

I tried some other free: ArgoUML (limited UML 2 and undo support, plus I just didn’t like it), StarUML (not in development anymore… since 2005) and finally astah* community. Astah is probably my favourite choice from those freely available, though its community version has some serious limitations (enums are just ugly if you don’t use professional edition). But it’s much more intuitive than Rational, workflow is much better (well, there is hardly any “flow” in Rational, really) and I will probably use it in my future works.

Then there is one option for non-commercial usage (which means no option for me) – Visual Paradigm, or rather their VP for UML. Their suite (5.2) contains UML modeller (8.2) that is quite usable for drawing, but you’ll suffer quite aggressive watermark if you create more than one diagram per type. This actually means I’d not use it for non-commercial project either – unless I don’t need image outputs (which I mostly want to have). But the price for modeler edition is quite reasonable ($99) and in overall work with VP for UML was OK. By default their diagrams have rather simple visuals (no gradients so popular today), but they look clean on paper and – the most important – there are enough features that are easy to use (with keyboard shortcuts too :-)).

And finally, tool I like most of them – Enterprise Architect. Here I have to say that I worked with this tool. I never liked drawing diagrams (mostly because of the tools itself), but this one makes it quite easy. You have to get used to it’s dialog window workflow, but everything is accessible and resulting diagrams are just nice and clean. Desktop Edition starts at $135 and I think it’s well worth it.

One thing I particularly liked about EA is that it allowed me to bind associations to attributes, so you could see both lines (associations) and attributes in the class. I like attributes as a kind of checklist, without need to go around the box and search for associations – and I don’t care if it’s UMLish or not. EA allows this and I just love it.

One thing I couldn’t model as I’d wish to – I have enum and I want its literals to be states in state machine diagram. I don’t know how to do this in any of these tools. Right now I have to repeat myself and add states with the same names as literals in the enum.

After all this, my winners are astah* for being free and EA if one is willing to spend $135. I think for companies it’s definitely much better investment than Rational if you care for sanity of your staff.

I can’t tell how these tools work for more developers, how easy is to keep their project files in SVN, or how you like them after a year or two – or which one causes the most serious RSI. That’s why it’s called skimming after all. 🙂