How important is it to learn UML for an OO developer? [closed]

When studying OOP by myself I often encounter UML class diagrams. I understand them, but don’t completely know how to write them.

Meaning, I don’t entirely know what each kind of arrow means, and things like that.

1- How important is it to learn the ‘language’ of UML class diagrams? If it is something worth the time, could you forward me to a good, cohesive yet sufficient source?

2- If/when I do learn to draws UML class diagrams: Are all the little nuances important, or is it that every developer draws UML diagrams a little differently?

2

UML is just a communication tool. Knowing UML would help you to communicate with other persons who know it too, but only in that case.

  • If you work with peers who use UML daily, then go for it.

    UML is a great tool which helps communicating clearly, presenting things in a visual way and reducing verbosity.

    It’s like using technical terms with people who know them. Instead of saying:

    Here, you find the set of classes implement a common class and enable to create instances of that thing, which helps separating the code required to create instances from the business code itself.

    I can simply say:

    Here, you find the abstract factory and its concrete implementations.

  • If you’re the only one in your team to know what UML is about, learning UML more would only cause communication issues if other developers don’t want to learn it: when you will think the diagram you created is clear enough, your colleagues will understand this diagram in their own way, which has nothing to do with yours.

    It’s like using technical terms in a team of beginner programmers. You tell:

    In order to change the aspects of the price, you have to use the Change method overloads, but you can get the actual price by simply using the Price property. Note that tax is a readonly field.

    while they don’t know the difference between a method and a function nor between a property and a field, and they don’t know what is the usage of readonly keyword or what an overload is.

Also note that:

  • Different persons use different styles: MetaFight already commented on that above. See it like the RFC for e-mail addresses: it’s clear and unambiguous, and still, nearly everyone gets it wrong.

  • UML is difficult, and some parts are tricky enough to be ignored by many people. As an example, here’s my answer on Stack Overflow to a question where the actually accepted answer is plainly wrong.

There are two ways that UML can be used:

  1. To specify a system or module
  2. To describe a system or module

In the first case, the UML will likely be used to automatically generate code from, so you need to know enough of the details of UML that you get the expected results from your code generation tool.

In the second case, the UML diagrams are only used to support or illustrate a written or verbal explanation. In other words, they are used as a communication tool. In this case it does not matter that much if you get some of the details wrong (especially if you are present to clarify and questions that arise), as long as you get your meaning across.

4

UML has some nice parts, but it’s not good for everything. There are better notations to communicate certain information (e.g. high level software architecture). It can also be very complicated. I found that it’s often better to invent notation on-the-fly while drawing a diagram. If I carefully define meanings for my boxes and arrows, diagram is cleaner and more understandable than UML.

As for specifying program structure in UML, IMHO it’s a doubtful feature. I know that it can be amusing how well some tools work with class diagrams today, but what’s more usable are code generation and refactoring tools in modern IDEs. It’s a lot faster to write code of a class than to click it out in UML tool. Secondly, class diagrams that are used to generate code from (or are generated from code) are not usable as a documentation, because they contain too much detail and/or they describe too large parts of a system.

Answering your questions:

  1. I would say that it’s good to know UML. Not to use this language in particular, but to compare it to other notations and be able to choose/invent/mix proper form of communication for each situation. The best source is the official specification. Chapters 9 and 10 should be enough for a first grasp of UML.
  2. Nuances are important only if you want to generate code from UML.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật