Archive by Author

Templating with Twig

Writing PHP and HTML together is sooo 1998 – which is why Symfony uses the Twig templating language by default. This means instead of writing ugly code like this: … we can use this: Much nicer. Twig not only allows us to use a “friendlier” syntax when writing our presentation layer code, but it also […]

Connecting everything together with Routing.yml

In this article we’re going to talk about Symfony’s routing system. Because you’ve read our comprehensive dissection, you already know that Symfony uses a front controller (you have read it… right?). This means that all URLs are serviced by a single script – typically contained in the “app.php” file. Obviously all our application logic, data […]

Using Logical Names in Symfony

The intention of Symfony is to make things easier for developers. One of the big pain points when developing large and complex web applications is keeping track of the physical location of classes, templates and assets within your project. Symfony helps us out here by providing logical names for controllers, templates and files. Why logical […]

Dissecting the Front Controller

In this article we’re going to get our hands dirty poking around inside the Symfony 2 front controller. Scalpels ready? What’s that? A question? What the hell is a front controller? Oh yeah – there is that minor detail… If you’ve worked with a few web applications in your time you’ve probably already encountered the […]