Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,124 | Comments: 45,475

filter by tags archive

When the design violates the principle of least surprise, you don’t close it as By Design

time to read 1 min | 192 words

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.


Barry Dahlberg

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.

Sean Gough

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.

Moutasem al-awa

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

Comments have been closed on this topic.


  1. RavenDB 3.5 whirl wind tour: You want all the data, you can’t handle all the data - one day from now
  2. The design of RavenDB 4.0: Making Lucene reliable - about one day from now
  3. RavenDB 3.5 whirl wind tour: I’ll find who is taking my I/O bandwidth and they SHALL pay - 3 days from now
  4. The design of RavenDB 4.0: Physically segregating collections - 4 days from now
  5. RavenDB 3.5 Whirlwind tour: I need to be free to explore my data - 5 days from now

And 14 more posts are pending...

There are posts all the way to May 30, 2016


  1. RavenDB 3.5 whirl wind tour (14):
    29 Apr 2016 - A large cluster goes into a bar and order N^2 drinks
  2. The design of RavenDB 4.0 (13):
    28 Apr 2016 - The implications of the blittable format
  3. Tasks for the new comer (2):
    15 Apr 2016 - Quartz.NET with RavenDB
  4. Code through the looking glass (5):
    18 Mar 2016 - And a linear search to rule them
  5. Find the bug (8):
    29 Feb 2016 - When you can't rely on your own identity
View all series



Main feed Feed Stats
Comments feed   Comments Feed Stats