Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding Data-centric app and object composition in Clojure

I've recently been much impressed by the work of Chris Granger and his Light Table. This question is not about light table though, but more about the "BOT" architecture he described using in his blog post "The IDE as a value" : http://www.chris-granger.com/2013/01/24/the-ide-as-data/

Now, I'm pretty new to clojure but would like to better explore this way of programming: Behavior, Object, Tag:

(behavior* :read-only
                    :triggers #{:init}
                    :reaction (fn [this]
                           (set-options this {:readOnly "nocursor"})))

(object* :notifier
         :triggers [:notifo.click :notifo.timeout]
         :behaviors [:remove-on-timeout :on-click-rem!]
         :init (fn [this]
                 [:ul#notifos
                   (map-bound (partial notifo this) notifos)]))

(object/tag-behaviors :editor.markdown [:eval-on-change :set-wrap])

Where can I find clojure code that uses that style and those composition principles?

like image 804
leontalbot Avatar asked May 21 '13 02:05

leontalbot


1 Answers

BOT sounds like the Light Table "proprietary" flavor of Entity-Component-System (ECS) architecture. I would start with wikipedia entry and then go to this post with code examples in ActionScript (we are in the world of games).

There are also some examples in the Clojure context.

like image 149
Grzegorz Luczywo Avatar answered Oct 30 '22 05:10

Grzegorz Luczywo