Wednesday, May 07, 2008
Posted on Wednesday, May 07, 2008 7:36:28 AM (Mountain Daylight Time, UTC-06:00)  Comments [1] | 
Categories: Fundamentals | Unit Testing

...from Jeff Atwood author of the (wildly popular) Coding Horror blog. Hopefully you all subscribe to his blog, but for those who may not, it's full of goodness, and you should check it out on a regular basis.

As for MVC - the results of the Geospatial Developer Survey show only about 50% of respondents are using patterns, and about 46% were not using any sort of Model View * patterns. This article is a great entry point to a pattern that can be applied to a very wide range of scenarios (including easing the creation of unit tests!)

Check it out at CodingHorror.com

Wednesday, May 07, 2008 10:35:20 AM (Mountain Daylight Time, UTC-06:00)
UGh, I know we should all read and love "Coding Horror," but portraying HTML/CSS as an MVC makes me a little ill. The Document/View paradigm is a much better description of HTML/CSS... without putting forth ridiculous notions such as "Controller = Browser".

The problem is that MVC means more than putting your Model and View in seperate files. In real MVC the user interacts only via the VIEW (the CSS?!) ... not directly with the MODEL (the HTML form fields, onclicks, etc)... so that the CONTROLLER (???) can validate user actions. The beauty of MVC is how the three components send messages between them.

[Of course, when you have no control logic, none of this matters... you might was well interact directly with the model. You still don't have an MVC: at most you have a Document/View.]

In short, I believe that portraying HTML/CSS/Browser as an MVC is ludicrous and dangerous. "When all you have is a hammer, everything looks like a nail."
Comments are closed.