[ANN] Plato 0.1.5

154 views
Skip to first unread message

Henrik

unread,
May 20, 2014, 10:44:59 AM5/20/14
to clojur...@googlegroups.com
Plato is a ClojureScript library for storing and restoring atom content to and from Local Storage.

https://github.com/eneroth/plato

The library grew out of a need to manage front end storage and persistence in apps based on Om and Reagent.

The arguably most useful function in the library is "keep-updated!", which watches an atom for changes, and selectively updates local storage to be consistent with the atom. The goal is for storage management to be handled separately from all other application logic and not become (as it was in my case anyway) interspersed with all other code.

The library is very alpha, so all forms of feedback are welcome. :-)


Henrik

Eduard Bondarenko

unread,
May 20, 2014, 10:48:45 AM5/20/14
to clojur...@googlegroups.com
There is similar library - https://github.com/alandipert/storage-atom

You can use clojure.diff to find differences -
http://clojuredocs.org/clojure_core/clojure.data/diff
Best regards,
Eduard
> --
> Note that posts from new members are moderated - please be patient with your first post.
> ---
> You received this message because you are subscribed to the Google Groups "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
> To post to this group, send email to clojur...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

Henrik Eneroth

unread,
May 20, 2014, 11:19:01 AM5/20/14
to clojur...@googlegroups.com
Thanks for the feedback, Eduardo!

Storage atom stores the entire atom on swap!, and it seemed to me that storing increments might be more frugal.

If you look at diff, you'll see that it diffs all collections, including vectors and so on. I only want to diff maps, everything else counts as a value, so the path of least resistance seemed to be to implement an algorithm that did exactly that and nothing else. Perhaps diff can be easily tweaked to achieve this, but I couldn't figure out how.


Best regards,

Henrik
> You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/LQDv7GAlKp8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.

Daniel Kersten

unread,
May 20, 2014, 11:33:55 AM5/20/14
to clojur...@googlegroups.com
This looks really useful, thanks! I was just thinking about local storage for my Om app :)
Reply all
Reply to author
Forward
0 new messages