When the design violates the principle of least surprise, you don’t close it as By Design
I don’t actually have an opinion about the actual feature, but I felt that I just have to comment on this post, from Brad Wilson, about the [Required] attribute in ASP.Net MVC 2.
Approximately once every 21.12 seconds, someone will ask this question on the ASP.NET MVC forums
…
The answer is the title of this blog post. ([Required] Doesn’t Mean What You Think It Does)
If this is the case, I have to say that the design of [Required] is misleading, and should be change to match the expectations of the users.
We have a pretty common case of plenty of users finding this behavior problematic, the answer isn’t to try to educate the users, the answer is to fix the design so it isn’t misleading.
I am pretty sure that when the spec for the feature was written, it made sense, but that doesn’t mean that it works in the real world. I think it should either be fixed, or removed. Leaving this in would be a constant tripwire that people will fall into.
Comments
Possible alternate names for the attribute:
[Required_NotReally], [Maybe], [HahaFooledYou]
I couldn't agree more
I agree completely. In my opinion, not fixing issues like this when there is still the chance to do so (i.e. before a final release) is somewhat of an oversight.
In this particular case, I understand some of the points being made and the decisions behind them. However the fact still remains - understanding this behaviour hinges on knowing the reasoning behind it and this seems wrong. As you have said, the design should not be misleading. I'm sure it would have been possible to gather ideas from all those concerned and come up with a solution which pleases more people.
Well said! If people get this wrong more that 4,000 times a day then that's a pretty good indication that the attribute is named incorrectly!
To quote Inigo Montoya:
"You keep using that word. I do not think it means what you think it means."
I agree entirely man. That is crazy.
Brad explains in his post why it's not easy / possible to change the Required attribute now.
Man, cant they mimic RubyOnRails if they can not design their own API, as you said its misleading and you should have a separate Flowchart to know whether its satisfying the simple need for validation or not. Complex solution for a simple problem :) MSDN way
Comment preview