[tg-trunk] Re: Proposal: Events

2006-04-24 Thread Kevin Dangoor

On 4/23/06, Jeff Watkins [EMAIL PROTECTED] wrote:
 Yep. And you'd never understand *why* your login was rejected.

I've debugged generic functions before and they're not that bad. A
little logging and you can see exactly what's being called, and
RuleDispatch is not ambiguous when it comes to deciding what to call.

On the general topic of events:

1) Not in 1.0 - 1.0 is frozen.

2) There are already capable event packages in Python (Zope 3 has one
that can likely be pulled out and may already be an egg, there's also
PyDispatcher which has the unfortunate bit of having a top level
package called dispatch just like RuleDispatch)

3) Take a look at the hooks and tools system that Bob Brewer proposed
(and implemented) for CP3:

http://www.aminus.org/blogs/index.php/fumanchu/2006/04/23/cherrypy_3_directions

RhubarbTart is not a given for First Class, particularly now when we
haven't even merged anything from the branch to the trunk.

It's better to not start using another new abstraction if we already
have useful abstractions available.

Events may be a good thing, but I'd like that to get seriously tossed
around a bit.

Kevin

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears Trunk group.
To post to this group, send email to turbogears-trunk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk
-~--~~~~--~~--~--~---



[tg-trunk] Re: Proposal: Events

2006-04-24 Thread [EMAIL PROTECTED]


Kevin Dangoor wrote:
 2) There are already capable event packages in Python (Zope 3 has one
 that can likely be pulled out and may already be an egg, there's also
 PyDispatcher which has the unfortunate bit of having a top level
 package called dispatch just like RuleDispatch)

The original author of PyDispatcher has created a new project called
Louie recently as a result of our customization of it for Schevo's
change notification mechanisms -- see http://pylouie.org/.  It is
easy_install-able, does not have naming conflicts, and includes some
minor changes/cleanups, as well as a plugin mechanism that is still in
its early stages.

I personally find the Louie/PyDispatcher API very easy to use, but I
also find generic functions equally as easy in other aspects.

One idea I've toyed with, but that no-one has started yet, is making
Louie depending on RuleDispatch, and implement the Louie API as an
alternative syntax to RuleDispatch.

But I digress... I mostly wanted to make you aware of the recent
lineage of PyDispatcher :)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears Trunk group.
To post to this group, send email to turbogears-trunk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk
-~--~~~~--~~--~--~---



[tg-trunk] Re: Proposal: Events

2006-04-24 Thread Jeff Watkins
On 24 Apr, 2006, at 10:30 am, Kevin Dangoor wrote:Events may be a good thing, but I'd like that to get seriously tossed around a bit. Hence the proposal.I think it's a good idea to look at the other packages -- which I hadn't run into yet as I've no experience with Zope or PyDispatch. -- Jeff Watkinshttp://newburyportion.com/"Daddy, I want a purple iMac. And I want ice cream!"-- Unidentified 7-year-old to his father. 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups TurboGears Trunk group.  To post to this group, send email to turbogears-trunk@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/turbogears-trunk  -~--~~~~--~~--~--~---



[tg-trunk] Re: Proposal: Events

2006-04-23 Thread Jorge Godoy

Em Domingo 23 Abril 2006 09:49, Jeff Watkins escreveu:

 Well, my turn to confess: I haven't been following FirstClass at all.

Me neither, but I believe this is a big change to go into 1.0 and this is why 
I asked.  If it is not all that big, then I retreat my questioning :-)

 I'd envisioned the event mechanism to be a generic system for
 components to use to alert application code to certain actions. I
 like the idea that my application code could register to be alerted
 just before (or after) an HTTP request completes (just an example) or
 before a Visit is created.

Sure!  I also see some useful things with it.  I was not questioning that just 
how and when would it be made available. :-)

I still don't grasp WSGI and I should allocate some time to learn it as I 
envision that it would make a lot of things easier to me from what I've been 
reading, but... :-(

-- 
Jorge Godoy  [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears Trunk group.
To post to this group, send email to turbogears-trunk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk
-~--~~~~--~~--~--~---



[tg-trunk] Re: Proposal: Events

2006-04-23 Thread Jeff Watkins
Yep. And you'd never understand *why* your login was rejected.On 23 Apr, 2006, at 1:57 pm, Simon Belak wrote:Were Identity based on generic functions (as was proposed using a very  similar use case), one would get a very capable event system for free. ;)  --Jeff Watkinshttp://newburyportion.com/"Just because you have the right to do something, doesn't mean it's the right thing to do."-- Fred Friendly, former president of CBS News 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups TurboGears Trunk group.  To post to this group, send email to turbogears-trunk@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/turbogears-trunk  -~--~~~~--~~--~--~---



[tg-trunk] Re: Proposal: Events

2006-04-22 Thread Jorge Godoy

Em Sábado 22 Abril 2006 10:49, Jeff Watkins escreveu:

 Furthermore, if we were to allow cancelling an event, this would
 allow someone to write a plug-in that tracked the number of times a
 particular visitor has attempted to log in and lock the account if
 too many failures have occurred. And other wacky stuff.

 Any thoughts?

I confess I haven't delved into details of your code but I have one question: 
how would that plug into FirstClass (I believe that would be for post 1.0, so 
FirstClass)?  Isn't it easier to get those things there?

Also, I saw a decorator in your code that didn't use turbogears.decorator (or 
so I had the impression), shouldn't we always use it unless it is strictly 
required that we don't?  It would make the code clearer and more direct into 
what we want instead of having to code the decorator itself as well... 

Should an event system really be in TG Core instead of an external plugin?

-- 
Jorge Godoy  [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears Trunk group.
To post to this group, send email to turbogears-trunk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk
-~--~~~~--~~--~--~---



[tg-trunk] Re: Proposal: Events

2006-04-22 Thread Jorge Godoy

Em Sábado 22 Abril 2006 11:16, Jorge Godoy escreveu:

 Also, I saw a decorator in your code that didn't use turbogears.decorator

I read it wrong.  You used it.  Sorry.

-- 
Jorge Godoy  [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears Trunk group.
To post to this group, send email to turbogears-trunk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk
-~--~~~~--~~--~--~---