Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

We are a small team of 5 developers and I'm looking for some great advices about how to document the software architecture and design. I'm going for the sweet spot, where the time invested pays off. I don't want to use more time documenting than necessary.

I'll quickly give you my thoughts.

What are the diagrams I should made? I'm thinking an overall diagram showing the various applications and services. And then some sequence diagrams showing the most important or complicated processes.

About the code it self, I really don't see much value in describing or making diagrams for the code outside the .cs files them self.

About text documents, I'm a bit uncertain about when to put down on paper. Most developers don't like to either write or read long documents.

share|improve this question
1  
Do not document it. Make it clear to understand. That should be enough. – Arnis L. Mar 11 '11 at 10:56
7  
^ You surely have never worked on a large scale project, or maybe even a medium one – Imran Omar Bukhsh Mar 11 '11 at 12:52
The simple answer to this question is that you document anything the team had to figure out. Anything that you cannot simply look at and understand, even that stuff, should be documented. In 5 years all 5 of you might be gone, the project might be 24 people strong, and they want to know the reason your design was choosen. – Ramhound Mar 11 '11 at 16:50

migrated from stackoverflow.com Mar 11 '11 at 12:27

5 Answers

What are the diagrams I should made? I'm thinking an overall diagram showing the various applications and services.

UML Component Diagram and Deployment diagrams for this are essential.

We use Argo UML. The price is right. It works well.

And then some sequence diagrams showing the most important or complicated processes.

Only if there is a proven need; i.e., someone asks for it.

About text documents, I'm a bit uncertain about when to put down on paper. Most developers don't like to either write or read long documents.

False. Developers don't like to read rambling, unfocused documents that lack concrete code examples. Hints: Focus. Code.

Another hint.

Avoid fancy desktop word-processing tools. Documentation -- like code -- should be plain text and checked into your code repository.

We use Python-based Sphinx and docutils. The documentation is written in RST (ReStructuredText) markup. Simple tools create HTML pages or LaTeX (and later PDF) from the simple RST source. Diagrams are exported as PNG's so that they're easily processed by other tools.

Since the documentation is plain text, it's easy to write, easy to edit, easy to copy and paste and (above all) under source code control along with everything else.

Another Hint.

To the extent possible, build documentation from the code.

Sphinx can pull comment blocks from the code. Since we use Python, it's trivial to produce a complete, good-looking and well-organized document from the code plus extra RST files.

The "extra" files are the use case overviews (for which no code can possibly convey the information), the architectural overviews, plus management overheads like the backlog, operational guide, administrative notes, etc.

share|improve this answer
what is your team size which is presently following this? – Aditya P Mar 11 '11 at 13:20
I wish I could vote again. – Erin Mar 11 '11 at 13:32
@AdityaGameProgrammer: about a dozen. Most of them prefer the PDF's, which are produced from LaTeX by a simple set of tools. Others use the HTML. Some use the original RST files. – S.Lott Mar 11 '11 at 13:40
1  
+1, though I disagree about argouml. Yes, it is free, but it is also out of data with regards to UML. I found it difficult to work with and the biggest deal breaker is lack of undo functionality; don't make any mistakes with delete if you use that. – jmq Mar 11 '11 at 13:52

I propose you use java-doc like comments in the code, whatever fits your language, e.g. JavaDoc, Doxygen, Sandcastle, jGrouseDoc...

UML tools like "Enterprise Architect" can generate class diagrams from your source code, and allow to to draw other diagrams relatively easily. Those tools are not prohibitively expensive anymore.

share|improve this answer

If all developers are on the same place, use Whiteboard to draw "Simple" diagrams. In your code, use comments, TODO and FIXME. You can also use a "Comment Parser" according to your code language : PHPDoc, JavaDoc, ...

I think it's a great start.

share|improve this answer

A good entry level solution for documentation/architecture is Enterprise Architect by Sparx Systems. It is not free, but it is not crazy expensive either.

I personally like to use Sybase PowerDesigner, but it is very expensive.

share|improve this answer

If you're interested in documenting how your class/classes work you could do a lot worse than use the Sandcastle Help File Builder.

*You simply need to enable XML Comments in whatever language you're building your application in, then when you compile you will see a myapplication.xml file that the shfb tool can use to build a .CHM file.

*Assuming of course you're using Visual Studio

share|improve this answer
Not a valid link any more =( – CodeBlend Jan 30 at 10:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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