Fork me on GitHub

Just watched your Clojure/North talk @wilkerlucio. Good stuff! It's nice to hear someone confirming that the ideas I've been working with (wrapping core libraries, env flow) are not crazy and others are doing it as well. The one thing I constantly go back and forth on is the naming conventions for keywords. Based on your pedestal example:

{:io.pedestal/request-headers ...
 :io.pedestal/request-body ...
 :io.pedestal/response-status ...}


{:io.pedestal.request/headers ...
 :io.pedestal.request/body ...
 :io.pedestal.response/status ...}
Have you got any insights or wisdom to share about keyword namespacing conventions? Lingering questions: • Do you prefer application or domain entity nses? • Should namespaces be real nses (so you can ::prefix/* ) or should we not care? • What about storing to external dbs with limited semantics? (Are you using edn-json everywhere?) • What about datomic enum conventions? (i.e. :some.entity.category/enum )


hello @U05476190, glad you enjoyed the talk 🙂 I think this is a question about how to model the system, and there is no one answer. I'm not 100% sure either, and takes trial and error until you get confidence. What I can tell you from my experience is that I try to keep things flat, IME flat is simpler, and when makes sense, I do it. In the pedestal example, when I modelled that I considered the HTTP as the domain boundary of that namespace, and I only though hard enough for a demo in a presentation, altough I played with both examples you sent when modeling fetch API, and I like the flat (first, less namespaces) better. Another important thing to take in account, I personally miss Clojure having the feature for lightweight aliases, there is a pending issue on Jira for that: I believe this feature would make easy enough so we were set free to make more namespaces, than my opinion may change, but right now doing the flat is just more convenient


abou the lingering questions: Do you prefer application or domain entity nses? - I dont see a difference, the application must have a domain, and then model around the domain Should namespaces be real nses (so you can ::prefix/* ) or should we not care? - they dont need to be, sometimes I create then for convenience, we can hope for What about datomic enum conventions? (i.e. :some.entity.category/enum ) - I like that, and again CLJ-2123 could make then accessible