Models made easy with the Doctrine ORM

Most web applications like to persist things, and as a web developer, you’re going to be spending a good portion of your development time pulling things in and out of databases. If you’ve worked on more than a couple of projects, you know how quickly interfacing with your database becomes a bore. Especially if you’re […]

Creating Forms with Symfony

As a web developer, forms will either be your favourite thing or the bane of your existence (and sometimes both). But the reality of the situation is that in order to get data from users into your application, you’re probably going to be using a lot of forms. Symfony, being the smart framework that it […]

Read More Comments Off on Creating Forms with Symfony

Symfony Does Validation

Since the beginning of computing the single most error-prone and unreliable component of the system has been something that isn’t really part of the system at all. Talk to anyone who’s worked in tech support and they’ll tell you the most common problem when troubleshooting computer malfunctions: operator error. Humans are fallible, especially so when […]

Read More Comments Off on Symfony Does Validation

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 […]

Read More Comments Off on Templating with Twig

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 […]

Read More Comments Off on Using Logical Names in Symfony

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 […]