This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-25
Channels
- # babashka (77)
- # beginners (107)
- # calva (20)
- # cider (2)
- # clj-kondo (7)
- # clojure (63)
- # clojure-australia (2)
- # clojure-europe (75)
- # clojure-germany (10)
- # clojure-italy (3)
- # clojure-nl (3)
- # clojure-serbia (15)
- # clojure-spain (2)
- # clojure-uk (24)
- # clojurescript (54)
- # clojureverse-ops (3)
- # cursive (20)
- # datahike (4)
- # datalog (5)
- # datascript (8)
- # datomic (13)
- # emacs (2)
- # fulcro (1)
- # graalvm (2)
- # instaparse (1)
- # jobs (2)
- # luminus (1)
- # malli (7)
- # off-topic (28)
- # pathom (6)
- # pedestal (2)
- # re-frame (5)
- # reagent (9)
- # remote-jobs (4)
- # rewrite-clj (4)
- # ring (19)
- # shadow-cljs (2)
- # spacemacs (2)
- # sql (10)
- # tools-deps (6)
- # xtdb (12)
I tend to partition my web apps loosely into “handlers”, “model”, and “views” just because I find it a good visual reminder of what sort of code should or should not live in each type of thing — keep web/request stuff out of the model; keep pure business logic out of the handlers; keep view-related concerns together. But as I start a new web app, I tend to have one big handler.clj
ns until I have enough code and enough common business logic to warrant refactoring out to multiple handlers, a model section full of business-related namespaces (although a lot of our business logic is already in a shared “library”), and view-specific stuff like how to render templates and header/footer wrappers and JS/CSS stuff etc.
(that said, some of our simpler web apps have just two namespaces: the “handler” stuff — all of the logic of the app including rendering — and the “bootstrap” stuff — initialize everything, define routing, logging/middleware setup)
Now I'm like trying to convince people to use less and less namespaces everyday, and they're like showing scaffold of folders on a application 😢
without even knowing what it'll be in the future
I have a list of arbitrary long-running commands (listed in a file) I want to start/stop at once, and restart any of them if the process crash. (they are actually a bunch of kubernetes port-forward, that sometimes close for network/other reasons). Any existent tool that would help me? I’m thinking of making a quick babashka script otherwise.
Hmm true, and it would give me an excuse to learn systemd. I’ll check this link: https://wiki.archlinux.org/index.php/systemd/User
After googling a bit, it seems that while systemd allows to start multiple process in one unit, it can’t track them individually (to restart them in crash for example)
It’d be annoying to edit multiple files, as the list of commands changes often. In the same google search I found http://supervisord.org/introduction.html that seems to handle that use case
Any redis (carmine) guys?
Can anyone remind me of the term (which I'm forgetting, and it's proving difficult to look up) for the "syndrome", I think it's called, in which a person with expertise is repeatedly able to identify substantial errors in journalistic reporting on their field, yet continues to believe those same outlets when reporting on things outside that field?
Is there a good reference for organizational/architectural patterns in code that would describe things like what is an Entity vs Model vs ViewModel? What constitutes a Service or a View? etc.
If you're looking for resources that cover UI design, here are some of the resources I used to write https://blog.phronemophobic.com/what-is-a-user-interface.html • https://martinfowler.com/eaaDev/uiArchs.html • http://day8.github.io/re-frame/a-loop/ • https://dennisreimann.de/articles/elm-architecture-overview.html • https://reactjs.org/docs/thinking-in-react.html • https://blog.codinghorror.com/understanding-model-view-controller/ • https://softwareengineering.stackexchange.com/questions/127624/what-is-mvc-really • https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller • https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Model-View-Controller/Model-View-Controller.html
the classic of course is the gang of four design patterns book
(and the many follow ups and responses)
https://en.wikipedia.org/wiki/Architectural_pattern is a pretty good overview of the various names of architectural patterns and links to definitions of specific ones.
Maybe not exactly addressing your question, but this also might be of interest: http://mishadoff.com/blog/clojure-design-patterns/
Also the C2 wiki is a huge resource (fun fact: this is the original wikiwikiweb. the mother of all wikis) https://wiki.c2.com/?CategorySoftwareArchitecture