This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-04
Channels
- # announcements (4)
- # beginners (110)
- # boot (6)
- # calva (23)
- # cider (14)
- # cljdoc (5)
- # cljs-dev (50)
- # cljsrn (3)
- # clojure (105)
- # clojure-europe (3)
- # clojure-italy (46)
- # clojure-nl (6)
- # clojure-spec (19)
- # clojure-sweden (1)
- # clojure-uk (78)
- # clojurescript (66)
- # core-async (5)
- # cursive (19)
- # data-science (16)
- # datomic (3)
- # events (2)
- # fulcro (11)
- # hoplon (53)
- # jobs (4)
- # jobs-discuss (6)
- # keechma (51)
- # leiningen (3)
- # nrepl (25)
- # off-topic (95)
- # parinfer (8)
- # precept (1)
- # reitit (61)
- # remote-jobs (1)
- # rewrite-clj (75)
- # ring-swagger (2)
- # robots (3)
- # shadow-cljs (43)
- # tools-deps (28)
- # vim (2)
for my use case the loader function of a datasource feels like its requests parameter is inside out. I have to look inside a possible first request to get to the controller... I feel like a loader function will always pertain to a single end-point, or at the least that one could make a closure creating function to produce several loader functions of a same "type"
i'm sure this works for you, but i can't help but think an additional app-db parameter to the loader function would be helpfull
@carkh I’ve just released keechma-toolbox 0.1.24 that adds app-db as a third param to the loader fn
works now with that new app-db, and i'll now be able to abstract the EQL stuff in a reusable namespace...Very nice
second parameter is the context
- that is something you can set on the app level (in app-definition under the :context
key). We use it when we have “singletons” in the app that need to be shared, for instance - Firebase connection, or if you’re using SSR, you could have different loaders - XHR loader for the web context and db loader for the server side context
you can also access it on the controller level - via (controller/context context)
or as a third param in the pipelines -> (pipeline! [value app-db context])
so i could have used that and establish the required context for my connect controller in the same way you do in
yeah, that’s an option too
btw, what are you building?
that's a chrome extension that's supposed to be the entry point to a range of services for a customer
i'll maybe put the learned knowledge to use in a tagged bookmarks extension, always wanted to have that and the current offering is subpar
i've been on the lookout for a web framework for cljs, have some experience with re-frame, but it's way too verbose and the jumping around drives me crazy.
What does it mean?
@carkh How does it relates in the context of ClojureScript libraries, especially Fulcro?
the abstraction is this : define queries for your components and it'll get all figured out for you
but when you build an app with it, you start seeing places where you have to place dummy queries to make the machinery work
i had hoped that fulcro had fixed some of the problems i percieved in om-next. again a very personal thing, maybe my brain isn't wired for that way of doing things.
i feel bad saying those things when the fulcro people have been so very friendly and helpfull
End of the day, I can confidently say that fulcro is well suited to make a successful app. you'll have to fiddle with those queries a little bit but it all works well enough
yeah, I started with re-frame too, but event based frameworks feel too much like GOTO programming
what i would really like is a fullly reactive thing like precept, but maintained and evolving... keechma looks like it strikes a good balance between features and down to earth results
I’ve used pub-sub in JavaScriptMVC some 10-ish years ago, and it was problematic then too, especially when you have defined order between event handlers. In my experience it’s much better to centralize logic (like with dataloader) and to keep components as pure as possible
in the end what we're doing is producing a dom, just building strings is what we did 10 years ago and that should be simple, understandable
another thing is - I’m a working in an agency setting, we can’t be to opinionated because each client has it’s own set of requirements, so Keechma is always developed in a way that is as general as possible. It does require some more glue code, but at least it’s open enough to implement anything