On 24.03.2010, at 13:33, Jordi Boggiano wrote:

> On 24.03.2010 13:09, Lukas Kahwe Smith wrote:
>> This ties into my attempt to diverse this thread onto the question of why 
>> controllers are not managed by the service container [1]. In this case the 
>> issue of service vs. parameter would be solved and would reduce 
>> introspection magic to method level injection.

> On the other hand, maybe the routing could be reworked if we defined all
> controllers in the SC, you could have for example:
> 
> blog:
>  pattern:  /blog/
>  defaults: { _service: blogController, _action: list }
> 
> And then in SC:
> 
> blogController:
>  class: BlogBundle\ViewController
>  parameters:
>    db: @db
> 
> etc.
> 
> Now the benefit is that you can change the entire blog stuff at once
> from the SC and also don't have class names mixed into the routing config.

Reusing parameters between services and controllers also becomes easier. Again 
I also see this as quite empowering when dealing with controllers provided by 
bundles, this might even make it inevitable that we move controllers to the SC.

In okapi2 we have made it a best practice to have a separate SC config file for 
all the commands (action classes or controllers in symfony lingo)

> The big downside is that you force everyone to understand how the SC
> works at least at a basic level, I'm not sure if we can afford that or not.

Like I said in the my previous post, we do not necessarily need to drop the 
simplified configs, they can however just generate SC configurations:
http://groups.google.com/group/symfony-devs/msg/f35af2429c195eee

regards,
Lukas Kahwe Smith
[email protected]



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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

To unsubscribe from this group, send email to 
symfony-devs+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to