[Rails-spinoffs] Re: Library Design Pattern

2008-06-11 Thread Jean-Philippe Encausse
I think we are agree > > Just to clarify, I am not saying "never dynamically add event > listeners", I'm just saying to keep an open mind and consider adding > them at the server in some cases instead of at the client. > I agree with you > > And by > "add them at the server" I am not saying the

[Rails-spinoffs] Re: Library Design Pattern

2008-06-11 Thread RobG
On Jun 11, 5:05 pm, "Jean-Philippe Encausse" <[EMAIL PROTECTED]> wrote: > To be sure I correctly understand your answer: Inline events are > events declared in the HTML ? > Click Me Yes. > or stuff No. > Well I agree this code is fast because it is directly bind to > function. But as you sai

[Rails-spinoffs] Re: Library Design Pattern

2008-06-11 Thread Jean-Philippe Encausse
To be sure I correctly understand your answer: Inline events are events declared in the HTML ? Click Me or stuff Well I agree this code is fast because it is directly bind to function. But as you said there is pros and cons. I wasn't thinking about this Web 0.1 feature because: 1. You mix HTML a

[Rails-spinoffs] Re: Library Design Pattern

2008-06-10 Thread kangax
There are no silver bullets. Both event delegation and inline event handlers have their pros and cons. The benefits of delegation could be easily outweighed by the time it takes to traverse a deep document (think frequent events like mousemove/over/out, window's "resize", etc.) Inline event handle

[Rails-spinoffs] Re: Library Design Pattern

2008-06-10 Thread RobG
On Jun 10, 7:07 pm, "Jean-Philippe Encausse" <[EMAIL PROTECTED]> wrote: > A little question about "Why designer of JavaScript library are > designing that way ?" > > 1. Context > > I'm developper on a CMS using Prototype/Scriptaculous as first > JavaScript layer. > - The CMS is using many librar