How to learn symfony?
Last week, I gave another symfony workshop with Fabien Potencier and Marc Hugon in Paris. It was a great pleasure and a great experience, especially given the quality of the audience (this last sentence should bring me some kind comments).
We had thirty attendees, and that’s a lot of people to train! Even if it was already the fourth time that I gave this particular training program, I still learned a lot from people’s reactions. Given the feedback we got, it looks like we managed to pass some parts of our knowledge and experience. But the amount of things to learn is just too much, so I think we should cut on some feature descriptions. The problem is, that every person comes with some special expectations about i18n, Ajax, security, form validation, etc. If we try to satisfy them all, three days is clearly not enough.
Symfony workshops try to focus on the practice rather than the theory. In order to avoid endless talks about features that people generally forget the minute the slide disappears, we make the attendees work. Everyone is supposed to bring a laptop with a LAMP stack already installed (and that never happens). The workshop starts by transforming a classical PHP application into a symfony one. I think this first exercise is the most satisfactory, because in about four hours people know all the basics about symfony applications.
Practice also makes the “why” of things clearer. Why do partial names start with an underscore? Why are fixture files in YAML? Why does the plugin system uses PEAR? Why sfGuard is a plugin and not a core feature? The answers to these questions come naturally after a few hours of coding symfony applications.
But there are many concepts behind symfony that need explanation, and practice cannot suffice. The problem is that once you start explaining ORM, MVC, DRY, and KISS, you need to perform really well to keep having people’s attention. I think that’s the hardest part of giving a training: not losing the audience when you have to explain something that requires at least ten minutes of talking. Especially when your voice vanishes from too much talking…
Anyway, this session helped us realize how to further improve the training material, and how to get people more ready for what they will learn. No doubt that the next sessions will be even better!
That being said, what do you think is the best way to learn symfony?

François, I work teaching technical courses and I agree with you about the endless learning experience that you get from people
I really think that you are right about minimizing theory and promoting real practice. In my humble opinion, the best way to learn symfony in three days is to build a complete symfony application:
First day: simple application to learn MVC, configuration (YAML), routing and other basic concepts.
Second day: add databases and forms (processing validation).
Third day: complete the application with plugins, Ajax, security and i18n.
I think the best way to learn symfony is first acquiring the Symfony “Bonnes Pratiques”. (sorry for my poor english)
Instead of starting to write code, a developer needs to break with classical php developpement.
The first thing then is understanding the interest of coding without never (~) writing sql code.
The second is understanding MVC. It’s very important to know the interests of MVC architecture.
How to write code with symfony comes in a third time. All is done to make developement simple, sure and easy to maintain.
This is a guarantee that developpers, once acquired basis, will learn quickly how to use symfony and get all the advantages of the framework.
-a december session’s attendee-
Hi,
I started learning Symfony with askeet, much self-discipline assumed, it was a great tutorial until it became deprecated.
It’s quite hard for beginners to get started with symfony. However, once having understood MVC it becomes much clearer.
I liked the blog screencast a lot, it gives a short introduction - and I like your approch, to transform an existing application into a symfony project.
What about tutorials like “Developing a deli.cio.us clone in 24 hours with Symfony”?
Or a quick tutorial on how you started developping your most recent public development : Motilee! (i must admit i already asked for this on the annoucement post of the 29th of november! ;))
I’d love to attend one of these session anyway!
I agree that having complete tutorials updated is very important. The askeet being the main example. It’s a great example on how to build a good app with symfony (complete app, not just a crud or admin like the first day tutorial). But being outdated discourages new users (I’ve been helping a new user with this).
I think Askeet is a very good idea. With this, everyone interested on symfony can perform at his own rythm.
Maybe, it will be good to have three levels of tutorials with askeet :
beginner : ( installing symfony, understanding MVC pattern, ORM, modules, actions )
medium : I18N, using et writing plugins,…
expert : cache optimization, customing generator…
And I’m agree with Joaquin, tutorials don’t be outdated. It loose beginners.
– François, tu es un très bon pédagogue, tout ce que tu as évoqué lors de la formation était très clair et surtout précis — Franck S.
I think a key part of teaching symfony is making sure the audience first understands how symfony can simplify web-development. Writing static pages is much simpler at first thought and it’s easy to be scared away by the potential complexity of symfony. But, symfony is only complex if you make it complex. Getting someone to make this first leap in agreeing that a framework is useful is often the most difficult.
I think the best way for learning anything in some kind of programming is learning by doing.
You, as a teacher, give the attendees a project of a website. What you want to do with this website etc.
Then you start with the basic things and go further and further with admin generator, i18n, ajax, until all of the attendees have a website which isn’t too complicated but also not too simple, so they can look at this project when they do the next project..
Any chances to see some pictures of the workshop ?
[…] a great post about this workshop and the way to learn symfony, you can also read François’s last blog post […]
@Pascal: I didn’t take some myself, but Fabien published his pictures on the symfony weblog:
http://www.symfony-project.org/blog/2007/12/13/symfony-workshop-wrap-up
[…] How to learn symfony? […]
[…] How to learn symfony? […]
Hello François,
I have been learning symfony on my own over the last few months, and I gained the most from reading your book, especially the 3 chapters on M/V/C. Thank you for writing such great documentation!
I’ve also taken one course on teaching adults. Lectures (the traditional way of delivering hunks of content) naturally lose people, especially after 20 minutes. Some tricks to work around that issue are:
use assigned reading to deliver the hunks. Encourage reading by tricks like:
break the lecture content into smaller (10-15 minute) chunks, and alternate it with very short discussion questions or exercises to clarify each chunk.
One of the fundamental things you have to do when teaching adults is to get them to take responsibility for what they learn– to be active learners. It sounds like you’re doing that with the hands-on work, so you might be able to find ways to do it more with the concept/content stuff too.