Author Topic: UML book recommendations?  (Read 6433 times)

wharley

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
UML book recommendations?
« on: January 10, 2007, 01:56:58 pm »
I am an experienced Java developer.  I have purchased a copy of EA and am trying to use UML to document my designs, primarily to help me think through the problems but also as a way of creating documentation for others.  I am a complete UML newbie.

Can anyone recommend UML books that will fit reasonably closely with what is implemented in and supported by EA?

Thanks!

thomaskilian

  • Guest
Re: UML book recommendations?
« Reply #1 on: January 10, 2007, 02:42:24 pm »
Search the forum for "UML books"

wharley

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: UML book recommendations?
« Reply #2 on: January 10, 2007, 02:57:23 pm »
Quote
Search the forum for "UML books"


Thanks, Thomas.  Doing so, I see many unrelated posts but very few recommendations, and none that seem specific to the situation I described.

Let me paraphrase my request:

Can anyone recommend books on UML that (a) are relevant to the design of Java-based software and (b) describe a version of UML that corresponds to what is implemented in EA (so that the terminology isn't too different or there aren't too many discrepancies in the way things should be drawn)?

thomaskilian

  • Guest
Re: UML book recommendations?
« Reply #3 on: January 11, 2007, 01:03:58 am »
Hi wharley,
UML is not specific to any coding language. It is a language of its own. The "pure" superstructures from OMG are nothing to digest after breakfast. Start with something like "UML distilled" or "for dummies" (can't remember the exact names, but they were mentioned here). EA implements the latest version 2 of UML so the books should talk about UML 2.0 and not UML 1.2 (2.0 has a lot of extensions; "basically" you could start with 1.2). When you're done with basics, read Sparxs whitepapers on their support page to get familiar with EA specific tool capabilities (especially Java code engineering).

You are always welcome with questions here on the board.

wharley

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: UML book recommendations?
« Reply #4 on: January 11, 2007, 10:30:11 am »
I just went and looked through the whitepapers, but I didn't see any that seemed to talk about the mapping from UML to Java or about Java code engineering.  Can you point me to which one you're thinking of?  Maybe I'm looking in the wrong place?

Respectfully, I don't have the time or business justification to learn all of UML, or of design methodologies based on it.  UML is a broad, general, and powerful tool.  But I have a very specific problem: I need to visualize and communicate the code design of a system (specifically, a portion of a compiler) written in Java 5.  

So, I need to cut out the 95% that is valuable for other people's problems, and identify and learn to properly use the 5% that is relevant to mine.  If I don't do so, then I will waste a lot of time and I will end up misusing the existing concepts.  For example, it's still not clear to me how to show that class A contains a field that is a List of class B; there are several possibilities, and I'd like to read a discussion of which one to use and see a picture that illustrates it.

That's why I'm asking for recommendations of books (or whitepapers) explaining how to use UML in the context of Java.  

Can anyone recommend specific books or whitepapers that they found helpful in mapping Java constructs to UML?  Please, pretty please?

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6354
  • Karma: +54/-5
    • View Profile
Re: UML book recommendations?
« Reply #5 on: January 11, 2007, 01:00:45 pm »
I don't have a book or whitepaper to recommend, but if what you're interested in is the mapping between Java and UML (and you're planning to use EA) the simplest place to start is by looking at the documented conventions EA uses for Java code engineering.  (See http://www.sparxsystems.com.au/EAUserGuide/index.html?java_conventions.htm)  Another thing you will almost certainly want to know is how EA handles collection classes.  (See http://www.sparxsystems.com/EAUserGuide/index.html?settingcollectionclasses.htm)

From there, create a class diagram and have a play.  Generate some code, reverse engineer some code, see what happens.  EA doesn't give you any behavioural diagrams from Java code, but you can set it up to generate a sequence diagram by debugging through a scenario.

Possibly the most useful thing you can do is to define transformation to generate multiple artifacts out of a single, easier to maintain model.
Simon

support@sparxsystems.com

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2498
  • Karma: +32/-2
    • View Profile
Re: UML book recommendations?
« Reply #6 on: January 11, 2007, 01:46:18 pm »
I don't usually recommend a first UML book (there's too many to choose from and the choice will be personal), but the second UML book you should buy is "The Elements of UML 2.0 Style" by Scott Ambler. It has loads of common sense advice on what you should and shouldn't do on UML diagrams, from "1. Avoid Crossing Lines" upwards. (Edit: and it fits in the pocket too!) Ambler also has a website with loads of good material - you might want to Google for it.
« Last Edit: January 11, 2007, 01:47:24 pm by KP »
The Sparx Team
support@sparxsystems.com

thomaskilian

  • Guest
Re: UML book recommendations?
« Reply #7 on: January 11, 2007, 11:08:16 pm »
Quote
...  I am a complete UML newbie.
...

But you just want to learn the 5% that are reasonable for your Java stuff.

You're kidding ???

wharley

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: UML book recommendations?
« Reply #8 on: January 12, 2007, 09:48:56 am »
No, I'm not kidding.  In fact, I think it's unreasonable to expect someone to learn the majority of a powerful and complex system before they can make use of any small part of it.  

Taking Java as an example, for instance, it is not necessary to learn how gc is implemented or to memorize the entirety of the library classes, in order to begin writing code.  For many people it is more practical and effective to simply see some worked examples of the sort of thing they're trying to do.

Are there any good real-world examples of UML on the web?  It's easy to find megabytes of open-source Java code but I've never seen a single example of someone actually using UML to design or document their code.  

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: UML book recommendations?
« Reply #9 on: January 12, 2007, 09:54:06 am »
I'm going to second KP on Scott Ambler's book.

While you may end up adopting other stylistic approaches, or even different views on the basics, there's a lot of common sense advice in the book. It will clearly get you going.

Another thing. Not only will it fit in your pocket, but you won't have to empty your pocket of cash to get the book. It is refreshingly inexpensive for a technology book.

As to the Java, my advice is to first get a grip on UML, then attack the language translation.

David
No, you can't have it!

wharley

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: UML book recommendations?
« Reply #10 on: January 12, 2007, 11:21:59 am »
Thanks, I'll definitely pick up Ambler's book.

Has anyone here got any comments on:
"UML for Java Programmers", by Robert Martin;
"Developing Applications with Java and UML," by Paul Reed;
"Java Modeling in Color with UML," by Peter Coad et al.;
"Applying UML and Patterns," by Craig Larman; or
"Java Design: Objects, UML and Process" by Kirk Knoernschild?

thomaskilian

  • Guest
Re: UML book recommendations?
« Reply #11 on: January 12, 2007, 11:25:25 am »
Larman's book has been mention positively here on the board quite some times. The rest I don't know.

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: UML book recommendations?
« Reply #12 on: January 16, 2007, 10:38:35 pm »
Quote
No, I'm not kidding.  In fact, I think it's unreasonable to expect someone to learn the majority of a powerful and complex system before they can make use of any small part of it.  

Taking Java as an example, for instance, it is not necessary to learn how gc is implemented or to memorize the entirety of the library classes, in order to begin writing code.  For many people it is more practical and effective to simply see some worked examples of the sort of thing they're trying to do...

As a small, and perhaps imperfect, analogy to try and understand what you're asking for:  "You have just purchased an automobile and you want the quick start manual describing how to drive to the local movie theater, without complicating the issue with how to drive to a distant clothing store."  The requisite driving skills to get to the theater are the same as those needed to get to the clothing store; you just apply them for an extended period.

Both Java and the UML are capable of expressing great and complex things.  If you restrict the scope of the UML you wish to learn, you must also restrict the scope of the Java you wish to document.

I don't think a publisher, wishing to maximize profits, would allow an author to write book, such as the one you seek, with arbitrary content restrictions on either language; I'm just happy that they don't spend a lot of time on the history of the languages.  The manual on changing a flat tire should not dwell on the history of rubber.  ;)

I think that if you select any good UML book (4 stars or better at Amazon.com)  containing chapters on Use Case, Class, Activity, and State Machine diagrams and restrict your reading to the first 5 to 10 pages of each of those chapters, you'll come close to what you want, but at a price of reduced quality (i.e.; imperfect communication) in the UML model.  The English language, stripped of its adjectives and adverbs, is not as expressive as the full language; so to is the UML.  But, as you say, one must start somewhere...
Verbal Use Cases aren't worth the paper they are written upon.

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: UML book recommendations?
« Reply #13 on: January 17, 2007, 02:03:09 am »
Two more 'crash course' books I have bought and which get you talking the talk (if not walking ....). Preferred the first one at the time.

UML Weekend Crash Course
http://www.amazon.com/Weekend-Crash-Course-Thomas-Pender/dp/0764549103

Teach Yourself UML in 24 Hours
http://www.amazon.com/Teach-Yourself-Hours-Complete-Starter/dp/067232640X/

wharley

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: UML book recommendations?
« Reply #14 on: January 17, 2007, 09:13:38 am »
Quote
I think that if you select any good UML book (4 stars or better at Amazon.com)  containing chapters on Use Case, Class, Activity, and State Machine diagrams and restrict your reading to the first 5 to 10 pages of each of those chapters, you'll come close to what you want, but at a price of reduced quality (i.e.; imperfect communication) in the UML model.


I've done essentially that over the years (this isn't the first time I've tried to get UML to be useful to me... I describe myself as a newbie because I have minimal practical experience with using UML, not because I've just discovered it).  What I've found is that many of the books seem to strive to be language-neutral, and as a result describe concepts in ways that are abstract and hand-wavey, ways that don't give me practical guidance.  

For instance, I imagine the distinction between aggregation and association is idiomatically used differently when people are talking about C++ versus Java (because of the different memory management issues), but I don't know what the popular idioms are for Java.  I don't want to invent my own idiosyncratic solution to that, I want to use something someone else will recognize.  For that, I need a book that gets specific about how to apply UML to the constructs of a specific language.

Another example is the distinction between "generalizes" and "realizes".  There is an obvious mapping to "extends" and "implements" in Java; but, I don't know whether that mapping is used, in practice, or whether people prefer to stick with "generalizes" for both forms of inheritance.  This is again a question of idiom, a question of how UML is used in practice.  (Again it's different for C++, where there is no syntactic distinction between inheritance and extension.)

To echo the car-driving analogy: the pure-UML books discuss how to use motor-powered vehicles to navigate surfaces.  This encompasses funny-car racing, lunar exploration, and operation of commercial tractor-trailers, as well as driving passenger cars in a city.  I need a book (or other source of practical examples) that discusses the etiquette of how folks drive to the grocery store, so I don't inappropriately use my stunt-driving skills.  I *want* my possibilities to be restricted.