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


Share this post on…

  • Mastodon
  • Facebook
  • LinkedIn
  • BlueSky
  • Threads
  • Reddit
  • HackerNews
  • Lobsters
  • WhatsApp
  • Telegram

2 thoughts on “Rewriting OpenBenches in Symfony”

What links here from around this blog?

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">