0

I've recently been suprised by a lack of freely available UML diagrams or my inability to find them online.

Though a company's implementation of a model may vary, one might hope that models for common businesses would be available online, just as open source software allows one to piece together different stacks rather than reinventing wheels.

ie, this very basic example of a restaurant's ordering flow is shown on Wikipedia. Where could I find others for say a car wash, vending machine or word processing software?

  • 2
    Search or list-generating questions are off-topic on Stack Exchange. Please improve your question by rephrasing it as a concrete problem that can be answered canonically. – Todd A. Jacobs May 22 '15 at 16:18
2

This actually is a very good question. I've found that visual representations of system processes can really help people who don't write code understand system designs. Yet, I've also found people are hesitant to maintain and reuse such documentation. Here I present an incomplete list of reasons why reuse and sharing my be true in the hopes that someone on this site sees the list and creates some new tools that solve these problems!

People don't know how to read UML and that limits adoption because the diagrams can't stand on their own without a UML literate person around to explain them. The simpler sequence diagrams seem to be more intuitive to people and I've found them useful. Class diagrams are initially intuitive, but not once the various line decorators are introduced.

UML diagrams are protected as intellectual property. As @Leon noticed, few diagrams are open source. Software engineers are way ahead of other disciplines when it comes to sharing code as open source. It will take time for other engineering disciplines to catch up. Electrical and Mechanical engineering are beginning to produce significant open source design libraries, but I'm not seeing similar contributions in disciplines like genetic, chemical, aerospace, or mechanical engineering. Most of the knowledge there is still locked inside text books or documents held private by companies.

UML is not produced. As @David Arno mentioned, software engineers aren't making as much UML. This likely has to do with two factors, in addition to those mentioned above. First, many developers prefer to work in text for speed and customizability. Second, much UML work was related to Java development when Java was the primary enterprise and government language, but many other languages have grown in popularity and methods for generating code have evolved since.

Code generation hasn't caught on. The promise of code generation from UML is the approaches greatest advantage over textual programming. I've yet to see a large project where code generation from UML was implemented. Many times people begin with code generation, but then tweak or modify the output code and suddenly choose to maintain the text instead of maintaining both diagrams and text.

Software costs. Enterprise grade software that produces UML makes Photoshop look cheap. Licensing costs make sharing UML inside a company expensive, let alone sharing between companies. There are free UML tools on Linux, but these are typically limited to diagramming and don't implement the advanced code analysis and generation features of extremely expensive software like IBM Rhapshody.

No GitHub for UML or other diagrams exists. People must share images and since images aren't reusable the value of shared static diagrams is relatively low. Compare this to shared code, which can be both modified or run without having to retype every line.

