Is UML of any value in SW-Projects?

S

Student

A question to C++ developers:
Is UML of any value in SW-Projects, or is it more an academic toy?
 
Ö

Öö Tiib

A question to C++ developers:
Is UML of any value in SW-Projects, or is it more an academic toy?

Depends what you mean by UML.

UML as language for describing all SW design with a CASE tool does not
work too well in C++ projects. The tools both parse and generate C++
code rather weakly, so there one will face more pain than gain. The
situation may be better with other languages.

UML as diagram format works very well. Picture is often worth thousand
words. Most devs understand diagrams that use UML notation. UML
diagrams have good illustrative value in technical documentation.
 
C

Chris Gordon-Smith

Öö Tiib said:
Depends what you mean by UML.

UML as language for describing all SW design with a CASE tool does not
work too well in C++ projects. The tools both parse and generate C++
code rather weakly, so there one will face more pain than gain. The
situation may be better with other languages.

UML as diagram format works very well. Picture is often worth thousand
words. Most devs understand diagrams that use UML notation. UML
diagrams have good illustrative value in technical documentation.

Indeed. And its not only about illustrating. Its also about
understanding the structure of a software system and managing its
complexity by (for example) modularising and minimising the
dependencies between modules / classes.

One important thing to note is that when you include the header for
class B in the implementation file for class A, you make class A
dependent on class B. In UML terms, this means that including a class
header establishes a using relationship.

Other code constructs can be similarly mapped to UML constructs.

When documenting the structure of my project software a few months
ago, I decided to document each subsystem with one diagram for a data
and inheritance view and another for a dependency view.

My take on how to use UML on a C++ project is at
http://www.simsoup.info/SimSoup/Design/Modules.html

(I am no respecter of diagrammatic convention, I have modified to use
my preferred notation)

Chris Gordon-Smith
www.simsoup.info
 
J

James Kanze

Depends what you mean by UML.
UML as language for describing all SW design with a CASE tool does not
work too well in C++ projects. The tools both parse and generate C++
code rather weakly, so there one will face more pain than gain.

