This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes an advice about a book on UML and java needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "an advice about a book on UML and java needed" Watch "an advice about a book on UML and java needed" New topic
Author

an advice about a book on UML and java needed

Mahmoud Hadad
Ranch Hand

Joined: Jan 09, 2006
Posts: 67
i've been trying to learn UML from an O'Reily book called Learning UML anyway i have found the book is all about teaching the standard without putting concepts into a real use using a sepcified tool. anyway i want a name for a book that handles UML and java using a specified tool or any other good recomendation (i use netbeans as my IDE)
[ September 26, 2006: Message edited by: Mahmoud Hadad ]
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
UML is a diagrammatic way of expressing design models, and as such is mainly intended for communication between people, which should explain why most UML books don't dwell on tools much.

Can you give any more hints as to what sort of tool you want a book about? Are you interested in general drawing tools, UML-specific drawing tools, whiteboard-capture tools, printing tools, document repository and versioning tools, source-code to UML tools, UML-based code generators, something else? All of these categories of tools could be of use with UML - what are you interested in?


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Mahmoud Hadad
Ranch Hand

Joined: Jan 09, 2006
Posts: 67
thanks for the reply, i have seen some hands-on labs for UML and netbeans so i'm trying to get use of them, anyway what i'm looking for is UML code generators and reverse enginiering UML model (source-code to UML?), i awnt to start plotting the whole project in diagrams before starting to write code. i couldn't understand what is whiteboard-capture tools, UML-specific drawing tools, printing tools, document repository and versioning tools is about?
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Mahmoud Hadad:
i awnt to start plotting the whole project in diagrams before starting to write code.


Why do you want to do that?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by Mahmoud Hadad:
i'm looking for is UML code generators and reverse enginiering UML model (source-code to UML?)


Mahmoud,

I'm afraid that around these parts you will find many ranchers that consider the pursuit of "round-tripping" modeling tools a "fool's errand" even though many vendors may suggest that they offer tools with these kind of capabilities. To quote Dean Wampler in Model-Driven Development: One Curmudgeon's View

Why won't the general purpose language be graphical?
...
On the negative side, it was simply faster to write code, period, especially with a good IDE that offers code completion, on-the-fly error detection, wizards for some of the more tedious steps, etc.
...
But wait, if a picture is worth a thousand words, then shouldn't drawing be faster, even if it's more tedious than typing? It would be faster if this metaphor were literally true, but what it really means is that we get the gist or big picture of a concept through a picture more quickly than through a verbal description. Unfortunately, computers don't do big picture. They are literal-minded to a fault. They demand the 1000 words.

Code generators have their place - though they usually apply to some very narrow application areas. UML is meant as a tool for communication, not necessarily a basis for executable code. And just because a design is expressed in UML doesn't mean it's clear - it can still be gibberish. Ultimately you will run into a limitation with the tool that requires you to modify the generated code:
  • Modifying generated code is usually not pleasant - quite the contrary. Few would tolerate a human programmer who would write code this unclear.
  • The tool will likely not understand the modifications you made. At best it will ignore them, at worst it will crash.
  • The tool will simply overwrite your modifications on the next generation pass. You will have to add them again.


  • Code As Documentation
    Code as Design (aka: The Code is the Design)
    [ September 27, 2006: Message edited by: Peer Reynders ]
    Mahmoud Hadad
    Ranch Hand

    Joined: Jan 09, 2006
    Posts: 67
    my experience was that once i have coded a whole project alone, anyway after a while when i wanted to make an update of it i took a week or less to remember how it used to work so i've done similar diagrams that looked like UML on paper.this is why i'm learning UML frankly. as for documenting my code it was not easy too to remember how my methods should work in sequence. and i do prefer thinking about the whole project before typping code then after i start coding i go back and change my idea about the application analogy(i think evreyone does that?), but isn't there a better way to visualize the whole project before wasting time between reverse feedback and re-design?
    Peer Reynders
    Bartender

    Joined: Aug 19, 2005
    Posts: 2922
        
        5
    You can and should use UML to create an overall map of your application. You may even use a few sequence diagrams to design/document the "interesting bits". However UML code generators have their limitations and you would have to supply a lot of detailed information to the point that it would be faster to "just write the code". If you were to create all of the detailed diagrams and the code yourself you would be duplicating effort and the volume of diagrams might make it difficult to find what you are looking for.
    (See also Agile Documentation: Strategies for Agile Software Development)

    As to the concern of understanding your code later it is paramount to always leave your code in a state where its intent is clear and where it is testable. Clarity should ensure that the code tells you "what" it's doing (rather than how it's doing it). Unit tests document "how" your code is used.
    Before Clarity.

    Code Complete 2e
    Refactoring
    Working Effectively with Legacy Code
    Agile Software Development, Principles, Patterns, and Practices
    UML for Java Programmers
    [ September 28, 2006: Message edited by: Peer Reynders ]
    Mahmoud Hadad
    Ranch Hand

    Joined: Jan 09, 2006
    Posts: 67
    sorry i need to understand this well because the decision to learn UML will take some time. so you are telling me to UML diagram my Application's (the key concepts logic behind it without diagramming code specific actions, i mean i should not diagram evrey class with it's attributes and methods and the way they work in sequence)? and as for writing code and diagramming what should i do exactly (do both in a spearate controlled way so i don't get lost in either UML diagrams nor code, i should code and do UML diagrams in a separate way)?
    thanks again for the reply
    [ September 28, 2006: Message edited by: Mahmoud Hadad ]
    Peer Reynders
    Bartender

    Joined: Aug 19, 2005
    Posts: 2922
        
        5
    Your primary focus is to deliver working software that is clear to yourself and others in its intent and which is also testable and maintainable. You only use UML to communicate an overview or certain key ideas to others or to sort out any particularly tricky aspects of the application for yourself (Model with a Purpose) but you do not create an UML model of your entire application in every excruciating detail.
    Getting started with UML is fairly easy especially with something like UML Distilled which covers the 20% of UML that you use 80% of the time. However Agile Software Development, Principles, Patterns, and Practices might be a better resource for you as it teaches and uses some UML and it also gets into the other development practices.

    You create just enough UML diagrams to support your development activities (and usually not to the level of detail that your code will go).
    The TAGRI (They Aren't Gonna Read It) Principle of Software Development
    Akhilesh Trivedi
    Ranch Hand

    Joined: Jun 22, 2005
    Posts: 1526
    "Agile Software Development, Principles, Patterns, and Practices "

    Is it available in India, under what name and what publication? Hunting for it...


    Keep Smiling Always — My life is smoother when running silent. -paul
    [FAQs] [Certification Guides] [The Linux Documentation Project]
    Ilja Preuss
    author
    Sheriff

    Joined: Jul 11, 2001
    Posts: 14112
    Originally posted by Peer Reynders:
    However Agile Software Development, Principles, Patterns, and Practices might be a better resource for you as it teaches and uses some UML and it also gets into the other development practices.


    If your main interest is in learning UML, "UML for Java Programmers" by the same author might be the better choice. It shows how to apply the basics of UML, with a lot of example code.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: an advice about a book on UML and java needed
     
    Similar Threads
    Code to UML
    UML for Java Programmers - Agile/Newbie question
    What UML Tool(s) are you using for SCEA Beta Part II?
    is this book suitable for IBM 486?
    Poseidon... is it good ?