Configuration over Convention

time to read 2 min | 251 words

A few days ago there was a discussion on the ALT.Net mailing list about some of the design choices that the MS MVC team has made.

Specifically, the issue of [ControllerAction] and explicit RenderView() came up. Rob Conery just posted a 6 pages post that goes over how to deal with the pain of this decision.

From his post:

I’ve been working a lot with the new MVC bits and one thing that’s annoying is having to type the same stuff, over and over. One in particular is the Controller Action:

action1

Rather than type this over and over, I decided to make a snippet.

My stand on this is that this is a case of trying to use the tools to fix awkward design.

Microsoft has reasons for those decisions, they are worried about people accidentally exposing public methods on controllers that can be remotely routed, and they said that they didn't like the CancelView() that you need to use if you don't want to use the default view.

Those are valid reasons, and they fit the usual mind set from Microsoft, but I feel they are making a mistake. Both issues are a case of shifting the burden to the user, which is the wrong way to do when you are trying to get a usable framework. As evidence by the annoyance factor that it can cause.

Usability matters, and stuff like that hurts the flow of the work.