A you might has been in my previous post there’s quite a discussion about how a lot of PHP frameworks break MVC.
I stayed clear of commenting, as I didn’t want to get drawn in, however one comment did ask what I thought, so here it is!
So, let’s start at the very beginning, for it’s a very good place to start. What is a design pattern?
In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.
The documentation for a design pattern describes the context in which the pattern is used, the forces within the context that the pattern seeks to resolve, and the suggested solution
One point here that I feel is important, is that it it’s a ‘suggested solution’ – not a concrete definition. At some point, what you implement might differ so much from a patterns suggested solution, that it should no longer be called by the name of that pattern.
At some point in all this, someone has suggested that the implementation in symfony (and similar frameworks) ruin scalability. I don’t believe this to be the case – certainly Yahoo would argue with this point at the very least!
The general feedback I got on the day of the conference, was that Mike might well have had a good point, it’s just he came across badly whilst making it. It appeared he was being a little hostile, but I put this down at least partly to a foreign accent and didn’t see any true hostility at all. In fact, I thought that he added color to the presentation 🙂
I’m still learning about programming and software architecture, and I think anyone in the programming industry that claims they aren’t still learning it’s lying, an idiot, or amazingly smart – but probably not the latter!
I’m going to spend some time looking at Agavi soon, I’m certianly interested in improving my toolkit. I’ll probably post my findings here, who knows – maybe Mike will have been responsible for a conversoin me over to Agavi
I said this at the conference, and I’ll say it again here – I think it’s important to look at a number of frameworks, so you know what’s out there. This means that when faced with problem X, you’ll know that tool Y is the correct solution. Symfony has a fantastic admin generator system, that allows for really fast RAD. It might blurr the line of responsibilities between what it considers to be the ‘M’, ‘V’, and ‘C’ – but sometimes it’s about getting the job done, not about creating a work of art.
I’ll also point out, that symfony allows you to replace many parts of it, especially in the upcoming 1.1 version. You can swap out the Request, Response, View components, and a whole lot more.
My conclusion is a bit of a non-conclusion. Essentially, it comes down to this. If you don’t want to call symfony, cake, rails etc MVC – don’t. I dont’ care – and I might even agree with you. Mike has some valid points, I’m taking them on board and hopefully I’ll improve because of it.