Hi again, maybe my answer can be misleading. I don't really know the routing feature of symfony but I just looked at the link and they talk about ugly URLs, which should be avoided. Ugly URLs have never been a problem with tntnet since the user can use regular expressions to map anything to anything. Actually I wonder, why some framework use such strange routes.
In tntnet it is easy to map e.g. /article/57.html to the component "article" with the parameter "57". Tntnet mapping is much more flexible than just the url to a file like php. "/index.php" always points to the file "index.php" in the document root. Tntnet do not have that limitation. "/index.php" can call the component "php" with parameter "index" or component "foo" with parameter "bar" if you wish. Tommi Am 25.09.2013 23:50, schrieb Tommi Mäkitalo: > Hi, > > there is no routing system or link generating function in tntnet. Tntnet > just matches the urls using regular expressions to components. It is up > to you, how you do that. > > Tommi > > Am 25.09.2013 22:46, schrieb Olaf Radicke: >> Hi! >> >> Has the tntnet routing system a link generating function like >> Sysnfony2 (http://symfony.com/doc/current/book/routing.html)? >> Here the Synfony2 example... >> Twig: >> >> <a href="{{ path('blog_show', {'slug': 'my-blog-post'}) }}"> >> Read this blog post. >> </a> >> >> PHP: >> >> <a href="<?php echo $view['router']->generate('blog_show', array( >> 'slug' => 'my-blog-post', >> )) ?>"> >> Read this blog post. >> </a> >> >> Absolute URLs can also be generated. >> >> Twig: >> >> <a href="{{ url('blog_show', {'slug': 'my-blog-post'}) }}"> >> Read this blog post. >> </a> >> >> PHP: >> >> <a href="<?php echo $view['router']->generate('blog_show', array( >> 'slug' => 'my-blog-post', >> ), true) ?>"> >> Read this blog post. >> </a> >> >> >> >> >> -------------------|-------------------|-------------------|-------------------| >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk >> _______________________________________________ >> Tntnet-general mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/tntnet-general > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk > _______________________________________________ > Tntnet-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tntnet-general ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
