mercredi 25 mars 2015

Clojure NameSpace Design


I am new to Clojure and trying to get a handle on organizing a project's namespaces. I am working on a solver for the knapsack problem. Currently, I have broken the modules into files, but everything lives in one namespace: my-project-name.core. I am using load to manage access across files and it seems like a bit of a kludge. I've drawn a digram of how I think I want the various parts to interface:


architectural diagram


My goal is to be able to work on each of the nodes in the diagram independently. I am trying to come up with a strategy for rational namespace design somewhere between everything in one and each in its own.


In particular I want to be able to swap out the solver and estimating components since these are the most tunable.





Aucun commentaire:

Enregistrer un commentaire