reactive framework for c2-cljs

97 views
Skip to first unread message

hank

unread,
Jul 27, 2012, 5:53:33 AM7/27/12
to c2-...@googlegroups.com
FYI there is a discussion going on on the "Clojure Dev" google groups about creating a "reactive programming" framework for ClojureScript UIs:  https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/LzVu4dIvOrg

The idea expands on the existing "Reflex" mechanism underlying C2-cljs by constructing a graph of dependencies that maps UI elements to data values -- possibly via a number of intermediate nodes -- and uses it to determine and perform the necessary minimum of recomputation when data values change. See e.g. Wikipedia on reactive programming: http://en.wikipedia.org/wiki/Reactive_programming Currently Reflex recomputes the whole graph when one of its dependencies has changed.

Taking this further, implementing functions that not only map the current value of a data item to a UI item but sequences of values of data would allow implementing complex UI behaviors by composing a number of simple behaviors. A simple example would be a toggle button that switches a UI element on and off -- first click on, second click off. To implement a sense of "first" and "second" some history of events would need to be available.

If this is of interest to anyone on this list reply here or on the "Clojure Dev" list. Posting rights on "Clojure Dev" are handled rather restrictively so that may not work for you.

Reply all
Reply to author
Forward
0 new messages