Communication packet/frames diagram: documenting protocols - protocols

Can you suggest me a diagramming software where I can draw diagrams like this one (as much out-of-the-box as possible):
These type of diagrams are usually used to document communication protocols so one can easily understand how packets/frames are composed.

Probably the best (but not out-of-the-box) solution is to draw this in vector graphics editor (for example, Inkscape).
I've stumbled upon this question looking for the same problem solution.
And I thought it can be useful to someone else if I share my findings.
Somewhat different PDU structure diagrams can be drawn with packetdiag, in wavedrom editor or described with TeX.
Also there are some relevant info in answers to related question: https://stackoverflow.com/questions/2034636/best-way-to-document-a-packet-protocol (how packet structures are described in RFCs). Question is deleted now, but you can find it in webarchive.
It would be great if share the way you solved this problem.

Related

How can I generate a UML diagram without a GUI

I'm trying to create a UML diagram from the command line without preexisting code.
Eventually I'll write code in C++/Java, but I need to create a diagram first.
I'm thinking of a header-like file, which could be read and could generate a diagram.
Of course, I could just create a header and generate it. However, I'm not supposed to write any code until I've submitted my diagram (I'd also just like to have an efficient way to do this for the future).
UML does not require application to draw. On the contrary one of the main usages of UML is to model the application that you're going to build to understand it better and make a better code as a result.
You also don't use application you create to draw UML diagram. You can use any application that supports UML modelling. Simple Google search or visit on Wikipedia will give you tons of options. You may even take a sheet of paper and a pencil. I've seen a course of UML, where participants did not use computers. They were supposed to learn UML, not tools that allow to draw it.
Finally (answering the question stated in the question topic), UML is in no way limited to model only graphical applications. Static structure and dynamic behaviour of the system exists regardless if user communicates with it through a GUI or command line.
Are you sure you understood the reason why you are supposed to make a UML diagram or do you disagree with that reason? What I can definitely suggest is to find a good book about IT business analysis using UML. This site is not to recommend specific books, but again Google will be your friend here.
As according to the comment the goal is to actually generate a UML class diagram from text let me add a second part of answer
First disclaimer. In general SO is not a place to ask for tools and that question is brushing it. Let me make my answer more generic though.
UML is in general graphical language so technically what you need is something that will parse text version of your "diagram" into a nice picture.
Most if not all tools keep UML in some textual format, be it XMI or some internal legacy solution. The problem with that is that the format is usually pretty complex.
There are some tools that are intended to "draw" diagram by typing text and that's probably something that would suit you best. In general I definitely prefer "normal" GUI but if you insist yuml.me has a nice and easy to understand textual layer based on which it generates really cool diagrams. You may expect you will find others as well, so as usually, ask uncle Google. As suggested by Thomas Kilian in a comment, PlantUML is another example as it can work without GUI and "is an open-source tool allowing users to create UML diagrams from a plain text language." (quote after Wikipedia)

Are there any good resources discussing the creation and use of UML component diagrams? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
As part of an assignment, I have to create a component diagram for existing code. I understand what a component diagram is and the information it presents, but I'm not sure of a process to follow when looking at code to diagram it out to produce a component diagram. I'm also not sold on how a component diagram, if I am presented with one, would help me with implementation of a system.
Maybe have a look at Scott Ambler's UML 2 Component Diagramming Guidelines and Introduction to UML 2 Component Diagrams. These are IMHO two good resources that explain how and when such diagram can be used.
You state two separate concerns: how to get from code to diagram, and how to use one as a guide to implementing a system. If you're diagramming existing code, I don't think the second question applies.
If you're designing new code, then a component diagram can be 1) a useful abstraction to understanding the important parts of the code, minus all the distractions, and 2) a good way to communicate to others.
If you're looking at existing code, then an existing component diagram (or one of several other UML artifacts) can be a guide to the code, which especially helps in maintenance: it can be easier to identify the location of bugs, major class responsibilities, etc.
If there's no diagram, then the exercise of making one by reading code is a good way to familiarize yourself. I've done this in a number of cases when inheriting a complex codebase. As a result, I have a couple of pages of diagrams of the application and database that tell me at a glance the interesting things about its major components. At any given time, I'll be very familiar with some areas and not others, depending on what I'm working on. The diagrams are a good reminder of how to use various parts of the application. And they're helpful when bringing others onto the team; they understand the code much faster after a half-hour walk through the diagram.
To work from existing code, you'll need to read through it, identify the major classes in use, and trace back to understand the dependencies and the interfaces, method signatures and data structures they use to collaborate. If it's a database-backed app, it can be helpful to see a description of the DB, as it should embody the main concerns of the application.
It helps to have some use cases to guide the investigation, since with event-driven applications you need to understand what the user is doing in order to trace through the code. If there are no existing use cases, then start by writing some simple high-level ones yourself. Then go through the code by use case, and identify the major objects in use. Hopefully, you'll find major classes in the program to macth the major use cases you identify. E.g., if the application is a web-based e-commerce app with an administrative user-interface, then you'll identify a number of end-user and administrative-user use cases, and should expect to see some classes specific to each of those families, as well as generic and utility classes used throughout.
Stay at a high level, avoid the temptation to account for every single thing you encounter.
As Pascal said, Scott Ambler's a great resource of practical UML knowledge, and has guildelines that can be used as little or as much as necessary. Specifically, see Introduction to UML 2 Component Diagrams. Hoever, he's writing much more for people designing new code than those documenting existing code, so you have to adapt some of what he discusses.
Martin Fowler's "UML Distilled" is still the best book on UML you can get. Its chief virtue is that it's thin - densely packed with info.
For me UML isn't primarily about helping me to design a system (though it does help). It's about helping me to communicate the design to others by giving us a common language/notation.
It makes the conversation easier so we don't waste time trying to translate between our different frames of reference.
The Scott Ambler is another good off-the-shelf standard answer. However, in the case of component diagrams I find the suggestions under (Section Creating Component Diagrams) fine, but long and not relevant to your documentation needs. From Scott's list (Creating Component Diagrams) I would really focus on just (1, 4, 5, 13), as many of the suggestions are design best practices. I will add some more of my own below.
Martin Fowler's book is great in many ways, but not really in depth for Component Diagrams or Co.. A massive 7 pages, which shows you where it was prioritized during his writing, as class diagrams get 18 pages or so.
I agree with you that you should be able to realize when to use a UML diagram. The UML 2.2 Specification itself says that it was built for Component (Service/Interface) Oriented systems. Taking a basic MVC GUI app and pushing into a Component diagram/model really does not make sense. There are also a couple ways of diagramming the component relationships, Scott Ambler's site shows them in Figure 1. For large multi system implementations I have found these diagrams very effective, e.g. lots of interfaces and lots of abstraction of systems.
My Suggestions: (I use components for modeling often, and I read the UML spec on this stuff)
Skip using ports for the HL component diagram, they are for grouping and although they look fun in Scott Ambler's diagramming you do not gain a lot for the effort.
Avoid getting caught up in an internal Component Structure. Only do this if clarity is needed for a high level of complexity.
Don't slip into making most "classes" into components.
Focus on the interfaces and where real boundaries exist, clues are public interfaces, package groupings, WSDL, external system interactions.
For your first several I would start top down. First make one of all the external system interactions, then do the next level down, use ports and composite structure if you want, but I don't like them, they are messy because the composite structure are actually Parts, a UML object that is an instance of a class or component, the naming get complex etc.
Pick one notation in general, use the ball and socket connections for tight coupling and only switch to the use/depends line between component and provider for loose coupling where there component (interface realizations) can actually be switched, both are mixed in Scott Ambler's figure 1 (linked above), loose on the left and tight coupling on the right. The UML spec also mentions this in section 8 of the UML 2.2 Superstructure.
From the following topic in the VS 2010 Ultimate docs:
UML Component Diagrams: Guidelines: http://msdn.microsoft.com/en-us/library/dd409393%28VS.100%29.aspx
Drawing component diagrams has several benefits:
Thinking of your design with regard to the major blocks helps the development team to understand an
existing design and create a new one.
By thinking of your system as a collection of components with well-defined provided and required
interfaces, you improve the separation between the components. This in turn makes the design easier to
understand and easier to change when requirements change.
(source: microsoft.com)

Is there a visual diagram format for gui event mapping?

Does anyone know of any kind of UML variation which can map events in a GUI system?
I have a quite complex event driven GUI system and I would like to create a diagram so new developers can easily get an overview of events fired by various views and what models/controllers or view are instantiated/effected by these events.
I was looking for something that would look more like a mind map which branches all over the place rather than linear scenarios.
Does anyone have any ideas?
Regards,
Chris
State diagrams.
Old and pricey, but here is a great text on modeling user interfaces with state charts. I've worn the pages out on mine....
For quick and dirty message sequence charts, you can't beat the price of mscgen. It uses a source text inspired by the syntax used by AT&T's Graphviz package, which is, incidentally, a good way to rendering arbitrary directed and undirected graphs.
I often use graphviz to document my state machines, as I find it easier to keep in sync with the implementation than a Visio drawing.
the book that finally helped me really understand UML statecharts is Samek's Practical Statecharts in C/C++ which has a few chapters on them as well as an impressive implementation framework for building state-based systems. I think it's worth getting just for the explanations of how to think with statecharts.
For actually creating quick statecharts or similar rough diagrams, I do a lot of work with the textual DOT language in GraphViz and often then include those diagrams directly into documentation generated with doxygen.
UML activity diagrams and state charts can branch all over the place.
See http://www.agilemodeling.com/style/stateChartDiagram.htm
(source: agilemodeling.com)
The communication diagram can lack sequence and it behaves more like a mind map than an activity or sequence diagram. If communicating events is your goal a state chart does show interaction, but rather, well, state. A communication diagram has less on it than an activitystate diagram, though that is not bad either, similar in nature.
You could just leverage UseCases and add keywords or label the uses edge/line. Not recommended if this will be maintained and be more than a pretty picture.
(Image is slightly overloaded, you don't need the numbering and they don't have to be method calls)
(source: agilemodeling.com)
http://www.agilemodeling.com/artifacts/communicationDiagram.htm
Another format which I was reminded of recently is the Dynamic Diagram in the Bon Method. I wrote a posting about it on Artima. The book Seamless Object-Oriented
Software Architecture was made freely available in 2003.
The difference between these and communication diagrams is separation of the steps into a separate legend. That can read like a Use Case by itself, being easy to localise and sometimes to show alternative explanations.
I had great results using this D3 based auto minimum spanning tree implementation. Just pass it a list of graph edges and it'll cluster and draw a UML-like diagram:
https://github.com/cpettitt/dagre-d3
Also great for state diagrams.

What diagramming techniques (not tools) do you use during your programming? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What diagramming technique(s) do you use while programming to help you
or others understand your program or design. I am not talking about a person's
favorite tool, though a good tool probable helps a person greatly with
diagramming.
My intent in this question is to find the simple useful diagramming techniques
people actually use and find new ones to learn.
Do you use flow-charts, Data Flow Diagrams, ER diagrams, etc?
The web is full of recommendations! But what do real programmers, designers,
and code maintainers actually use in their day to day work.
Thanks for your feedback
Very High Level Discussion - Context Diagrams where the boxes might represent classes, packages, or sub-systems.
High Level Design - Sequence diagrams which show the interface between sub-systems, still no classes directly used but may be implied from this.
Detailed Design - Sequence diagrams which are at the class level.
If there is a tricky algorithm for something such as the correlation of multiple data streams into a new stream then I will generally use a Flow Chart to work out the algorithm.
If the solution requires knowledge of state then a State diagram is also used.
Those are the ones I use most.
When doing Data Warehouse design I draw Star Schemas to work out how to store the data. When doing Transactional DB design I use Entity Relationship diagrams to work our data storage.
When designing a UI I just sketch it out. Once I start to get some parts of the UI worked out and want to play with some areas I will make a template, print out a copy copies and then use that as a guide to work on sub-sections. For colour schemes, it can be handy to make a graphic using the gimp and have layers for each piece of the design and then play with the layers colouring each one to find the right balance.
What do we really use? Maybe other people actually create formal diagrams, but for the most part I just scribble bubbles, boxes and lines on a sheet of paper.
I use a whiteboard for modeling, so I guess "whiteboard modeling language" would be my answer.
I will do a UML Class diagram for anything i'm designing that is bigger than a couple of classes. Drawing a class diagram makes me take time out to think over the design instead of ploughing straight into the code and always produces a better result.
For bigger and more complicated architectures I find that Sequence diagrams are a good way to communicate behviour, especially for multi-threaded systems.
I use diagrams as a way to quickly understand legacy code. It takes some work to create the diagram, but it always pays of in the end.
Normally I use class diagrams to get the big picture. Sometimes sequence diagrams and even dataflow diagram if a piece o code is extremely hard to understand.
In the design phase I use class diagrams, and often state diagrams. State diagrams are perfect if a class behaviour differs with its state.
I use Sequence Diagrams a lot (drawn on paper). I find they give me a nice visual representation the logical flow of method calls and information between various systems and components in our applications.
I have a Flow chart of the main product I work with and develop.
My team also often uses UML diagram sketches on white-boards while designing new parts for us to implement. They're very useful in creating design patterns and modeling the high-level structure of the classes which will be needed. These are never full blown UML though...
Whiteboard for discussions.
Pen and paper for less temporary record.
Code stubs for 'Things to impelement'.
Tested and Working code (with extensive comments) for posterity.
I use ER and class diagrams on paper and whiteboard for any project that's bigger than a shell script.
Flow charts, only when I need to explain a process to a non-programmer (or if it's a really complicated process and I need to understand it first).
My old boss used to say "the guy just loves drawing stuff."
I work in an AJAX development environment, and most of the backend code I write works like a pipe between a relational database and the frontend javascript (user interface). So, the most used 'diagram' per say that I use are JSON objects to describe how data should be passed back and forth between the database and the interface. They are simple, universal and easy to understand data structures.
Example:
{
"id": row['id'],
"name": row['name'],
"mandatory": row['mandatory'],
"rangeDescription": "This is the Range",
"globalRate": row['global']
}
I draw bastardized versions of UML class, object and sequence diagrams. While I try to be true to the syntax, I am much more concerned about expressing the main idea behind particular feature. So, I'll draw up something, ask a colleague to take a look, and if it seems clear enough, we might even scan it and post it in our Wiki.
Then, when it so happens that we actually get some time to work on the documentation (and that is almost never), I'll use BOUML and redraw the scribbles into a proper diagram.
Now, to put is all in context, I'm working at a relatively small team (5 developers), making trading and product configuration platforms in Java. We have our two products that we then additionally customize to customer's requests. Being a close-knit community, with low (zero) turnaround for a few years, we use the documentation primarily as a remainder to ourselves. And in this setup, the above approach works quite well.
I like Data Flow Diagrams. A lot.
I use whatever is needed for communicatation. Usually that's nothing at all. Sometimes it's a whiteboard.
From time to time, I use Sparx Enterprise Architect, which is a UML modeling tool, though it produces decent diagams while it's at it. I've used it for requirements, use case, activity, sequence, domain, and even class modeling, and sometimes some reverse-engineered ER diagrams. Whatever it takes to get the point across.

Is UML practical? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
In college I've had numerous design and UML oriented courses, and I recognize that UML can be used to benefit a software project, especially use-case mapping, but is it really practical? I've done a few co-op work terms, and it appears that UML is not used heavily in the industry. Is it worth the time during a project to create UML diagrams? Also, I find that class diagrams are generally not useful, because it's just faster to look at the header file for a class. Specifically which diagrams are the most useful?
Edit: My experience is limited to small, under 10 developer projects.
Edit: Many good answers, and though not the most verbose, I belive the one selected is the most balanced.
Using UML is like looking at your feet as you walk. It's making conscious and explicit something that you can usually do unconsciously. Beginners need to think carefully about what they're doing, but a professional programmer already knows what they're doing. Most of the time, writing the code itself is quicker and more effective than writing about the code, because their programming intuition is tuned to the task.
It's not just about what you're doing though. What about the new hire who comes in six months from now and needs to come up to speed on the code? What about five years from now when everyone currently working on the project is gone?
It's incredibly helpful to have some basic up to date documentation available for anyone who joins the project later. I don't advocate full blown UML diagrams with method names and parameters (WAY too difficult to maintain), but I do think that a basic diagram of the components in the system with their relationships and basic behavior is invaluable. Unless the design of the system changes drastically, this information shouldn't change a lot even as the implementation is tweaked.
I've found that the key to documentation is moderation. No one is going to read 50 pages of full blown UML diagrams with design documentation without falling asleep a few pages in. On the other hand, most people would love to get 5-10 pages of simple class diagrams with some basic descriptions of how the system is put together.
The other case where I've found UML to be useful is for when a senior developer is responsible for designing a component but then hands the design to a junior developer to implement.
In a sufficiently complex system there are some places where some UML is considered useful.
The useful diagrams for a system, vary by applicability.
But the most widely used ones are:
Class Diagrams
State Diagrams
Activity Diagrams
Sequence Diagrams
There are many enterprises who swear by them and many who outright reject them as an utter waste of time and effort.
It's best not to go overboard and think what's best for the project you are on and pick the stuff that is applicable and makes sense.
Using UML is like looking at your feet as you walk. It's making conscious and explicit something that you can usually do unconsciously. Beginners need to think carefully about what they're doing, but a professional programmer already knows what they're doing. Most of the time, writing the code itself is quicker and more effective than writing about the code, because their programming intuition is tuned to the task.
The exception is why you find yourself in the woods at night without a torch and it's started to rain - then you need to look at your feet to avoid falling down. There are times when the task you've taken on is more complicated than your intuition can handle, and you need to slow down and state the structure of your program explicitly. Then UML is one of many tools you can use. Others include pseudocode, high-level architecture diagrams and strange metaphors.
Generic work-flow and DFDs can be very useful for complex processes. All other diagramming (ESPECIALLY UML) has, in my experience, without exception been a painful waste of time and effort.
I'd have to disagree, UML is used all over the place - anywhere a IT project is being designed UML will usually be there.
Now whether it is being used well is another matter.
As Stu said, I find both Use Cases (along with the use case descriptions) and activity diagrams to be the most helpful from a developer point of view.
Class diagram can be very useful when trying to show relationships, as well as object attributes, such as persistence. When it comes to adding ever single attribute or property they are usually overkill, especially as they often become out of date quickly once code is written.
One of the biggest problems with UML is the amount of work required to keep it up to date once code is being generated, as there are few tools that can re-engineer UML from code, and few still that do it well.
I will qualify my answer by mentioning that I don't have experience in large (IBM-like) corporate development environments.
The way I view UML and the Rational Unified Process is that it's more TALKING about what you're going to do than actually DOING what you're going to do.
(In other words it's largely a waste of time)
Throw away only in my opinion. UML is a great tool for communicating ideas, the only issue is when you store and maintain it because you are essentially creating two copies of the same information and this is where it usually blows.
After the initial round of implementation most of the UML should be generated from the source code else it will go out of date very quickly or require a lot of time (with manual errors) to keep up to date.
I co-taught a senior-level development project course my last two semesters in school. The project was intended to be used in a production environment with local non-profits as paying clients. We had to be certain that code did what we expected it to and that the students were capturing all the data necessary to meet the clients' needs.
Class time was limited, as was my time outside of the classroom. As such, we had to perform code reviews at every class meeting, but with 25 students enrolled individual review time was very short. The tool we found most valuable in these review sessions were ERD's, class diagrams and sequence diagrams. ERD's and class diagrams were done only in Visual Studio, so the time required to create them was trivial for the students.
The diagrams communicated a great deal of information very quickly. By having a quick overview of the students' designs, we could quickly isolate problem areas in their code and perform a more detailed review on the spot.
Without using diagrams, we would have had to take the time to go one by one through the students' code files looking for problems.
I am coming to this topic a little late and will just try an clarify a couple minor points. Asking if UML is useful as far too broad. Most people seemed to answer the question from the typical/popular UML as a drawing/communication tool perspective. Note: Martin Fowler and other UML book authors feel UML is best used for communication only. However, there are many other uses for UML. Above all, UML is a modeling language that has notation and diagrams mapped to the logical concepts. Here are some uses for UML:
Communication
Standardized Design/Solution documentation
DSL (Domain Specific Language) Definition
Model Definition (UML Profiles)
Pattern/Asset Usage
Code Generation
Model to Model transformations
Given the uses list above the posting by Pascal is not sufficient as it only speaks to diagram creation. A project could benefit from UML if any of the above are critical success factors or are problem areas that need a standardized solution.
The discussion should expanded out from how UML can be over kill or applied to small projects to discuss when UML makes sense or will actually improve the product/solution as that is when UML should be used. There are situations where UML for one developer could sense as well, such as Pattern Application or Code Generation.
UML has worked for me for years. When I started out I read Fowler's UML Distilled where he says "do enough modelling/architecture/etc.". Just use what you need!
From a QA Engineer's perspective, UML diagrams point out potential flaws in logic and thought. Makes my job easier :)
Though this discussion has long been inactive, I have a couple of -to my mind important- points to add.
Buggy code is one thing. Left to drift downstream, design mistakes can get very bloated and ugly indeed. UML, however, is self-validating. By that I mean that in allowing you to explore your models in multiple, mathematically closed and mutually-checking dimensions, it engenders robust design.
UML has another important aspect: it "talks" directly to our strongest capability, that of visualisation. Had, for example, ITIL V3 (at heart simple enough) been communicated in the form of UML diagrams, it could have been published on a few dozen A3 foldouts. Instead, it came out in several tomes of truly biblical proportions, spawning an entire industry, breathtaking costs and widespread catatonic shock.
I believe there may be a way to utilize Cockburn style UML fish,kite, and sea-level use cases as described by Fowler in his book "UML Distilled." My idea was to employ Cockburn use cases as an aid for code readability.
So I did an experiment and there is a post here about it with the Tag "UML" or "FOWLER." It was a simple idea for c#. Find a way to embed Cockburn use cases into the namespaces of programming constructs (such as the class and inner class namespaces or by making use of the namespaces for enumerations). I believe this could be a viable and simple technique but still have questions and need others to check it out. It could be good for simple programs that need a kind of pseudo-Domain Specific Language which can exist right in the midst of the c# code without any language extensions.
Please check out the post if you are interested. Go here.
I think the UML is useful thought I think the 2.0 spec has made what was once a clear specification somewhat bloated and cumbersome. I do agree with the edition of timing diagrams etc since they filled a void...
Learning to use the UML effectively takes a bit of practice. The most important point is to communicate clearly, model when needed and model as a team. Whiteboards are the best tool that I've found. I have not seen any "digital whiteboard software" that has managed to capture the utility of an actual whiteboard.
That being said I do like the following UML tools:
Violet - If it were any more simple it would be a piece of paper
Altova UModel - Good tool for Java and C# Modeling
MagicDraw - My favorite commercial tool for Modeling
Poseidon - Decent tool with good bang for the buck
StarUML - Best open source modeling tool
UML diagrams are useful for capturing and communicating requirements and ensuring that the system meets those requirements. They can be used iteratively and during various stages of planning, design, development, and testing.
From the topic: Using Models within the Development Process at http://msdn.microsoft.com/en-us/library/dd409423%28VS.100%29.aspx
A model can help you visualize the world in which your system works, clarify users' needs, define the
architecture of your system, analyze the code, and ensure that your code meets the requirements.
You might also want to read my response to the following post:
How to learn “good software design/architecture”? at https://stackoverflow.com/questions/268231/how-to-learn-good-software-design-architecture/2293489#2293489
I see sequence diagrams and activity diagrams used fairly often. I do a lot of work with "real-time" and embedded systems that interact with other systems, and sequence diagrams are very helpful in visualizing all the interactions.
I like to do use-case diagrams, but I haven't met too many people who think they are valuable.
I've often wondered whether Rational Rose is a good example of the kinds of applications you get from UML-model-based design. It's bloated, buggy, slow, ugly, ...
I found UML not really useful for very small projects, but really suitable for larger ones.
Essentially, it does not really matter what you use, you just have to keep two things in mind:
You want some sort of architecture planning
You want to be sure that everyone in the team is actually using the same technology for project planning
So UML is just that: A standard on how you plan your projects. If you hire new people, there are more likely to know any existing standard - be it UML, Flowchard, Nassi-Schneiderman, whatever - rather than your exising in-house stuff.
Using UML for a single developer and/or a simple software project seems overkill to me, but when working in a larger team, I would definitely want some standard for planning software.
UML is useful, yes indeed! The main uses I've made of it were:
Brainstorming about the ways a piece of software should work. It makes easy to communicate what you are thinking.
Documenting the architecture of a system, it's patterns and the main relationships of its classes. It helps when someone enters your team, when you're leaving and want to make sure your successor will understand it, and when you eventually forget what the hell that little class was meant for.
Documenting any architectural pattern you use on all your systems, for the same reasons of the dot above
I only disagree with Michael when he says that using UML for a single developer and/or a simple software project seems overkill to him. I've used it on my small personal projects, and having them documented using UML saved me a lot of time when I came back to them seven months later and had completely forgotten how I had built and put together all those classes.
One of the problems I have with UML is the understandability of the specification. When I try to really understand the semantics of a particular diagram I quickly get lost in the maze of meta-models and meta-meta-models. One of the selling points of UML is that it is less ambiguous than natural language. However, if two, or more, engineers interpret a diagram differently, it fails at the goal.
Also, I've tried asking specific questions about the super-structure document on several UML forums, and to members of the OMG itself, with little or no results. I don't think the UML community is mature enough yet to support itself.
Coming from a student, I find that UML has very little use. I find it ironic that PROGAMERS have yet to develop a program that will automatically generate the things that you have said are necessary. It would be extremely simple to design a feature into Visual Studio that could pull pieces of the data, seek for definitions, and product answers sufficent so that anyone could look at it, great or small, and understand the program. This would also keep it up to date because it would take the information directly from the code to produce the information.
UML is used as soon as you represent a class with its fields and methods though it's just a kind of UML diagram.
The problem with UML is that the founders book is too vague.
UML is just a language, it's not really a method.
As for me, I really find annoying the lack of UML schema for Opensource Projects. Take something like Wordpress, you just have a database schema, nothing else. You have to wander around the codex api to try to get the big picture.
UML has its place. It becomes increasingly important as the size of the project grows. If you have a long running project, then it is best to document everything in UML.
UML seems to good for large projects with large teams of people. However I've worked in small teams where communication is better.
Using UML-esque diagrams is good though, especially in the planning stage. I tend to think in code, so I find writing large specs hard. I prefer to write down the inputs' and outputs' and leave the developers to design the bit in the middle.
I believe UML is useful just for the fact that it gets people to think about the relationships between their classes. It is a good starting point to start thinking about such relationships, but it is definitely not a solution for everybody.
My belief is that the use of UML is subjective to the situation in which the development team is working.
In my experience:
The ability to create and communicate meaningful code diagrams is a necessary skill for any software engineer who is developing new code, or attempting to understand existing code.
Knowing the specifics of UML - when to use a dashed line, or a circle endpoint - is not quite as necessary, but is still good to have.
UML is useful in two ways:
Technical side: a lot of people (manager and some functional analyst) think that UML is a luxury feature because The code is the documentation: you start coding, after you debug and fix. The sync of UML diagrams with code and analisys force you to understand well the requests of the customer;
Management side: the UMl diagrams are a mirror of the requires of the customer who is inaccurate: if you code without UML, maybe you can find a bug in requires after a lot of hours of work. The diagrams UML allow you to find the possible controversal points and to resolve before the coding =>help your planning.
Generally, all the projects without UML diagrams have a superficial analysis or they have short size.
if you're in linkedin group SYSTEMS ENGINEERS, see my old discussion.
UML is definitely helpful just as junit is essential. It all depends how you sell the idea. Your program will work without UML just as it would work without unit tests. Having said that, you should create do UML as along it is connected to your code, i.e when you update UML diagrams it updates your code, or when you update your code it auto generates the UML. Don't do just for the sake of doing it.
UML definetly has its place in the industry. Imagine you are building software for Boing aircraft or some other complex system. UML and RUP would be great help here.
In the end UML only exist because of RUP. Do we need UML or any of its related stuff to use Java/.Net ? The practical answer is they have their own documenation (javadoc etc) which is sufficient and lets us get our job done!
UML no thanx.
UML is just one of methods for communication within people.
Whiteboard is better.

Resources