This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Hello Does anyone have any experience with Re-Frame? I'm trying to learn it because I dig Reagent and think Re-Frame sounds like a neat way to structure a larger Reagent web-app. After having read some criticism of Angular becoming unwieldy when an app reaches a certain level of complexity, I'm wondering if there are any hidden drawbacks to Re-Frame's way of doing things. For example, I really like the prospect of a single source of truth (one atom that holds the frontend's in-memory "app-db) in respect to debugging, saving and recreating states and such, but I'm wondering if having a single source of truth means that there will be contention if you have many concurrent processes trying to reach the app-db. Not that I plan to do that, just wondering if there are drawbacks and that's the only possible example I could think of
@reefersleep: I’ve just started using Re-frame myself, so I guess I’m not qualified to answer. You should head over to the #C073DKH9P channel and ask there
@reefersleep: Since (for now) javascript runs in a single threaded scenario you don't have to worry so much about contention. Also, when and if does I'm sure the other clojure reference idioms (agents, refs etc..) will be ported to clojurescript.
@hkjels cheers, I'll go there
@bobby.harris: I'm actually not used to thinking about threading explicitly in applications, so I forgot to think of JavaScript that way.
@bobby.harris: what is the "when and if" you are referring to?
@hkjels: What's your experience like so far?
Well, there is the web workers part of html 5. Not sure how well supported it is.
I've written one reagent app for internal use. I'm planning on porting it to re-framed, which shouldn't be too much effort. Best practice for reagent includes having a single source of truth atom.... which i'm using.
Is there a known issue regarding #js
literals in go
blocks? I'm getting a strange warning. Here's a minimal reproduction: https://github.com/bhagany/go-literal
@reefersleep: Re-frame is great. I’m pretty sure it scales quite well also. In the wiki, there’s a post about how you could layout a larger app.
@hkjels: No problem I'll have to have a look at that.
@bhagany: The known issue with go
is that it is a macro that does a lot of magical rewriting of the code within the block. So you want to keep the code that is within the go
block to the bare minimum, specifically to avoid weird errors, which might be the case here.
@bobby.harris: I've done a single reagent app so far using only one atom, which worked great. Now I'm trying out another app, where I've felt compelled to use 3 so far. I'm going to "port" it to re-frame, and I don't think it'll be a problem to switch to one atom... But we shall see
what is the common name for a "web stack": like the libraries/technologies you use in every tier from front end to database. Web stack doesn't seem to cover it
@borkdude: hairball?
sometimes they say: full stack developer and then a list of libraries follow that you're supposed to know. What is the common name of a collection of such libs/tech
end-to-end maybe? Dunno - I don’t think there is standard terminology for this is there?
@meow: I understand that go
is complicated. Using #js
in a go
block seems like a pretty common case though. That reproduction is just a minimal case - the code that I'm actually interested in takes from a channel and does some js interop with the value it gets, so "take that out of the go
block" doesn't work
To be clear, I can work around this with clj->js
, which does work. I just want to know if I should expect #js
not to work, or if this is a legit bug.
@bhagany: there’s lot of bugs like this in cljs.core.async
due to it not using a standard analyzer and instead using a handrolled thing
@bhagany: you’ll want to look at JIRA. It’s probably worth opening an issue just so it’s verified when analysis is fixed. It’s unclear when that will be, the people that would normally work on it (like myself or Timothy Baldrige) are pretty tied up with other things.
@dnolen: Okay. I really should get in the habit of looking at JIRA. I'll search for dupes and file a ticket if I don't find any.
bhauman: Awesome Strange Loop talk! I’m loving devcards more and more. I’m looking forward to using it a lot more. I’ve been experimenting with it and it’s amazing how empowering the lab space is especially for new programmers; this idea that they can’t mess stuff up seems to be very powerful to help them feel confident enough to experiment
@bhagany: one alternative is to take your channel value and pass it to a function where you do the js interop stuff on it. The go
macro won't mess with the code in a called function. So that becomes your safety zone, so to speak.
I guess I was assuming that your real use-case might be bigger and that you wanted to not have to use clj->js
I’m trying to send FormData by using cljs-ajax as described in the README (https://github.com/JulianBirch/cljs-ajax) but I can’t figure out what I’m doing wrong! The request is never sent as a multipart/form-data. Anyone done this before?
@tskardal: I've tried it once, but then I discovered that the customer wanted to support IE9 also, so I just went for closure's iFrameIo and haven't really continued trying
@borkdude: thanks, I’ll have a look at that. I’m just messing around so IE support doesn’t matter
@dnolen: Is there a place where I could get more info on the core.async analyzer issue? I’m interested in taking a look at it, but couldn’t find that particular issue in JIRA.
@potetm: there isn’t anymore information than what I described. You will need to just read the core.async sources
@potetm: Here's the core.async issue. It had already been filed: http://dev.clojure.org/jira/browse/ASYNC-117