Object Oriented Design – How to Document in Text

documentationobject-oriented-designspecifications

For my next project, I'm looking to document my Object Oriented design in simple text before jumping the gun to code it up. I want to do this for two reasons.

  1. I want to give proper thought to my design and possibly revise it several times.
  2. I haven't exactly decided which language I want to implement my project in.

I'm looking for a convention to outline my design in simple text, instead of a UML diagram. I like the convenience of text. I can version control it and easily put in a blog or wiki to share it.

I am thinking something concise e.g. how you might code in Python. However, I want the representation to be language independent. I've looked around the internet but couldn't find anything. The closest would probably be how properties and methods are defined in the box representing a class in a UML Model.

Update:
I just wanted to clarify "in Text". My goal is to be able to outline the object model in a github wiki. I imagine it being kind of an open source design in addition to code. Thus, I can create a Wiki page per entity and identify the relationships using links and formatting etc. However, what I wanted suggestions on was how to outline the specification of an entity on its page.

Best Answer

You could write in HTML and use hyperlinks to express relationships between different classes. The problem, though, is that you can't see links. When documenting a design, the relationships are a big part of what you're trying to explain, so it won't do to make them invisible.

I'd suggest forgetting about plain text. Use HTML at a minimum, and don't be afraid to include pictures created in your favorite drawing/graphing tool. These may not be quite so universal as plain text, but you'll still be able to view them in any browser, and you should still be able to track them in a version control system just fine.

Related Topic