开发者

Common use of UML

In my experience most architectural documentation has been ad-hoc at best,and, aside from more structured dead-tree kinds of writing I've yet to see formal UML in actual use, and I've worked with few, if any developers who'd be able to clearly or correctly build UML diagrams - it seems to be used more as a kind of "graphical psuedocode".

Given that, I'm c开发者_运维知识库urious as to whether anyone has experience using UML in internal documentation and communicating system function between team members. Is this a tool/mode of communication people really use in the day-to-day? Is it helpful, overspecified? Have you worked in environments where precise UML mattered or was useful?


The UML (The Unified Modeling Language) is flexible. It's not necessary to use "full" UML all the time.

Yes, I've used UML to communicate design. I've used Domain, Class, Activity, Use Case, Sequence and Deployment diagrams for various purposes.

Some of these purposes were beyond the "obvious" use of the diagram. For instance, I've used deployment diagrams to document sets of virtual machines. Since the Node element is a UML "classifier", it can be used with inheritance. I've used this to show how a base virtual machine is specialized. For instance, the base is just Windows Server 2008, but a specialization of that has SQL Server installed, and a specialization of that one is being used as the database server.


In my workplace, we have used UML class diagrams extensively as we write large enterprise-scale web applications. On some occasions we use sequence diagrams. But, by no means do we use the full UML suite of diagrams or even come close. UML can only be effective by chewing the meat and spitting out the bones. It is a great communication tool, but using too much of its functionality can confuse people.


I have seen usage of UML Class diagrams for automatic code generation. The flow was something like this, Enterprise Architect was used to generate an XML schema out of the class diagram. This schema was then used as an input for JAXB to generate generate Java classes which provide programmatic access to the data represented in the UML model.


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.

If you do not want to create UML diagrams from scratch, you can create sequence diagrams, dependency graphs, and layer diagrams from code, and use layer validation to ensure that changes in the code do not conflict with the specified design. I describe this with more detail in 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


In my experience I've found the UML Sequence diagrams to be the most useful for people trying to understand a system or a particular process of the system.

The reason most likely is that it shows how various components co-operate and indirectly what the responsibility of each of them have. The vertical dimension shows time and the diagram is very intuitive to understand, even for people with no knowledge of UML.


I have found the UML class diagram to be much more helpful for doing a logical data model or domain model than an Entity-Relationship Diagram. It is more expressive, having generalization (ie inheritance) and specific n-to-n relationships. Try to model this in an ER Diagram :)

Common use of UML

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