Forest header image

Symfony Finland
Random things on PHP, Symfony and web development

Learn Symfony with Silex, the Demo App and the Best Practices Book

The Symfony Full Stack framework is a fully featured platform for you to create your custom applications on top of. If you have experience with it, the structure logical and straightforward.

But as always, nobody is born an expert. The Symfony Community offers good tools to getting started with it. Here is one approach that could get you on the right path.

So you've heard Symfony is great and you want to learn it. You head over to and hit a wall of text with terms things like Symfony Components, Full Stack Framework, name dropping Drupal 8, etc. is nothing like the homepage of Sinatra with a hello world sample and installation instruction on the frontpage. The Silex site is like that, but you know nothing about it. You get frustrated and move forward, maybe.

An important factor defining whether an Open Source project gains significant traction or not is the ease of use. Your software might be very elegant, but if it's hard to get started with it - the chances people will pick it up are slim. Unless of course your application does something truly unique.

Laravel and WordPress are examples of PHP projects that have thrived due to the instant gratification of picking up a tool and becoming instantly productive. This might lead to some pretty significant implications in the long run, but about that you can read about in another article on this site.

Learning Symfony

The Symfony Community acknowledges that Developer Experience (DX) is paramount. They have invested in superb documentation, excellent debugging tools and a level of stability unheard of in most PHP projects. But while these are very important things, they don't add to the feeling of instant satisfaction many developers are looking for. Only later will you learn to appreciate bundles that let you share your translations and routes with your front end, for example.

If you get started with the Symfony Framework and a complex product such as eZ Platform, you'll be bombarded with a mixed set of terms from the framework and ones from the application domain. This will leave you with knowledge (and questions) about things like Bundles, Dependency Injection, URL matching, Chained Routing, URL aliases, Content Objects, Roles, Policies, Locations, Firewalls, etc.

You know the lingo now, yay. But it's hard to tell where the framework ends and eZ Platform begins. The above approach might yield result if you have experienced devs available to answer "stupid questions" or if you're a seasoned developer yourself. Likely you'll end up in the gentle state of FUCK THIS SYMFONY AND EZ SUXXORZ.

So if you're new to the Symfony Framework, eZ Publish (legacy version of eZ Platform), or both, learning and understanding it can be an overwhelming experience. In my experience a good approach to learning about Symfony and what it really is could be the following:

  1. Install Silex (a microframework) and create a few hello world apps with it, based on Silex Skeleton
  2. Sleep
  3. Graduate to the Symfony Full Stack by studying and modifying the Symfony Demo Application
  4. Sleep
  5. Read the Symfony Best Practices book and reflect on the demo application
  6. Sleep
  7. Start working on a real project like eZ Platform or ORO CRM

I know this cycle might be a luxury you simply don't have it. In a perfect world you would follow this and it would work for you. If you don't, go ahead an read this article about Symfony in a nutshell.

Written by Jani Tarvainen on Thursday July 30, 2015
Permalink - Tags: symfony, php, silex, framework, tutorial, ezplatform

« Dear PHP, the times are a-changin' - My Job Went to GoogleBot (and all I wrote was this lousy article) »