This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-04
Channels
- # aatree (5)
- # admin-announcements (37)
- # alda (1)
- # announcements (4)
- # architecture (1)
- # aws (3)
- # beginners (82)
- # boot (230)
- # braid-chat (14)
- # cider (48)
- # cljs-dev (8)
- # cljsrn (31)
- # clojars (47)
- # clojure (72)
- # clojure-austin (2)
- # clojure-russia (396)
- # clojurescript (72)
- # community-development (3)
- # component (6)
- # core-async (6)
- # cursive (26)
- # datomic (42)
- # emacs (6)
- # events (35)
- # hoplon (57)
- # immutant (3)
- # jobs (2)
- # jobs-discuss (10)
- # ldnclj (16)
- # luminus (2)
- # off-topic (50)
- # om (181)
- # parinfer (285)
- # proton (68)
- # re-frame (19)
- # reagent (2)
- # ring-swagger (23)
- # yada (36)
i feel like I’m getting better at hoplon in the front end after practicing a bit
anyone have suggestions for a persistent backend for app state?
that works well for hoplon with or without castra?
i see datascript mentioned a lot
is that something worth following up?
i guess what i’m trying to do, is have state that I can save and load somewhere
and be able to do undo/redo too
my state will probably be either pretty nested
or split across a lot of cells
whatever is best supported by available tools
if you have something with a lot of nesting and highly dynamic data - I'd look at datascript
well, what i will have is a bunch of page elements that are essentially little forms/inputs
that are repetetive
and need to have all their values aggregated into something that can be computed globally
so yeah, either nested
or lots of little things with predictable structure that i can vacuum up
if there’s a tool (like datascript) that naturally lends itself to the nested approach
then i guess that helps me decide how to tackle this
is there a way to grab the whole datascript state and stick it somewhere on the backend?
@thedavidmeister: check out storage-atom, you can save an atom to a file in clj
Wildly inefficient and problematic but sometimes just what you need. Err: enduro is the project
@alandipert: i got storage-atom working for localstorage
it’s cool
i guess i’m worried about what happens with that approach if you have network issues or whatever
Firebase is another cool thing, at least for hobby projects
i keep hearing about that
haven’t used it
It's hosted db you can interact with via their JS api
So you don't need to host your own backend. They also handle auth
how does storage atom deal with networking issues?
i feel comfortable that localstorage won’t “go away” and mess up your state
less so about remote stuff
The issues will be the same regardless of db choice
@alandipert: did you do any hoplon apps with datascript?
oh I see you only swap! or reset! when someone clicks “save” or whatever
@dm3 only experiments
i currently have my localstorage storage-atom just tracking state in real time
i think i’m going to have to do some more reading
enduro looks like it would struggle if i had 2 or more users
if I understand what is being said under “resource management"
or even just 2 or more states for a single user
ultimate goal is that you could log in as a user, see a list of saved states and load it up
My intermediate-term goal is to have a very simple database that runs both in the browser and the server.
--and I found some very nice code in javelin/core.cljs that does exactly what I need: deftype Ce;;
[ANN] Dewdrop (in aatree/aautil 0.0.4) now supports lens-view.
Functions which work with lens-view are the standard @, reset! and swap!.
The lens demo in hoplon/demos now employs lens-view.
See https://github.com/hoplon/demos/blob/master/lens/src/hl/index.cljs.hl#L10-L16
Thanks to @micha for pointing out the inadequacies of the previous release.