That's news to the numerous well run projects which do use UML
for round trip design in C++. At least Rational Rose (the one
I've used most) does a very good job in parsing and generating
C++ code. If the tool you used didn't, blame the tool, not the
concept itself.
 
Ö

Öö Tiib

That's news to the numerous well run projects which do use UML
for round trip design in C++.  At least Rational Rose (the one
I've used most) does a very good job in parsing and generating
C++ code.  If the tool you used didn't, blame the tool, not the
concept itself.

Interesting. To me Rational has always left impression of company that
makes most terrible tools available. Only thing i found attractive
about them was prominent price. About like Oracle in database world.
Unlike Oracles databases, Rational tools however were never worth that
price.

The problem with UML is (i suspect) conceptual. C++ has more concepts
and idioms supported than UML is capable to display. So no wonder that
a CASE tool can not convert them one to one.
 
J

James Kanze

Interesting. To me Rational has always left impression of company that
makes most terrible tools available.

Terrible in what way? And compared to what?

I've used a number of Rational tools, and generally been quite
satisfied: the only competitor to Rose I've used was Together,
and Rose seemed significantly better. (That may be simply
because I never learned Together as well. But at least on
a Sparc, Together was horribly slow, enough to make it painful
to use.) As for their other tools, Clearcase is by far the best
source code control system I've used, and until recently, Purify
was the standard for memory leak detection (but valgrind has
become very good as well now, and is easier to use).
Only thing i found attractive about them was prominent price.

We must have different ideas regarding what is "attractive" with
regards to price. IMHO, Rational's pricing and licensing
policies can only be considered disuasive.
About like Oracle in database world. Unlike Oracles
databases, Rational tools however were never worth that price.
The problem with UML is (i suspect) conceptual. C++ has more concepts
and idioms supported than UML is capable to display. So no wonder that
a CASE tool can not convert them one to one.

Which, for example, can't be supported by UML and Rose? As
I said, I've done complete projects where everything was managed
in Rose, without any real problems (and without the need to
escape to the source level for specific idioms).

Some things are better described in English than with UML
diagrams. And mixing English text and UML (and other types of
diagrams) is a weak point of all of the systems I've seen. But
for a lot of applications, the UML part is significantly more
important than the English text, and you can live with the
weakness of the editor used for annotations in Rose. (In the
worst case, you can type the text in vim, and copy/paste it into
the Rose annotation box. But at least the last time I used it,
Rose didn't support things like HTML formatting in its text
fields.)
 
D

Dombo

Op 07-Dec-10 10:29, James Kanze schreef:
That is (unfortunately) my experience as well.
Terrible in what way? And compared to what?

I can't say I have fond memories of Rational Rose. I has been about five
years since I used Rose, so things may have improved for the better, but
back then it was rather prone to crash. Stability issues aside it wasn't
exactly the most pleasant piece of software I have ever used. Some
dislike the comments that Rose puts in the generated code to link the
model with the code, but I can live with that.

Most other UML tools (MagicDraw, UML Studio and a couple of others) I
have used were more stable and in my opinion more user friendly, but
were pretty useless for round-trip engineering (at least in combination
with C++).
 
I

Ian Collins

Interesting. To me Rational has always left impression of company that
makes most terrible tools available. Only thing i found attractive
about them was prominent price. About like Oracle in database world.
Unlike Oracles databases, Rational tools however were never worth that
price.

The problem with UML is (i suspect) conceptual. C++ has more concepts
and idioms supported than UML is capable to display. So no wonder that
a CASE tool can not convert them one to one.

I agree. Another big problem with tools that attempt to perform round
tripping is the code does not lend its self to unit testing. With
executable UML, things might change but I have to play with it.

The extreme cost of Rose did do me a big favour in one job when I was
given the budget to buy a UML tool but I ended up spending it on build
servers and quality monitors for my team. A much more productive
investment!
 
A

Alf P. Steinbach /Usenet

* Ian Collins, on 08.12.2010 00:18:
The extreme cost of Rose did do me a big favour in one job when I was given the
budget to buy a UML tool but I ended up spending it on build servers and quality
monitors for my team. A much more productive investment!

:)


Cheers,

- Alf
 
Ö

Öö Tiib

Terrible in what way?  And compared to what?

Unstable, not easy to use, slow, hard to integrate with other tools.
Rose for example did crash even when parsing Java. I have seen nothing
else crashing when parsing Java.

[...]
 As for their other tools, Clearcase is by far the best
source code control system I've used, and until recently, Purify
was the standard for memory leak detection (but valgrind has
become very good as well now, and is easier to use).

ClearCase does not have atomic commits so preparing change-set for
review-board is not easy. One way is to create branch for each change-
set but merging branches was not easy either. Other (usual to
Rational) difficulties to integrate with other tools, like issue
trackers or continuous integration systems. It felt that you need full-
time ClearCase admin for each 10 devs using it. I like the modern free
agile repositories like Mercurial and Git lot better.
We must have different ideas regarding what is "attractive" with
regards to price.  IMHO, Rational's pricing and licensing
policies can only be considered disuasive.

High prices of goods are attractive when you need to ask for budget.
Which, for example, can't be supported by UML and Rose?  

Everything about templates it either crashed or it got it wrong.
As
I said, I've done complete projects where everything was managed
in Rose, without any real problems (and without the need to
escape to the source level for specific idioms).
Respect.

Some things are better described in English than with UML
diagrams.  And mixing English text and UML (and other types of
diagrams) is a weak point of all of the systems I've seen.  But
for a lot of applications, the UML part is significantly more
important than the English text, and you can live with the
weakness of the editor used for annotations in Rose.  (In the
worst case, you can type the text in vim, and copy/paste it into
the Rose annotation box.  But at least the last time I used it,
Rose didn't support things like HTML formatting in its text
fields.)

Yep, there was also such difficulties and inconvenience. You can do it
of course (like anything), but it feels like you are working more than
without the damn tool and results are not that beautiful. Seems that
others have had similar experiences.
 
I

Ian Collins

I've used a number of Rational tools, and generally been quite
satisfied: the only competitor to Rose I've used was Together,
and Rose seemed significantly better. (That may be simply
because I never learned Together as well. But at least on
a Sparc, Together was horribly slow, enough to make it painful
to use.) As for their other tools, Clearcase is by far the best
source code control system I've used, and until recently, Purify
was the standard for memory leak detection (but valgrind has
become very good as well now, and is easier to use).

Just spotted this, I'd vote for Clearcase not being a good source code
control system and I've used it a lot. It was the best in the 90s, but
its abilities have been surpassed by the likes of git and Mercurial.
I'd rather have an extra developer or two in my team that pay its
support costs (speaking as one who has had to sign off Rational support
renewals)!
 
J

James Kanze

Op 07-Dec-10 10:29, James Kanze schreef:
I can't say I have fond memories of Rational Rose. I has been about five
years since I used Rose, so things may have improved for the better, but
back then it was rather prone to crash.

On what platform? I was using it almost ten years ago, under
Solaris on a Sparc, and I never saw it crash.
Stability issues aside it wasn't
exactly the most pleasant piece of software I have ever used. Some
dislike the comments that Rose puts in the generated code to link the
model with the code, but I can live with that.

It's a question of how you configure your editor, I think. At
the time, I was using emacs, and configured it so that the Rose
generated comments were dark gray (on a dark green background),
and hardly visible. Before that, they were annoying (but still
tolerable).
Most other UML tools (MagicDraw, UML Studio and a couple of others) I
have used were more stable and in my opinion more user friendly, but
were pretty useless for round-trip engineering (at least in combination
with C++).

The only other tool I've actually used is Together, and
I haven't used it that much. On a Sparc under Solaris, it was
very un-user friendly, because of the horrible performance; the
performance was such that I can't judge other aspects.

If any of the others are free, I might give them a try. Round
trip is nice, but just maintaining your headers 100% in the tool
(no round-trip, because you regenerated the headers from scratch
each time) is a valid option as well.
 
J

James Kanze

Unstable, not easy to use, slow, hard to integrate with other tools.
Rose for example did crash even when parsing Java. I have seen nothing
else crashing when parsing Java.

I guess it depends on the platform. Working under Solaris, on
a Sparc, I never had any of these problems: I've never seen it
crash, either with Java or C++. (I wasn't using Java, but
a collegue was.) And it integrated as well, if not better, than
other tools, despite being 100% GUI. (GUI based tools often
don't integrate well.)
[...]
As for their other tools, Clearcase is by far the best
source code control system I've used, and until recently, Purify
was the standard for memory leak detection (but valgrind has
become very good as well now, and is easier to use).
ClearCase does not have atomic commits so preparing change-set for
review-board is not easy.

I've never found the lack of atomic commits to be a problem,
although abstractly, I can see that it might be.
One way is to create branch for each change-
set but merging branches was not easy either. Other (usual to
Rational) difficulties to integrate with other tools, like issue
trackers or continuous integration systems. It felt that you need full-
time ClearCase admin for each 10 devs using it. I like the modern free
agile repositories like Mercurial and Git lot better.

ClearCase does require some management. On the other hand, its
merge is definitely better than Subversion (which we're
currently using), and its basic model is superior for large
projects. (For small projects, it's overkill, and you'll end up
spending more time managing things that necessary.)
High prices of goods are attractive when you need to ask for budget.
:).
Everything about templates it either crashed or it got it wrong.

Again, I had no problems with templates almost ten years ago.
(And I find it difficult to attribute that difference to
different platforms.)
Yep, there was also such difficulties and inconvenience. You can do it
of course (like anything), but it feels like you are working more than
without the damn tool and results are not that beautiful. Seems that
others have had similar experiences.

It's a problem, but to date, I've not seen a tool where it
wasn't a problem. Rose is neither better nor worse here. (To
tell the truth, I'm not sure what such an integration would look
like. But what I've seen to date isn't it.)
 
