Fork me on GitHub
#keechma
<
2019-06-04
>
carkh07:06:01

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"

carkh07:06:15

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

carkh07:06:48

anyways, got it working as is, but it's a little bit hacky

carkh07:06:01

this is for an eql endpoint in the background page of the extension

mihaelkonjevic09:06:02

@carkh I’ve just released keechma-toolbox 0.1.24 that adds app-db as a third param to the loader fn

carkh09:06:02

that's some crazy level of support =)

😁 4
carkh10:06:29

works now with that new app-db, and i'll now be able to abstract the EQL stuff in a reusable namespace...Very nice

carkh10:06:54

i didn't know about that second parameter

mihaelkonjevic10:06:14

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

mihaelkonjevic10:06:51

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])

carkh10:06:04

ah ok i was wondering what the entry point was for that context param

carkh10:06:50

so i could have used that and establish the required context for my connect controller in the same way you do in

mihaelkonjevic10:06:13

yeah, that’s an option too

carkh10:06:41

well i have it working now so we'll call it good enough !

mihaelkonjevic10:06:01

btw, what are you building?

carkh10:06:45

that's a chrome extension that's supposed to be the entry point to a range of services for a customer

carkh10:06:07

i personally wouldn't do an extension, but yeah customers are what they are

carkh10:06:38

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

carkh10:06:26

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.

carkh10:06:01

fulcro looked nice but the abstraction is leaking all over the place

Ahmed Hassan20:06:09

What does it mean?

Ahmed Hassan21:06:04

@carkh How does it relates in the context of ClojureScript libraries, especially Fulcro?

carkh15:06:30

ok, i really wanted to like fulcro. but there is much magic going on there

carkh15:06:06

the abstraction is this : define queries for your components and it'll get all figured out for you

carkh15:06:38

and the fulcro people have been building upon this

carkh15:06:50

awesome tooling etc...

carkh15:06:04

much nice things to be said about it all

carkh15:06:49

but when you build an app with it, you start seeing places where you have to place dummy queries to make the machinery work

carkh15:06:55

and it's not quite clear where and why

carkh15:06:02

(to me at least)

carkh15:06:55

have a look at union queries for instance

carkh15:06:02

and routing built on top of that

carkh15:06:53

i'd say that's accidental complexity, at the service of the abstraction

carkh15:06:13

hence the leaking

carkh16:06:53

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.

carkh16:06:20

and it did indeed fix some of those

carkh16:06:50

but i feel there is much "complecting" going on there

carkh16:06:52

i feel bad saying those things when the fulcro people have been so very friendly and helpfull

carkh16:06:20

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

mihaelkonjevic10:06:26

yeah, I started with re-frame too, but event based frameworks feel too much like GOTO programming

carkh10:06:11

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

mihaelkonjevic10:06:17

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

carkh10:06:06

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

mihaelkonjevic10:06:15

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

carkh10:06:10

i'm ok with glue code, i'll do my own abstractions if need be. I like that i can understand what's going on (with your help)