Filter events usually are not to catch errors neither global changes.
I think session creation/destroy/regeneration events might be quite
interesting in many cases and shouldn't be such a performance problem, you
don't create/destroy a session on every request while there already are
events that are dispatched on each request.
Don't know about performance, I think for a framework like symfony it's very
important to push on flexibility: if dispatching an event it's such a
performance problem one might think about enabling/disabling core (and
plugins) event notifications classes through configuration parameters (and
maybe have a lot of them not enabled by default).
e.g.
if (sfConfig::get('event_user'))
$dispatcher->notify(new sfEvent($this, 'user.change_authentication'),
array('authenticated', $this->authenticated));
My 2 cents.
Martino
On Fri, Dec 12, 2008 at 10:24 AM, Thomas Rabaix <[email protected]>wrote:
> I think it is more a problem of architecture design :
>
> - too more event notifications will slow down the framework
> - some features can be done by extending class with factory
>
> In your case that will lead on 2 ways of doing one thing. is that good ? If
> I think about maintainability I will say no, If I think about flexibility I
> will say yes.
>
> When you look to the event list from the documentation [1], events are used
> to catch error and global changes, nothing more.
>
> [1]
> http://www.symfony-project.org/book/1_2/17-Extending-Symfony#Built-In%20Events
>
> On Thu, Dec 11, 2008 at 4:47 PM, Bernhard Schussek <[email protected]>wrote:
>
>>
>> Hi Martino,
>>
>> I wonder why Fabien closed this ticket as well. After all, the event
>> handling subframework was created to allow for a dynamic injection of
>> features without having to build subclasses every time.
>>
>> Do events in there lead to performance or conceptual problems? Do they
>> encourage bad coding? Maybe Fabien can explain that briefly.
>>
>>
>> Bernhard
>>
>>
>>
>
>
> --
> Thomas Rabaix
> Internet Consultant
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---