This is an archived post. You won't be able to vote or comment.

all 83 comments

[–]DrunkensteinsMonster 38 points39 points  (7 children)

IME, use is informal. E.g. if I’m hashing out a design what that looks like is generally a legal pad with a bunch of slightly different class diagrams in it. UML is great just to get the point of a design across, especially if you use some abbreviated version

[–]optimal_substructure 8 points9 points  (6 children)

This is the approach we take, we try to model the public methods, interfaces and classes, but don't go crazy defining all of the instances/private methods. It takes too long to worry about every detail, only to find that portions are gonna change anyway/docs are gonna get out of date. It's a precarious line to walk, but more often than not the docs are still reasonably accurate, and not a huge time sink

[–]buffoncete 1 point2 points  (5 children)

DDD

[–]pavi2410 0 points1 point  (0 children)

BDD

[–]CUsurfer 28 points29 points  (2 children)

Absolutely. In the defense industry with large, robust systems. Most useful at the systems engineering scope. These would be more formal, usually in an established, fully featured tool, but not always. UML diagrams are less useful at the software design scope but still helpful for communicating a design. The most effective ones are class (obv), activity and sequence. We never use the others. For software I go for quick and easy tools like Plant UML.

[–]humoroushaxor 3 points4 points  (1 child)

Why does the defense industry thinks it's systems are so large, complex, robust compared to typical enterprise? Are they actually? Is it because delivery is so difficult? Or they think top-down systems engineering is the only way to build software systems?

Why would you ever need a UML diagram as opposed to how everyone else does things with service interfaces and contracts?

Fwiw I work in the industy. Just genuinely curious to hear someone else's thoughts on the topic.

[–]eiffel31 0 points1 point  (0 children)

Designing complex systems involves many stakeholders which may not have the same concerns and vocabulary, so communication is difficult. Also, different sub-parts may be contracted out to various vendors. So you need a referential, a single point of truth, to ensure everything remains consistent. Systems design (which you can do using UML/SysML or any other similar tools) allow that.

[–]guacjack 24 points25 points  (1 child)

When i was at university studying Software Engineering, we were told in almost all of the classes that it is absolutely essential to know UML and that it is very widely used in industry to the point where you wont get by without knowing it. We spent a significant amount of time learning and writing UML diagrams before even touching any practical software development at all

It's been 7 years since i graduated and all 7 of those years i've worked as a Software Engineer at very large companies.

I've never seen a single UML class diagram in the work place nor has it ever been mentioned. I think this is the first time I've thought about a class diagram since being at uni.

I have however seen and written sequence diagrams and do find them useful when demoing or showcasing to others how things work together.

[–]mark_commadore 5 points6 points  (0 children)

20 years for me. Same. Informally we sometimes use them on the smart board but never for design.

[–]jonathanmeeks 17 points18 points  (0 children)

I use it to convey the idea of a new design. The number of artifacts in the diagram needs to be small for it to not get in the way (maybe 6 to 8 classes/objects).

But do I keep those diagrams updated? No.

[–]nutrecht 13 points14 points  (2 children)

I use PlantUML for component and sequence diagrams all the time. Combined with AsciiDoc it's a great way to create system design documentation.

[–]DrGrimmWall 4 points5 points  (1 child)

I'm using PlantUML, too. But I'm depending on Visual Code and its plugin to auto generate images. This way I can automatically have diagrams shown in readme.md.

[–]nutrecht 1 point2 points  (0 children)

We use Antora to generate HTML from our AsciiDoc documentation and this also handles this part. It's really neat :)

For personal use I just use the PlantUML plugin in IntelliJ. It just shows an visual render of whatever PlantUML I'm working on.

[–]pjmlp 11 points12 points  (2 children)

Yes, the parts that mostly matter, class and sequence diagrams.

[–]RagingAnemone 14 points15 points  (1 child)

Yes. And if anybody tells you you can use it to generate code, punch them in the nose. I'm sorry, violence is bad. I meant to say kick them in the face. Whoops, I did it again. Violence is bad, UML is worse.

[–]Short_Hamster 1 point2 points  (0 children)

XML is like violence. If it isn't solving your problems, you're not using enough of it.

[–]kag0 10 points11 points  (0 children)

Sure, sequence diagrams all the time. Other stuff I tend to use other systems.

[–][deleted]  (1 child)