J

James Kanze

On 12/ 7/10 10:29 PM, James Kanze wrote:
Just spotted this, I'd vote for Clearcase not being a good source code
control system and I've used it a lot. It was the best in the 90s, but
its abilities have been surpassed by the likes of git and Mercurial.
I'd rather have an extra developer or two in my team that pay its
support costs (speaking as one who has had to sign off Rational support
renewals)!

Interesting. I've not used either git or Mercurial, so I can't
comment. (I'm trying to remember the name of the one we used
where I was before, but it was definitely worse than Clearcase.
As is Subversion. All of my other experience goes back to the
90s or earlier, however, so it's quite possible that a lot has
evolved since then.)

As for the price... that is clearly a big negative point.
 
J

James Kanze

On 12/ 7/10 04:53 PM, Tiib wrote:

[...]

I'd be interesting to know what UML (at least as implemented by
Rose) doesn't support. I've used it successfully in C++
projects.
Another big problem with tools that attempt to perform round
tripping is the code does not lend its self to unit testing. With
executable UML, things might change but I have to play with it.

Where's the problem? C++ isn't executable either; converting
UML to C++ is just an additional step in the build procedure.
 
I

Ian Collins

On 12/ 7/10 04:53 PM, Tiib wrote:
[...]
The problem with UML is (i suspect) conceptual. C++ has more concepts
and idioms supported than UML is capable to display. So no wonder that
a CASE tool can not convert them one to one.

