Well sean, I guess what I wanted to do was as follows :
I have an app with visualization, algorithms, databaes i/o, and data federation via rest. I wanted to "split" the modules up into
different submodules that different people can work on.
Normally, in java I might do this by writing some basic boiler plate java beans, and then writing interfaces for each module. Like for example.
Then, now that I know all my "Producers" can hook into my "Visualizers", I can start specifying implementation details, writing
unit tests, and making nice object apis that make it easy
to write code on the fly in an
IDE.
But I'm confused with the LISPy approach. I write something, like a map, and then I forget what was in the map... Then I send that map to another method, which takes a list, and that method crashes..... etc..... So I want to impose structure on my engineering process so that my code is self documenting and never gets out of control.
I'm not sure how to go about top-down design in the Clojure world ---- am I just thinking of things wrong ? Should I try to engineer my app from the bottom up ?
Every time I have a method with a multidimensional map of lists I cringe at the thought of "what if there is missing data in this map? what if there is a typo in the keys ? how will I know?"
The problem is that, I'm a bioinformatician - I have data structures which are complex semantically. For example, I want to suck a "protein structure" into clojure - which is composed of a "Structure" that has many "models", each of which has 100s of "amino acids", which have "atoms". Converting a data structure like this into a map would be scary --- I might forget about subtelties in my data model when inserting elements into the map..., due to the fact that Maps have no restrictions.
I firmly believe in maps and lists --- but how can I impose a "superstructure" on the methods in my clojure scripts so that they don't logically begin to deviate from one another as the source code base becomes larger ?