hi all, during developing you encounter several problems. one that frequently occurs to me while working on rather complex user interfaces is that all you on page modules (tag clouds, friend lists, you name it..) are to an extend interlocked with each other. the more complex your ui gets the more each module has to know about the others and the more hard it gets to maintain your code. on most window manager systems like gnome and the like (even windows) you have a messaging mechanism for that. objects can send out a message (ie: ''deleted a file'') and other objects can subscribe to such a message. this very much works like the javascript Event object and the prototype observing. so i thought why not extend the Event object even more and include the possibility to register new events and throw them, and extend the methods observe() and stopObserving() to enable client modules to observe these new custom events. I know that the dojo toolkit has a similar thing going. but so far dojo didn''t feel like the right tool for the job for me (no flamewars please). attached to this mail you can find my solution and a (admittedly very) brief demo. some more ''documentation'' is in the head comment of the event.js file. I hope you agree with me that this is a simple, clean and good solution to my problem. if you do I would very much appreciate to share this code with the prototype community and hereby ask for the inclusion of the attached code. cheers /christian --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve
2007-Feb-05 10:37 UTC
Re: Prototype proposal: Custom Events / Messaging
Hello Christian, Thanks for your proposal. However, it would be better posted on the Prototype-Core group, which is where evolutions of Prototype are discussed. Spinoffs is mostly for informal tech support on the libs. There are actually works in the pipe already, mostly by Andrew Dupont, on a custom event mechanism for Prototype, which is very similar in concept to what you suggest. So far, it''s been mostly discussed in Prototype Core''s Basecamp home (which is private to Core members), but it will likely surface on the Prototype Core list at some point, allowing for external review. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---