This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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 ]
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?
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?
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
Originally posted by Mahmoud Hadad: i'm looking for is UML code generators and reverse enginiering UML model (source-code to UML?)
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.
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?
Joined: Aug 19, 2005
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.
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 ]
Joined: Aug 19, 2005
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.