I'd be interesting to know what UML (at least as implemented by
Rose) doesn't support. I've used it successfully in C++
projects.
Another big problem with tools that attempt to perform round
tripping is the code does not lend its self to unit testing. With
executable UML, things might change but I have to play with it.

Where's the problem?

TDD.
 
D

Dombo

Op 08-Dec-10 11:58, James Kanze schreef:
On what platform? I was using it almost ten years ago, under
Solaris on a Sparc, and I never saw it crash.

It was on a Windows platform. But even though I'm not the biggest fan of
Microsoft I don't think Windows was to blame here. We had a strong
suspicion that the combination with RequisitePro (also a Rational
product) was the culprit.
It's a question of how you configure your editor, I think. At
the time, I was using emacs, and configured it so that the Rose
generated comments were dark gray (on a dark green background),
and hardly visible. Before that, they were annoying (but still
tolerable).


The only other tool I've actually used is Together, and
I haven't used it that much. On a Sparc under Solaris, it was
very un-user friendly, because of the horrible performance; the
performance was such that I can't judge other aspects.

If any of the others are free, I might give them a try. Round
trip is nice, but just maintaining your headers 100% in the tool
(no round-trip, because you regenerated the headers from scratch
each time) is a valid option as well.

None of the above tool are free, which in the professional context I
don't mind (ignoring the hassle with the purchasing department) as long
as the cost can be justified by productivity gains.

Free UML tools I know are ArgoUML, StarUML and Topcased. I only played
with those tools and never used them in real projects so I cannot really
pass a verdict on any of those tools. My first impressions were that
ArgoUML seemed to be too limited (lacking support for UML 2.0), StarUML
appeared to be a bit more useful but doesn't seem to be actively
developed anymore and Topcased appeared to be the most ambitious &
promising.

If your ambitions go beyond just a using diagramming tool to document
your design the qualities of the tool is itself is only one
consideration. Even with the best tools the success will depend largely
on how willing the whole development organization is to integrate those
tools in their development process and educate (convince) the people who
are supposed to use these tools. That requires time, money and a
long-term vision; things that are in short supply in many organizations.
 
J

James Kanze

Op 08-Dec-10 11:58, James Kanze schreef:
It was on a Windows platform. But even though I'm not the biggest fan of
Microsoft I don't think Windows was to blame here. We had a strong
suspicion that the combination with RequisitePro (also a Rational
product) was the culprit.

I'm not saying that Windows was the culprit, but Rational's
integration into Windows. Back before they joined forces,
I remember that Purify was very stable, but both ClearCase and
Rational had problems with stability. Over time, both seem to
have solved their problems, at least on Solaris. But it does
suggest that they do have problems with their process, which
could result in problems when porting to a different platform.
None of the above tool are free, which in the professional context I
don't mind (ignoring the hassle with the purchasing department) as long
as the cost can be justified by productivity gains.

Agreed. But I'd be giving it a try in a personal context, for
my own knowledge.
Free UML tools I know are ArgoUML, StarUML and Topcased. I only played
with those tools and never used them in real projects so I cannot really
pass a verdict on any of those tools. My first impressions were that
ArgoUML seemed to be too limited (lacking support for UML 2.0), StarUML
appeared to be a bit more useful but doesn't seem to be actively
developed anymore and Topcased appeared to be the most ambitious &
promising.
If your ambitions go beyond just a using diagramming tool to document
your design the qualities of the tool is itself is only one
consideration. Even with the best tools the success will depend largely
on how willing the whole development organization is to integrate those
tools in their development process and educate (convince) the people who
are supposed to use these tools. That requires time, money and a
long-term vision; things that are in short supply in many organizations.

Don't I know it. I used to be a contractor, and have worked in
many different firms. Only two bought into using Rose. (Not by
chance, those two produced the best quality software I've been
involved in.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top