<fkchang>
elia: adambeynon_ u guys do much pubsub/observer pattern stuff in opal? I stumbled on https://github.com/mroderick/PubSubJS and think I'd probably write something like it for opal, but figured u guys might've already written something like it. I remember adambeynon_ talkinb about something like it in trying to do something live binding like for vienna or something
<adambeynon_>
fkchang: Vienna has two kinds - Eventable, which is similar to backbone style events
<adambeynon_>
User.on(:add) { … }
<adambeynon_>
and Observable, which watches for attribute changes on objects
<adambeynon_>
user.add_observer(:name) { … }
<fkchang>
adambeynon_: usable and/or extractable outside of vienna?
<adambeynon_>
fkchang: of course. both are very small modules
<adambeynon_>
~20 lines
e_dub has quit [Quit: e_dub]
<adambeynon_>
add_observer basically overrides the setter method on the object, to notify listeners for future changes
<adambeynon_>
(20 lines might have been a little optimistic ;)
<adambeynon_>
fkchang: btw, rubyfire (the vienna rewrite) uses something similar to Volt
<adambeynon_>
which I believe is based on meteors obseravble style
mraudio_106 has left #opal [#opal]
<fkchang>
adambeynon_: cool, I think a general pub sub similar to the js lib might be appropriate, might be overkill to use as the backend part of eventable/observable. Contemplating whether I'd actually use the hierarchical addressing the js lib has. I perceive duplicated functionality, but don't necessarily think a common core applies