My brother recently tried to get up and running with Symfony. His theory was that learning Symfony (out of all the available PHP frameworks) seemed like a good idea, being that he could ask me questions as and when he got stuck.
I anticipated that he would have problems with the “typical” problem areas:
- Database interaction
And maybe, given it is his first time using the MVC pattern, some of the concepts around that area, too.
What I didn’t anticipate was that he couldn’t even get started.
He experienced so many issues with installing Symfony, that after a couple of hours effort – with essentially nothing to show for it – he gave up.
I could sense his frustration.
Here’s a guy who spends all day working with PHP (mainly WordPress I believe), and after 8+ hours at his desk, he comes home, grabs a bite to eat, and tries to improve his dev chops by learning about Symfony.
For most of us, time is extremely limited, and spending two hours sat at home after doing 8 or more at your desk is a pretty big ask.
To come away with nothing (except a bad experience) is, understandably, enough to put him off.
What follows may appear heretical:
I suggested he try Laravel.
The next evening he did, and was up and running in less than ten minutes.
This got me to wondering just how many others are suffering from a similar fate?
I am well aware that Symfony has a steep learning curve. Laravel does too, if you are brand new to modern PHP practices.
What I hadn’t factored in was just how difficult it is to get the “hello, world” of Symfony up and running.
Coincidentally, around the same time I got an email from a site member (thank you Parminder) stating the following:
Please note that I am not a php developer and I haven’t dabbled at all with it beyond setting up the server to work with the react/redux/sagas project on your site. I think it would be useful to include instructions in the intro to the course on setting up the server for someone who is not familiar with Symfony/backend and just wants to focus on the React/Redux material – this would probably help with course uptake I think.
And in response to my reply, Parminder also shared the following:
It did take me a while to set up the Symfony server for the course on my mac and it no doubt is a barrier for people taking up your course, which is a shame because your material is very good.
Ok, so after I had told Mr Worf to stand down from Red Alert, I started to give this problem some serious thought.
Firstly, up until very recently I had not envisaged anyone who isn’t a PHP developer would join the site.
I’ve been proven wrong on this point.
Secondly, I have seemingly forgotten to cover a fundamental part of working with Symfony – getting set up.
I’m going to remedy this with a forthcoming video series. I will try and cover set up from the three major operating system variants – Windows, Mac, and Linux.
I will offer some suggestions as to how I’ve worked, and touch upon Vagrant, Ansible, and Docker.
Another really good suggestion that I’ve had from Parminder is to spin up a standalone server which none-PHP devs, or those who do not wish to spend the time doing all the setup themselves, can access my server instead. This would likely be on a 24 hour cronjob to reset the DB, or similar. This is something I will implement moving forwards.
It pains me that Symfony is potentially losing new devs at the very top of the funnel. There’s so much good stuff to be had from using the Symfony framework. I’m not just talking about developer productivity, but the wider benefits like:
- a well paying job
- an enjoyable and (generally) intuitive stack to work from
- a community filled with incredibly smart and friendly folk
I’ve said before that learning Symfony has changed my life (and yes, for the better :)), and it’s part of my mission to share that same joy with you.
I’d love to hear your experiences of what it was like getting started with Symfony.
Was there a specific issue you hit upon?
Has this process improved as you’ve used Symfony more and more, or is the pain still there?
Please hit reply and let me know.
This week saw three new videos added to the site.
We are coming to the end of the first phase of the Wallpaper Website.
Firstly we start by cleaning up our project.
Swapping and changing between branches in order to see how to write code with and without tests starts off fairly easy, but as the underlying design diverges, the setup (fixtures etc) need altering in differing ways for both branches.
There’s other stuff to cover here, too, such as the naming of files (and associated tests). It sounds almost trivial, but I’m sure you’ve experienced occasions when writing code where the names of things has started to feel… not quite right 🙂
Housekeeping is an important, if underappreciated aspect of the lives of us as developers.
In the un-tested approach we added in a nice little preview snippet which allowed us to see our existing uploaded wallpaper image when going to the Update screen.
We’re going to add the same functionality into our tested version, but we won’t be able to directly test the template. Is this a problem?
Finally we wrap up the test-driven approach to Wallpaper Updates. We cover not just the “happy path”, but two potential sources of bugs in our form setup.
This is really the major benefit of writing tests, as far as I am concerned. They make you think about the bad times as much as the good. It sounds very pessimistic, but 80% of the headaches I have as a developer stem from having not given enough thoughtful consideration to what might happen if things don’t go according to plan.
All we have left to do now is add in a tested approach to Deleting wallpapers (and their associated uploaded image files), and adding a little security. After all, we don’t want just any Tom, Dick, or Harry accessing our Admin panel.
That just about wraps up this week’s update. Thank you very much for reading, and I hope you have a great weekend.
Until next week, happy coding,