Documenting Clojure Design without UML

157 views
Skip to first unread message

Adam Markham

unread,
Jan 19, 2012, 8:12:58 AM1/19/12
to Clojure
I have always used UML to document the design of software projects I
have worked on in object-oriented languages. I am now working on a
Clojure project and am required to document the design so anyone
reading these documents will understand the design of the software.

I was wondering if there is anything like UML that can be applied to
Clojure for these purposes?

It is quite important that I document the design of the software on
paper so any suggestions on doing this would be great.

Thanks,

Adam

Paulo Pinto

unread,
Jan 20, 2012, 2:50:08 PM1/20/12
to Clojure
Hi,

I think your problem is more general than just Clojure. Actually there
was a long
discussion on the "Functional Programming" group over at LinkedIn
about applying
UML to functional languages.

The general consensus is that you can somehow adapt UML concepts to
describe
data structures and execution flow, but there isn't an established way
how to do it.

--
Paulo

Manuel Paccagnella

unread,
Jan 29, 2012, 9:43:05 AM1/29/12
to clo...@googlegroups.com

Hi Adam,

Disclaiment: I just started learning Clojure and FP, here are just my
two cents.

First of all: how is structured an application written in functional
style? From the top of my mind I would say:

- Data structures
- Functions that operates on data structures and compose other functions
- Libraries/namespaces

A documentation of the kind you are searching for IMHO should take into
account all these factors. In particular, visualizing data structures
and relationships between functions would be quite useful in my opinion.

What I have in my mind now is a set of boxes (namespaces) that contains
perhaps other boxes (data structures) and ellipses (functions) connected
with some types of arrows between them (composition, higher-order
functions, etc) and with data structures.

In short: data, functions and relationships between them.

As far as I know, there isn't any standardized graphical notation a-la
UML to express the structure of functional programs. I would say: don't
be shy, just invent some convention and use it to *communicate* the
design to others :)

Manuel Paccagnella

Reply all
Reply to author
Forward
0 new messages