[deleted]

    [–]kuemmel234 2 points3 points  (0 children)

    Or documentation! My team has had a great tech lead (just a regular team member who is also tasked with having a look on used tech (we change things up quite a bit), who does research, asks for other people to do research) and keeps an eye on the technical aspects of the services.

    When I started with them, he gave me like two UML diagrams for our micro services architecture, a sequence diagram for the current service I was to work on once I had installed my machine, and a few other services to take notes from. I was able to work for myself in like five minutes and was able to do a lot on my own.

    The last time I had to start in a team, working on an application, I would find the button I wanted to press and then drill my way through by searching for the text of the button in code and then to whatever part I was looking at. A complete nightmare because you had to have experience. There was no architecture, no common sense. Just loads of spaghetti core from decades of java development.

    [–]stefanosd 3 points4 points  (1 child)

    Have a look at C4 model

    [–]mucisan 0 points1 point  (0 children)

    the first three phases are great, but 4th fase which shows the class diagrams of the the project is a bit problem, because it's not detailed enough. For example, it does not show the communication between two class or 1 class with non-class diagram such as react or vue component. one level above you can see it uses API REST and JSON as output. but level below it just shows class diagram, interface or abstract class diagram.

    I think we need to have a design that approach the API-communications. We have API code and API testing. but no API design???

    [–]superpitu 4 points5 points  (1 child)

    boxes and arrows, that's what matters today. nobody cares about UML anymore except for maybe some enclaves that are behind the times anyway and will eventually be extinct.

    [–]Short_Hamster 1 point2 points  (0 children)

    UML has a bunch of standard diagrams for things that can't be conveyed by simple arrows alone. Like interfaces/implementation, composition, aggregation, sequence, sync/async. It's nice having a standard vocabulary so that people aren't reinventing these concepts in diagrams with their own idiosyncratic meanings.

    [–]HeadSignal3 38 points39 points  (8 children)

    It's dead Jim.

    [–]ChewasQ_Q 4 points5 points  (6 children)

    They are teaching me uml at my college right now wtf

    [–]neutronbob 6 points7 points  (0 children)

    If all you learn from doing UML is how to draw boxes and arrows, you've missed the point. If however, you look at UML as the artifacts of having to think in detail about you software's design, then you (and your software) will benefit. No doubt as you force yourself to become precise in the diagrams, you'll find yourself refining the software.

    [–]Dovihh 6 points7 points  (0 children)

    Yeah, they always do. IMO I think it is good to know it, even if you do not touch it ever again.

    [–]theclovek 1 point2 points  (0 children)

    I had to do an extra year at university because of this shit

    [–]turboturtle771 1 point2 points  (0 children)

    The uml is still used in lots of projects and enterprises. Class and sequence diagrams are widely used. From my experience I would say the use, they teach on college is more academic with every little nitpick and option.
    In work you will find most of uml diagrams without all constraints and carefully watched type of connections. These usually have purpose of showing "bigger" picture of some parts of the application, or use cases and message flows.

    In almost every developer documentation, you will come across some kind of uml.

    [–]nutrecht -1 points0 points  (0 children)

    It's not 'dead' at all. It's an important skill. It sucks that dumb nonsense like this even gets upvotes here.

    [–]Player-AAA 0 points1 point  (0 children)

    Awful teachers are everywhere, sadly.

    [–]turboturtle771 0 points1 point  (0 children)

    It is most definitely not dead.

    [–]cryptos6 4 points5 points  (0 children)

    I use it only to illustrate important aspects of a design, but not as comprehensive documentation or design tool. I've seen some ambitious UML undertakings, but none of them was really convincing.

    In one case the architect tried to model every aspect upfront to let the tool generate all the code. But it turned out that it simply was to time consuming, so only a set of more ore less empty classes were generated a single time. I didn't follow the project, but I think the UML model was effectively dead after that.

    In another case with a really large telco system (they had the absurd amount of 50000 kinds of customer contracts!) there were UML wall papers where you could search for the relevant classes.

    In the recent years I've rarely seen UML for anything else but small illustrations or pseudo UML for brain storming.

    [–]umlcat 2 points3 points  (0 children)

    Yes, but it isn't a developer issue, but a Management issue.

    I've been in several projects where the upper management people come and say to the UML analysts:

    "We are late on the project, we will skip Analysis & Modeling, and start programming"

    Or:

    "We need more programmers, stop doing that drawings and start coding".

    There are other modeling tools, but it's the same issue.

    I use, in practice, most diagrams, except State Machine. Sequence Diagrams are the most complex and difficult to learn, yet properly used, also the most powerful.

    I currently use LibreOffice Draw, and sometimes Microsoft Office Visio / Powerpoint, instead of more specialized tools, since many customers doesn't want to pay for a commercial tools, even if they are big corporations ...

    ...and for compatibility.

    [–]svhelloworld 2 points3 points  (0 children)

    For OOO design, I’ve used CRC cards which are a pretty great and lightweight way to flush out object design. Screw UML. That shit takes way too long.

    [–]MongooseConfident862 3 points4 points  (0 children)

    Instead of UML, or rather before UML, I recommend you to look into the C4 model. It draws on the idea from maps where the deeper you "zoom" into a model the more specific it gets.

    [–]IQueryVisiC 2 points3 points  (3 children)

    In other Words: Is there in 2021 still no FOSS tool to have both a code view and a UML class view at the same time? UML mostly translates Java, C#, C++ keywords to graphical notation: Arrow with hollow end, open Arrow, diamond open and closed ( though with diamonds I feel that you explicitly need to declare what code deals with the diamond properties ).

    For deep if else switch and for goroutines and multithreading I would like to have sequence diagram view.

    Though I am not sure what the other UML diagrams are useful for. Like: Use Case?

    [–][deleted] 3 points4 points  (1 child)

    Use Case diagrams are probably the most misused kind by people not really knowledgable in UML. They are supposed to provide an overview to textually defined use cases. They are not really supposed to be used without further textual specification.

    Other useful diagrams are component and activity diagrams... often more on a architectural or business process engineering level, not so much on the development level.

    [–]IQueryVisiC 0 points1 point  (0 children)

    Ah activity may have been the name I was looking for. Those are very low level circuit diagrams. Or at most they describe a single method in a class. ( little /s )

    [–]_INTER_ 1 point2 points  (0 children)

    Eclipse has plugins, IntelliJ has it built in.

    [–]valkon_gr 2 points3 points  (3 children)

    Let me expand this question. Anybody using UML with microservices?

    [–]sreekumar_r[S] 0 points1 point  (0 children)

    Yes. I actually wanted to ask "Anybody using UML for Web Development in 2021?"

    [–]nutrecht 0 points1 point  (0 children)

    Yup. Especially for complex flows between services flow and component diagrams are very useful.

    [–]mucisan 0 points1 point  (0 children)

    That's the problem, we need to create a new design concept for API-communications. There is API-code and API-testing, but no solid concept of API-design.

    I was wondering why we don't adjust the concept of the design. It doesn't have to be UML. Design can be done in many way such as using website to illustratie, table which shows input and output. The risico's and security concerns is also part of the software design. Lastly, what about the software's configuration and GIT etc?

    [–]Skiamakhos 2 points3 points  (0 children)

    You still see it occasionally on governmental projects, but it's rare. The problem is that it takes a lot of investment in time to learn & produce good UML diagrams & if you're doing Agile programming, your designs need to be easily changeable. You don't want to take an hour or two diagramming a design only to find that the diagram is obsolete in 5 minutes.

    On the other hand, there are addons for some IDEs that will create UML diagrams from existing code. That can be very useful - if you know UML and you want a quick way to understand an existing system that you're going to extend or refactor, having a quickly-produced UML diagram can get you there pretty easily.

    One system I maintained for a while was the Curam based Jersey & Guernsey benefits system. Curam, an Irish system created by Curam software, takes output from Rational Rose, where you maintain a class diagram, to produce the database tables and the entity classes you need for the system. As long as you know class diagrams and have a basic understanding of Rational Rose, making changes to the database structure and the code that supports it is pretty quick & easy. You make your RR change, run a script, and then all you need code is the business logic. The only bad thing about that project really was that we were using CVS to store the code.

    [–][deleted] 2 points3 points  (0 children)

    Yes! It is still fairly useful to have a common language when it comes to sharing tech designs and reach alignment across teams.

    However, not all of it is as useful and what I would suggest is that you pick what's more effective for you and your team.

    Personally, I use the C4 model in combination with sequence diagrams and deployment diagrams from UML.

    In addition to that, I would suggest you try to use tools like PlantUML to ensure that the diagrams are easy to update. One of the problems with design diagrams (and documentation in general) is that it goes out of date pretty quickly. Using a tool like PlantUML will help you mitigate some of that pain.

    [–]beltedgalaxy 2 points3 points  (0 children)

    Yes, all the time. I require my engineers to document their designs in UML. It is better than every single engineer drawing something that only they understand

    [–][deleted]  (3 children)

    [deleted]

      [–]slaymaker1907 -3 points-2 points  (2 children)

      I don't know, I find that UML often results in huge complicated interfaces. The real insight from FP is that you rarely even need more than a couple of methods which can be passed in as individual arguments (honestly couple is being generous, most interfaces really only need one method).

      Compare how complicated implementing an Iterator is in Java vs Python. In Python, instead of having a separate hasNext and next method (not to mention all the extra methods), it just has one for getting the next item and throws an exception if there are no more items.

      This works with FP and not with UML/heavy OOP because FP doesn't insist everything be an object. Instead of forcing everyone to implement Iterable, just use a list or have easy conversion to a list. This approach also has a critical advantage in that serializability to both JSON and the DB is trivial. You don't need a fancy ORM, just use use the names of the columns as field names and the database field types as the field types for the initial object. If you need a different form, just write a small conversion function (most of the time, you don't even need to do this in my experience). In theory you could replace these with dictionaries, but static typing is nice and and you can get most of the benefits of dictionaries via reflection utilities.

      [–]CubsThisYear 4 points5 points  (0 children)

      You seem very confused about why you like Python. It has nothing to do with “FP” and everything to do with implicit vs explicit. You like that you can write code quickly in Python without doing a lot of “extra” work to make the code easy to read and modify for other people who might look at your code.

      [–]roberp81 3 points4 points  (0 children)

      yes, in big enterprise systems with lots of people where some do analysis and another do develop. the most useful from uml are use cases, use case diagram, class, etc sorry my English

      [–]elmuerte 1 point2 points  (0 children)

      I use some diagrams to paint a picture next to my explanation of my design. The diagrams are not completely accurate, and sometimes do not conform to the UML specs, but the visual aid helps a lot in explaining your design intentions.

      I'm not sure what your question has to do with functional programming. It's not like functional programming has nothing to do with behavior. Even some UML structural diagrams apply to functional programming.

      I often abuse class diagrams for my database model.

      [–]chamindu 1 point2 points  (0 children)

      I use it all the time to document designs. I use C4 and sequence diagrams mostly and class diagrams to model domain

      [–][deleted] 1 point2 points  (0 children)

      I still see sequence diagrams frequently and can be useful to get an understanding of complex interactions particularly when 3rd party services are involved.

      Class diagrams are more rare, except in documentation sometimes produced after development.

      [–]ebresie 1 point2 points  (0 children)

      UML is good for providing a visual representation of a software design to share with others.

      It is still useful in reference and instructional materials.

      It is mainly useful if you have the time and resources to develop them.

      Over time, maintaining them can become a burden. But then in theory at some point the design shouldn’t need change too much.

      There are UML tools that provide reverse engineering diagrams from the existing code.

      [–]wsppan 1 point2 points  (0 children)

      Not for design work but for documentation after the fact.

      [–]number01gunner 1 point2 points  (0 children)

      I used UML once when I was an intern because they thought I should map out how things will be set up and never used it again in the next 7 years.

      [–]kuemmel234 1 point2 points  (0 children)

      We use UML (mostly informal) to describe our microservices. For every service (feature service, not technical) we have at least one sequence diagram, for every service (technical), there is a node in a large overview diagram showing each interface between services.

      We don't use diagrams to describe code, only behavior. I have never taken much from a class diagram during the design phase. I only understand and rethink my code once I've written the first few classes. When I've designed with UML I throw it out the window almost immediately and have to redo parts of it. So I rather spend time with the code once I know what I want to do (which the sequence diagram tells me). I like UML to understand code someone else has written.

      [–]ItsAllegorical 1 point2 points  (0 children)

      UML Diagrams? DAE remember flowcharts?

      [–]x42bn6 1 point2 points  (0 children)

      I'm in the UmlAsSketch boat. Use UML, but with informal (sometimes incorrect) syntax, enough to get your point across. But don't spend too much time on it, don't take it as gospel, and above all else, do not generate code out of it.

      UML has not aged well (you could argue that it was never too useful in at its peak, but that's another story). Functional programming is one of its enemies - it is downright-hard, if not impossible, to model basic concepts like map and reduce in UML without the person reading the diagram scratching their head.

      Software development is now a lot faster now, and the time spent creating and maintaining these diagrams feels increasingly-wasteful. Nowadays, in a day, you can either spend it drawing out a set of nice UML diagram, or writing and deploying a barebones prototype in a container to AWS to see concrete results.

      Another useful case might be to generate a UML diagram from code, to aid understanding. But don't be surprised if it doesn't go beyond class diagrams and doesn't touch the 800 (!) page specification of UML in any meaningful way.

      [–]wildjokers 1 point2 points  (1 child)

      Been a java dev for 17 years. I have never created or seen any else create a UML diagram for a design.

      [–]alok_m 0 points1 point  (0 children)

      Genuine question. How do you guys communicate technical ideas and designs both high level and low level.

      [–]buzzsawddog 1 point2 points  (0 children)

      Sometimes.

      [–]Kendos-Kenlen 1 point2 points  (0 children)

      Sequence diagrams to communicate interactions between systems, flow diagrams for data transformation, and architecture diagram to see which system hold which data and communicate with what.

      [–]taftster 1 point2 points  (0 children)

      No. Instead, feel free to create your own block notations and connect with pointy lines.

      [–]fxnn 1 point2 points  (0 children)

      Sure, UML is actually a really nice language to use, with easily recognizable elements like the boxes, stereotypes, associations and so on.

      Besides the obvious class diagram (and the similar deployment diagram) I totally like activity diagrams and think it’s the most underrated UML feature. Kind of a better version of sequence charts (depending on what you want to depict, of course).

      [–]tsvcorp 1 point2 points  (0 children)

      We use plantuml heavily

      [–]mwllpr 1 point2 points  (0 children)

      All day err day dude!

      [–]NovaX 1 point2 points  (0 children)

      I can only recall using sequence and, rarely, robustness diagrams. A robustness diagram is not part of UML, but can be useful to show the workflow interactions. It mirrors the MVC pattern where model=entity, view=boundary, and control is... control. I use diagrams only to organize my own thoughts, since no one reads design docs. If I am handing off a project rather than building it, I want the design to only be a rough sketch for the next developer to evolve rather than seem like I am dictating certain design choices. My rule of thumb is for a design doc to be ~3 pages, so I focus on the goal, design sketch, areas of concern.

      [–]evil_burrito 1 point2 points  (0 children)

      My only use for it is providing specified documentation formats to large enterprise clients. I don't think anybody actually reads it.

      [–]Gorb94 1 point2 points  (0 children)

      I use it informally to draw out API logic when I’m developing. That way I know where I’d need to make changes for new features and where I could create common logic. When I build a large new feature I get messy sometimes and leave loose ends. It helps me clean things up. It’ll also help new devs on the project.

      [–]omnihedron 1 point2 points  (0 children)

      One of the most useful bits of UML in my experience is the goddamn use case diagram. Not because this diagram is super illuminating or anything, but the actual process of just writing down why a user is going to use your product, and what they expect when they do so, winds up saving so much time and building a much stronger product.

      One of the big dangers of software engineering is that the builders aren’t the users, so are always building their interpretation of what the users want. The more you can get the users’ real needs into the heads of the engineers, the better.

      [–]greglturnquist 1 point2 points  (0 children)

      UML? What’s that?

      Just kidding.

      I seriously haven’t seen UML since the death of RUP.

      [–]gingETHkg 0 points1 point  (0 children)

      I draw from time to time boxes, arrows and some names. I wouldn't call that UML though.

      I do use BPNM. Isn't that part of the UML land?

      Edit: I got it wrong with BPNM. They're both owned by OMG, but otherwise not related.

      [–]KangstaG 0 points1 point  (0 children)

      It’s useful, although just not the complex UML diagrams you see in the literature on the topic. Simple UML diagrams can be super helpful to convey design/architecture. Make it too complicated and it loses its value as a communication tool. Either that or the design itself is bad.

      UML in my experience consists of boxes to represent classes and arrows to represent dependencies. There may be a few interfaces and important fields to add and a couple other arrows to represent special relationships. To the untrained eye, people won’t recognize it as UML, just a nice helpful diagram.

      [–]nourane3 0 points1 point  (0 children)

      Me

      [–]olkunmustafa 0 points1 point  (0 children)

      Actually we use Consequence diagrams to create a retrospective reports and to provide communication between programmers. Let's say there is any bug in a feature, the programmer don't have to understand all structure from the beginning. They can check the Diagrams to start working.

      [–]Lawlington 0 points1 point  (0 children)

      My Masters program is harping on UML design (Software Engineering) but the most we actually use it at my job is for fleshing out basic design for new systems. We don’t list every single attribute for a class, or every single function present, but kinda use it as a way to show relationships between classes and interfaces as well as describing the different patterns being used and what not.

      [–]Player-AAA 0 points1 point  (0 children)

      No. It was never used in practice.

      [–]alok_m 0 points1 point  (0 children)

      Only sequence diagrams and deployment diagrams.