Hey prototype and scriptaculous fans: I''ve changed actsAsDecorator() into actsAsAspect(). Along the way, I''ve fixed a few bugs and added new features. However, what''s surprising is that the code is even smaller than it was before. I''m kinda happy about that, but more importantly... If you were using actsAsDecorator() before, please use actsAsAspect() instead (because it works a lot better). Here is the blog post: http://beppu.lbox.org/articles/2006/09/06/actsasaspect Enjoy, --beppu PS: I''m normally against copy-and-paste coding, but for actsAsAspect(), I think it''s an appropriate distribution mechanism. ;-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
"703 bytes vs. AspectJ’s 11062114 bytes" Hear, hear! :) -Thomas Am 06.09.2006 um 22:50 schrieb John Beppu:> Hey prototype and scriptaculous fans: > > I''ve changed actsAsDecorator() into actsAsAspect(). Along the way, > I''ve fixed a few bugs and added new features. However, what''s > surprising is that the code is even smaller than it was before. > I''m kinda happy about that, but more importantly... If you were > using actsAsDecorator() before, please use actsAsAspect() instead > (because it works a lot better). > > Here is the blog post: > http://beppu.lbox.org/articles/2006/09/06/actsasaspect > > Enjoy, > --beppu > > PS: I''m normally against copy-and-paste coding, but for actsAsAspect > (), I think it''s an appropriate distribution mechanism. ;-) > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
Thomas Fuchs wrote:>"703 bytes vs. AspectJ’s 11062114 bytes" > >Hear, hear! :) > >-Thomas > >You should compare against dojo''s event.connect (and kwConnect) too. (not just size, but api, etc.) That thing is doing a *lot* of work, but that''s what it will inevitably get compared to. Sam (-i-am) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
I read through http://dojotoolkit.org/docs/dojo_event_system.html and they provide a lot. I like my API a lot better, but that kind of thing is a matter of taste. (I''m sure they would like their own API a lot better than they like mine.) I''ll definitely have to download their source for further study, though. (I''ve been ignoring dojo for the most part, because Prototype and jQuery suit me more.) ---- One thing that I like is that they can disconnect() whatever they attach with dojo.event.connect(). With actsAsAspect(), disconnection is impossible due to the way I''m using closures. However, if I were to go back to my old way of keeping track of before and after functions in arrays, disconnection would become possible again. I''m not sure if I want to go there, yet, though. I was kind of getting a kick out of the fact that my work was small enough to copy-and-paste. However, if I were to become more serious about it, I don''t think I''d be able to do that anymore. We''ll see what happens. If there''s a genuine need for extra functionality, changes will be made. And even though I jokingly called this an "arms race", I don''t really want to try to try to match some library feature-for-feature just for the sake of being the most powerful, because the last thing I want is for actsAsAspect() to be bloated. I''ve got a lot to learn about AOP as well, so my current judgement on the matter is not as good as it could be. On 9/6/06, Sam Foster <sam-WNdku5qRq3FWk0Htik3J/w@public.gmane.org> wrote:> > > Thomas Fuchs wrote: > > >"703 bytes vs. AspectJ''s 11062114 bytes" > > > >Hear, hear! :) > > > >-Thomas > > > > > You should compare against dojo''s event.connect (and kwConnect) too. > (not just size, but api, etc.) That thing is doing a *lot* of work, but > that''s what it will inevitably get compared to. > > Sam (-i-am) > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
One thing that really surprised me about the AOP community was how big the Java contingent was. In my mind, it seems like Java would be one of the hardest languages to implement AOP in. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
John Beppu wrote:> I read through http://dojotoolkit.org/docs/dojo_event_system.html and > they provide a lot. I like my API a lot better, but that kind of > thing is a matter of taste. (I''m sure they would like their own API a > lot better than they like mine.) I''ll definitely have to download > their source for further study, though. (I''ve been ignoring dojo for > the most part, because Prototype and jQuery suit me more.) >I cant actually disagree with you there (though I''m working with dojo daily). event.connect is so overloaded I find it impossible to remember what arguments go where and when. I may even make a wrapper for event.connect to provide myself a more mnemonic api like what you''ve got going on. You can only ignore it for so long though. I suffered grass-is-greener syndrome for months while we built a widget system, de-coupled event system, and other basics with Prototype/Scriptaculous. The next project I swung all the way over to Dojo. Now, I''m settling in the middle and trying to keep abreast of all them as much as I can, to pick and choose the best ideas and tools for the job.> One thing that I like is that they can disconnect() whatever they > attach with dojo.event.connect(). With actsAsAspect(), disconnection > is impossible due to the way I''m using closures. However, if I were > to go back to my old way of keeping track of before and after > functions in arrays, disconnection would become possible again. I''m > not sure if I want to go there, yet, though.I would suspect that the ability to disconnect would become important if you did a lot of unloading and replacing DOM branches with events bound to elements within them. Could get leaky otherwise, though that''s just a hunch.> We''ll see what happens. If there''s a genuine need for extra > functionality, changes will be made. And even though I jokingly > called this an "arms race", I don''t really want to try to try to match > some library feature-for-feature just for the sake of being the most > powerful, because the last thing I want is for actsAsAspect() to be > bloated. I''ve got a lot to learn about AOP as well, so my current > judgement on the matter is not as good as it could be.Are you writing a library or scratching your own itch? I''ve found occassional use for the aspect-like features of dojo.event.connect. Mostly its a useful get-out, when you need a quick way to boostrap some last minute extras - like profiling and troubleshooting code, or auxilary code like a throbber or something that responds to events in the UI - without the fore-planning necessary to use a solution like event topics/pub-sub. I understand there''s a methodology and philosophy that makes that kind of thing more central. It can stand in line behind the 100 other things I''ve got to learn this year :) Sam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---