Nothing prevent you from doing a renderDefault() function In the $this->container->get('request')->get('_controller') variable
You have within the same string the bundle name the controller name and the action name. COil 2010/12/1 Lideln <lid...@gmail.com> > Hi Fabien, > > Thank you for your answers. > You are right that I don't know of all the tickets that were opened > for symfony1, and I should keep that in mind. > Regarding Symfony2, I was just giving my fresh (and, should I say > again, humble) feedback of a new user of Symfony2. > It's true that in Symfony2 some things are longer to write than > before, but that is just detail compared to the great new features it > provides. > I won't argue with you about that, because as you told me, this is for > the need of flexibility (although I still think that some shortcuts > are possible and would relieve developpers a bit). > > I'm retrieving information all over the web in order to widen my > knownledge of Symfony2 (although I know it will change slightly) and > practise, as you advised me to, on a small project. > > Just like so many people, I can't wait to get the stable release at > last ! > > I'm glad I can thank you in person for all the amazing work you did > with Symfony (among other things). > Thank you ! > > It's true that my small feedback was a point of detail compared to the > complexity of the framework. > > Thanks from Paris, > > Renaud > > > On 1 déc, 07:52, Fabien Potencier <fabien.potenc...@symfony- > project.com> wrote: > > On 11/29/10 7:22 PM, Lideln wrote: > > > > > Hi there, > > > > > I just read the entire Symfony 2 quick tour. I found many useful and > > > smart things, which are great ! > > > But I also wondered about a few (tiny) things, that are more about > > > ease of use. > > > Hope I get an answer here :) > > > > The answer: Explicit is always better than implicit. In symfony1, we > > have all kind of things that happen automagically. You know them and you > > know how they, but a newcomer can just scratch its head to understand > > what's going on. Futhermore, when you want to escape from the default > > behavior, it's a bit more complex; also because you now have a different > > way of doing things. Symfony2 basically solves these problems. > > > > > 1) I'm sorry that we lost the ability to "return nothing" in the > > > action (which would default to a specific template). Instead now, we > > > have to write "$this->render('HelloBundle:Hello:index', array('name' > > > => $name));", which is long and useless. I think the SF1.4 way was > > > quicker. (but I am definitely fond of the arguments-like new way of > > > dealing parameters :) ) > > > > Probably quicker to write but definitely less flexible. In Symfony2, > > there is only one way, and the one true way is as flexible as you might > > need. > > > > > 2) Can't we define layouts in view.yml anymore ? Do we have to use "<? > > > php $view->extend('HelloBundle::layout') ?>" in every single view ? > > > > The layout belongs to the template. So, it's much better now. Also, just > > have a look at all the problems we have we the default layout in > > symfony1 (and all the related tickets we just cannot solve easily). As > > before, there is now only one way to define a layout. It is much easier > > to learn and to master. > > > > > 3) Is there a shortcut like "$view->render('hello')" (that would > > > default the namespace to the current one, if not specified) ? > > > > Again, in symfony1, the fact that a partial for instance tries to > > automatically determines the context falls apart pretty quickly (just > > try that with a partial used in two different modules). > > > > > These are just tiny thoughts (and other ones that were even tinier so > > > I did not bother to write them), but as much as I find the SF2 > > > features awesome, I find it a bit more complex to use (but maybe it's > > > also a question of habit). > > > > When learning Symfony2, you need to put symfony1 aside and more > > importantly, you need to use Symfony2 for a small project to understand > > all the benefits of the new approach. > > > > Thanks for the feedback, > > Fabien> Thank you for your answers :) > > > > > A humble SF user. > > -- > 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 users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- 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 users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en