DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > UmlAsNotes

UmlAsNotes

Martin Fowler user avatar by
Martin Fowler
·
May. 01, 11 · Java Zone · Interview
Like (0)
Save
Tweet
5.13K Views

Join the DZone community and get the full member experience.

Join For Free

Yesterday I was poking around a code base, looking at the domain model part of the code. When exploring a code base, I like to take notes to help me remember what I'm learning. For some code bases, in particular domain models, I find it handy to sketch UML class diagrams.

UML has got rather out of fashion it seems. Although this isn't good for me financially, I can't say I'm displeased to see a lot of rather dodgy UMLisms going away. I continue to find it a useful tool, as I did that morning. As I worked my way around the code I would jot down classes and relationships, to see how the various classes played together.

I don't use "reverse-engineering" tools for this. Such tools run on your code base and automatically generate the class diagram. Although this is quite straight-forward to do technically, the result is rather useless. For me the value of a good diagram is that it highlights the important stuff, and ignores what's not. So I don't draw every class, let alone every relationship and feature. I decide to jot down things that I think are important to remember, particularly focusing on connections that often don't show up so much when you're looking at the code. I also only use a little of the endless class diagram syntax, and I'm not afraid of being sloppy with it. [1]

When I'm doing this speed is important. Currently my favorite tool for this kind of jotting is Umlet [2]. What I like about it is that most of what you capture goes in as text, using a wiki-ish markup. As a result I can quickly slap things in there, using the mouse just to broadly move things around as needed. It's a java program, so it suffers ugliness for availability.

When I'm doing this, I do the diagrams just for me; so I don't put effort into making them nice and clear for others. If I were to produce diagrams to help explain the code to others, I'd approach them differently. With notes I'm creating reminders for myself, with explanatory diagrams I'm trying to communicate different things to another audience. [3]

1: Actually I'm not very sloppy, because I know the syntax so well that I'm unconsciously pretty accurate. But the point is that people who are less familiar with the syntax shouldn't worry about it in this mode of working.

2: Yes that home page is littered with ads that make it hard to find the useful stuff.

3: I'd also use a different tool. If I'm going to publish a diagram, I use OmniGraffle. I've loved its diffuse shadows ever since DHH introduced it to me.

 

From http://martinfowler.com/bliki/UmlAsNotes.html

Diagram

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 8 Must-Have Project Reports You Can Use Today
  • What Emerging Technologies Make Data Centers More Energy Efficient?
  • Event-Driven Microservices?
  • Are All Kubernetes Ingresses the Same?

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo