ramblings on PHP, SQL, the web, politics, ultimate frisbee and what else is on in my life
Don't use the competition cop-out
When talking about why people work on open source its often said that developers are just scratching their own itch. I have also read the innovators dilemma (actually I was referencing it quite a bit in my thesis paper) so I am aware that often innovation occur when someone gives a new twist to seemingly "solved" problem areas. I also realize that solving the same problem with a different approach is an important component here.
Do you want DIC with that Controller?
At Liip "Symfony2" started in production a year earlier. Well I say "Symfony2" because it was just our internal framework OkAPI enhanced with the current crop of at the time PHP 5.2 Symfony components (actually we also included the symfony 1.x routing component). The results were so convincing that we decided to switch to Symfony2 entirely. The big feature back then and today is of course dependency injection (DI) and the dependency injection container (DIC). I remember many discussion with Jordi back then, where we went back and forth on if Controllers should be configured in the DIC or not. In the end we did go with making Controllers DIC services. The other alternative is of course to instead just inject the entire DIC and let the Controller pull whatever services it needs straight from the DIC.
Play nice when extending \Exception
This is just a short follow up to a recent tweet of mine. I have seen this repeatedly happen, even to top notch and usually very careful developers (*). I am not sure why this mistake happens so frequently, but quite often you see code that changes the parameter order for custom Exception constructors. I guess it's mostly because in these cases the developer wants to pass some magic parameters that contain the message (and potentially also the code). Another scenario is adding a new required parameter. In both cases don't! Thanks.
Symfony2, what I think is still left to do
The goal of this blog post is to number one serve me as a todo list of stuff that I personally think needs to be fixed before Symfony2 can be released. Hopefully it will also entice some people to help out with these tasks. I am focusing on the medium to large tasks. There are of course still a fair number of smaller fixes that need to be applied.
Me and Symfony2 learning about REST
I hate the frontend. Maybe its just all the scars from the IE4 and IE6 days I had to suffer through, but since then I have taken every opportunity to move myself further away from the frontend. Database-land seemed equally ridden with incompatibilities but for some reason I coped better with that. Anyway, somehow this entire REST thing seemed frontend to me. I think at some point I ended up with the misconception that REST is about URLs. Mea culpa. Thanks to Fabien and his advocacy around learning the HTTP protocol and ESI, I took a second look and realized that there is a lot more to it and that one should care regardless of one considers oneself a frontend or backend guy. Independently I did develop an interest in being able to easily return content in different formats, which let to the creation of the ViewBundle and the MultiplexBundle. but now I am actually trying to learn what REST is all about. And while I am at it, I am teaching Symfony2 as well, et voilà RestBundle!