This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-23
Channels
- # admin-announcements (1)
- # alda (1)
- # bangalore-clj (5)
- # beginners (17)
- # boot (392)
- # capetown (4)
- # cider (16)
- # cljs-dev (24)
- # cljsrn (33)
- # clojure (106)
- # clojure-berlin (1)
- # clojure-nl (1)
- # clojure-russia (168)
- # clojure-spec (85)
- # clojure-uk (137)
- # clojurescript (83)
- # clojutre (4)
- # component (10)
- # cursive (6)
- # datavis (9)
- # datomic (11)
- # defnpodcast (15)
- # dirac (4)
- # docker (1)
- # ethereum (1)
- # hoplon (27)
- # jobs (5)
- # jobs-rus (1)
- # lein-figwheel (2)
- # luminus (5)
- # off-topic (5)
- # om (13)
- # onyx (60)
- # parinfer (2)
- # planck (12)
- # proton (2)
- # re-frame (45)
- # rethinkdb (5)
- # ring-swagger (9)
- # spacemacs (9)
- # specter (49)
- # test-check (1)
- # untangled (104)
- # yada (10)
right now we have our system as an argument to most of our functions but we kind of need to move away from that
the component systems I have written tend to have the components as sort of top level entities, that depend on other components, and call functions passing those components the functions need as arguments
if you find yourself unable to write functions that don't take the whole system, you may have some layering / modularity issues. do you really have a system and a subsystem?
I have seen some people write programs assuming the whole system is being passed around everywhere, and maybe others have had some success with it. I view component as a tool for managing code bases and building things in a modular way, avoiding a big ball of functions calling functions all over the place. I think passing around the system runs counter to that because it breaks modularity, everything sees and has access to everything
Agree. We have a database subsystem and an environment subsystem and those operate purely in terms of a database component and an environment component respectively. Then we have an application component that has database and environment subcomponents and the application is passed in at the top-level but then only the relevant subcomponent is passed in to functions within the database subsystem or environment subsystem etc.
(we’re still migrating from a nasty global state everywhere legacy setup so our component usage is a bit piecemeal right now but slowly improving)
I have a web app using system. Each of the major route groups declares the components on which it depends, which are then threaded into the handlers along with the request.
A nice aspect of this is that the web app can function without a “complete” system; handlers without required dependencies automatically return 503 responses.