The value of any given diagram really depends on what level of
understanding you are trying to communicate.  A simple block diagram
that outlines the major components of the system can be helpful to
describe the general structure of an app.  In Clojure this would
probably correspond roughly to the namespace organization.  It's
fairly typical to have a namespace comprised of mostly functions with
a small set of mutable references at the top, so at some level you
still have the encapsulation and modularization typical in OO
packages, modules, or classes.  Look at how C or Fortran libraries are
documented though.  It's more about functionality and less about
relationships, because the relationships aren't normally complicated
enough to warrant diagrams.

I think one of the reasons something like a UML diagram can be helpful
in a large OO application is because you tend to get these convoluted
class relationships that become harder and harder to keep organized in
your mind.  Class relations can represent both data dependencies like
entity relationships, and also functional dependencies coming from
derivation, extension or whatever.  In a Clojure program you get
simpler data structures with less complicated relationships, and so
I'm not convinced that something like UML is really that useful.  At a
lower level you can document the important data structures and look at
the use, require, and import statements to determine the functional
dependencies.  Maybe an interesting diagram could be created with that
data plus the function comments.

My guess is that besides documenting functions themselves, finding
ways to document the data structures that are returned by functions,
and then aggregating call-graph data to show broader functional
dependencies will go a long way towards describing larger Clojure
systems.

-Jeff

On May 11, 10:18 am, Donell Jones <alliwantisca...@googlemail.com>
wrote:
> Hi Team,
> I am really interested in functional programming. But I am asking
> myself, what if the project get bigger, like the software Runa realise
> with Clojure. In OOP we got diagrams like UML to visualise this. But
> what can we do in FP ? Are there any diagrams that can be used to
> explain things ?
>
> I think this is very important when it comes to documentation.
>
> Thanks for your help!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to