Page centric diagrams. Finally, UML and other diagramming languages are from a time when people diagramed on paper. People don't want pages on computer screens, they want continuous and easy to navigate models. CAD and maps have made this transition relatively well (Google Maps has a very different interaction paradigm than a Thomas Guide map book). UML, PowerPoint, and Visio have just never left the page behind.

  • There is a lot wrong with this answer. First, stating that "most people don't know how to read UML" is a stretch. Resources to learn UML are pretty common, and although the formal specification is rather daunting, most of what most people need to know can be put into 208 paged, not all of which is content and which includes many example diagrams and annotations. Given how easy it is to learn, I suspect that most people who weren't taught it in school learned on the job, since it's not an uncommon notation. – Thomas Owens May 24 '15 at 3:00
  • Second, the idea that "UML diagrams are protected as intellectual property." isn't relevant. You can release documents under open-source licenses, just like you can release source code. Although the same ones that apply to code may not be very strong when it comes to documentation, there are others, such as the Creative Commons licenses, that can be applied and are very much suited to documents and non-code artifacts, including UML models or other design texts. – Thomas Owens May 24 '15 at 3:02
  • Third, the development of UML has nothing to do with Java. UML development begin in 1994-1995. Java wasn't available until 1995. UML was born from a number of previous modeling techniques and notations, such as object-modeling technique and the Booch method. Other notations for visual representation of software design have existed for much longer, as well. – Thomas Owens May 24 '15 at 3:06
  • Fourth, some of your statements from code generation don't make sense. I've worked in environments that were using model-driven or model-based software engineering to various extents. The whole idea of forward and reverse engineering (model -> code -> model) is part of MBSE. So generating a model, editing code by hand, and regenerating the model should be expected and is a well-understood and accepted practice. Also, what does this have to do with the existence or availability of UML models? You can just reverse engineer models from your code and don't even need the forward code generation. – Thomas Owens May 24 '15 at 3:09
  • Fifth, your point about software costs may be true for some pieces of software, but not all. Right now, the most expensive cloud-based version of PhotoShop is about $600/year. Although a tool like Rational Rhapsody is much more expensive ($8000-$16000 for the license + 12 months of support, a fully loaded version of Enterprise Architect is $699, and most people probably wouldn't need that version. There are also UML tools that are available for free, like Eclipse Modeling Framework and Papyrus tools. – Thomas Owens May 24 '15 at 3:16
1

I would suggest that the reason why you find such models hard to find is because they aren't being produced. With the growing popularity of functional programming, test driven development and agile, iterative development techniques, the days of trying to design an entire system via UML diagrams has long gone. Some people might still use UML as a way of creating secondary documentation of the design (the code, plus unit tests, being recognised as the primary design document these days), but they would be generated from the code, not vice versa.

1

On the surface, it sounds like you are looking for freely available UML diagrams.

There are plenty available online. If you search for "UML tutorial", you will find many tutorials, such as this one or this playlist on YouTube.

Although you asked for free, I would also like to point out an abundance of books - I usually recommend UML Distilled, but there is also UML 2.0 in a Nutshell and Learning UML 2.0 - you may be able to find these or other books at your local library if you don't want to purchase them.

So, training and example material exists, and depending on your location, may be available online or book form.


However, it also sounds like you may be looking for a complete set of UML diagrams for a system. I'm not sure that you will have any luck finding this.

Martin Fowler writes about UML Modes - UML as Sketches, UML as Notes, UML as Blueprints, and UML as a Programming Language. A complete and highly detailed set of UML models would only be produced by someone using UML as Blueprints or UML as a Programming Language. In my experiences, most people use UML as notes or sketches to communicate with other people

There are also Agile Modeling techniques. Although UML is one method, they do have some practices that would likely lead to projects not releasing UML models, such as using multiple models where the models could be an acceptance test, a user story, a "shall" statement requirement, or a free-form diagram that doesn't use any standardized modeling notation. The practice of documenting late would mean that design documents (if produced) would be produced at the end of a project to provide information to the maintenance team or next development team, rather than the models being produced before the code to guide development. Finally, there is an emphasis on a single source of information, so if a model doesn't add value, it would be discarded to avoid having to maintain it, and the source code (plus the comments and build scripts and READMEs) would likely be that single source of information.

From the standpoint of commercial software, it's not good for a company to be releasing their design material. UML is a tool used to capture the design of a software system graphically. A lot of (proprietary) information goes into that design, and without a large time commit to sanitize (probably to the point of rendering them useless) the models, they would not be suitable for public consumption. Given sufficient details about the internal workings of a software product, you not only face the business threats from competitors being able to understand how your software implements certain functions to allow them to implement those same functions or improved functions, but it can also give those looking to exploit your software insight into possible holes or vulnerabilities. There's no gain to releasing models for outside use.

From the standpoint of open-source software, the true design of the software is captured in the code. If you need help understanding the code and want a model, you can use reverse engineering tools (or use other techniques, like running the code through a debugger). Keeping released UML models in sync with the code would be time consuming for the project team, especially if they are using UML as notes or sketches and aren't using a tool capable of reverse engineering to generate them, and would only keep them away from continuing to implement the software.


I think that the short answer is that if you are looking for an open source repository of UML models, you aren't going to find it. I think you need to focus on what you are trying to accomplish.

If you're trying to learn UML, there are plenty of resources out there. You likely won't find a tutorial that uses one single system, but that's because a system that would require the use of all, or even most, of the available UML diagrams to properly document would be extremely complex. It doesn't make sense to have to learn a complex system (and the domain that it's in) at the same time as a modeling language, so make smaller problems to learn the modeling language and choose appropriate problems for different facets of the language.

If you're trying to find projects that have UML models, you probably won't find those. However, there are reverse engineering tools. Many of the good ones are commercial products. You can find some tools that can reverse engineer a limited subset of UML from code for specific languages, though. When trying to understand these systems, most people will use the software, sketch out their own diagrams and models (UML or otherwise), write test code or test cases, and use a debugger to walk through the code (see Programmers Stack Exchange 1, 2, 3, 4)

0

May have answered my own question here. By searching for the following phrase, one may find relevant UML diagrams, but then will need to verify the licensing model applied to the images:

'uml example vending machine'

Not the answer you're looking for? Browse other questions tagged or ask your own question.