Hi,

Here is the log of the chatroom at http://farsides.com/chat/ (or 
irc://irc.freenode.net/#farsides) for the 2011-07-16.


2011-07-16 00:11:45+0000 antoviaque (antoviaque) is now online
2011-07-16 01:54:01+0000 mtyaka (mtyaka) is now online
2011-07-16 10:22:57+0000 <dachary> hop
2011-07-16 10:38:07+0000 tartarugafeliz (tartarugafeliz) is now online
2011-07-16 11:29:38+0000 arbrandes (arbrandes) is now online
2011-07-16 11:55:47+0000 tartarugafeliz (tartarugafeliz) is now online
2011-07-16 12:06:21+0000 tempuramerino (tempuramerino) is now online
2011-07-16 12:24:52+0000 arbrandes (arbrandes) is now online
2011-07-16 13:03:26+0000 <arbrandes> dachary sama, you around?
2011-07-16 14:15:04+0000 arbrandes (arbrandes) is now online
2011-07-16 15:05:33+0000 mtyaka (mtyaka) is now online
2011-07-16 15:58:16+0000 tartarugafeliz (tartarugafeliz) is now online
2011-07-16 17:54:33+0000 <dachary> arbrandes: yes
2011-07-16 17:54:56+0000 <arbrandes> dachary, hi man, how's the move going?
2011-07-16 17:58:39+0000 <dachary> good, thanks :-)
2011-07-16 17:59:33+0000 <arbrandes> I have an architecture question regarding 
#167, which I'm tackling.  To be able to notify the analytics tracker of "page" 
changes in the cardstories client, I'm currently trying a publish/subscribe 
approach using jquery's bind()/trigger(), so that the analytics code can be on 
a separate plugin.
2011-07-16 17:59:42+0000 <arbrandes> dachary, does that sound good to you? ^
2011-07-16 17:59:55+0000 * dachary thinking
2011-07-16 18:00:35+0000 <arbrandes> The alternative would be to simply do it 
all inside jquery.cardstories, but that felt a little ... dirty, to me. :)
2011-07-16 18:05:19+0000 <dachary> it takes me a little time because I need to 
recall discussion / memories a few years back
2011-07-16 18:05:50+0000 <arbrandes> no rush, I'm just checking if I'm barking 
up the wrong tree. :)
2011-07-16 18:06:19+0000 <dachary> I think not
2011-07-16 18:10:00+0000 <dachary> here is a thought. In the cardstories 
client, there is an architectural fact that is likely to stay and that is very 
visible in the code organisation. There are states and each state is 
implemented by a function. There are functions that merely route to the 
appropriate function who is in charge of displaying the state.
2011-07-16 18:10:43+0000 <arbrandes> Yup, so I've seen
2011-07-16 18:10:57+0000 <dachary> This state oriented architecture means that 
you can expect to find a function that will implement the state and figure out 
all there is to know about the state by reading the function. Which is 
convenient to separate tasks.
2011-07-16 18:11:48+0000 <dachary> It also means that if we agree to call a 
function whenever a state is about to be displayed, that convention is likely 
to catch all possible states and also likely to resist future changes.
2011-07-16 18:12:12+0000 <arbrandes> What I've started doing is setting up 
calling a new "notify_active()" after each "set_active()" (which always happens 
in these state functions).  This notify_active() will then simply 
$(root).trigger() appropriately, and elsewhere in the codebase a plugin can 
catch that.
2011-07-16 18:12:35+0000 <dachary> In other words, it may be a solution to add 
a "state_change" function at the beginning of each state function and have it 
call the analytics code.
2011-07-16 18:12:57+0000 <dachary> It seems we're on the same line.
2011-07-16 18:14:26+0000 <arbrandes> Yup :) Would you rather have a direct call 
to the analytics code (say, "owa_notify"), or are you ok with the trigger 
thing?  this makes it a bit more abstract, in that cardstories does not need to 
know what brand of analytics is being used.
2011-07-16 18:14:39+0000 <arbrandes> this = trigger/bind
2011-07-16 18:19:05+0000 <dachary> I think a little abstraction would be 
better. Although it is only required for owa, it is a light weight abstraction 
and I'm comfortable with the idea. 
2011-07-16 18:19:57+0000 <dachary> I usually don't like abstractions that are 
used only by one piece of code. But this one is really light and does not 
strike me as over-designing the architecture ;-)
2011-07-16 18:20:37+0000 <arbrandes> ok, thanks dachary.  Sorry to interrupt on 
your saturday. :) 
2011-07-16 18:20:54+0000 <dachary> always a pleasure discussing with you. 
2011-07-16 18:21:09+0000 <arbrandes> Likewise! :)
2011-07-16 18:21:15+0000 <dachary> and my schedule is bizarre this week anyway 
;-)
2011-07-16 18:22:06+0000 <arbrandes> Hehehe, yeah, I saw your post.  Moving 
always messes with the program, no matter how careful you are. :)
2011-07-16 18:23:18+0000 MCMic (MCMic) is now online
2011-07-16 18:36:47+0000 MCMic (MCMic) is now offline
_______________________________________________
Farsides mailing list - [email protected]

Wiki:  http://farsides.com/
List:  http://farsides.com/ml/
Forum: http://farsides.com/forum/
Ideas: http://farsides.com/ideas/
Chat:  http://farsides.com/chat/

Reply via email to