Rewriting OpenBenches in Symfony
I once described my ideal coding environment to a colleague as "telneting directly into prod and damn the consequences!"
I jest. But only a little. When I build for myself I treat best practices and coding styles as harmful. Chaotic evil but, hey, it's only myself I'm hurting.
Anyway, my wife and I run a hobby site - OpenBenches.org - which was coded in a long alcopop fueled weekend. It's fair to say that it has exceeded our expectations in terms of people getting involved. But is underwhelming in terms of stability, speed, memory usage, efficiency, idempotency, and accessibility.
So I decided to rewrite it using a somewhat modern PHP framework. Partly to improve things and partly as a learning exercise.
I picked Symfony as it seemed to be under active development and had a reasonably simple "getting started" guide. The documentation looked good but, sadly, assumed a tonne of pre-existing knowledge. I ended up sending a few Pull Requests to improve it where I could.
Symfony suffers, like a lot of frameworks, from messy and inconsistent conventions. Some things are zero indexed, some from one. Why? Who know? Similarly, there are a bunch of random YAML (yeuch) files which need to be manually edited and a tangled mess of various config files scattered around.
But... in the end, the Symfony server is reasonably easy to use - with relatively sensible conventions and decent performance. It forced me to actually think about what I was doing and why I'd chosen certain conventions.
I won't claim it to be the best written code on the planet - and there's still some way to go in order to clean it up completely - but I'm pleased with the way things have turned out.
If you'd like to get involved - check out the code
ahnlak said on kavlak.uk:
@Edent having explored a lot of different frameworks over the years, Symfony is definitely one of the least flawed.
(and even today when I'm less framework-y, I lean heavily on Twig)
Eljorgeabides said on mastodon.world:
@Edent I love openbenches! Glad I randomly found the dev behind it
More comments on Mastodon.