Tuesday, March 11, 2014

Why MessageBox.Show() = Fail!

In a recent post I stated that:
"[h]aving "MessageBox.Show()" in your code is almost always an indicator of a poorly designed interaction or notification and contributes to a poor user experience."
There was some debate in the comments about why or how I can claim this.

My aim with this statement was to summarise that post and another I'd written the day before about UX.

Here's 4 reasons why "MessageBox.Show()" sets my code senses tingling:

  1. You're likely asking an "ok/cancel" question which is therefore probably poorly worded.
  2. A message box is the laziest way of displaying information or a question. If you're displaying information in the laziest way possible I don't have confidence that you've created the best experience for the people using the app.
  3. You're showing a modal dialog. Modal dialogs are lazy and often unnecessary. Just because you have something you want to say to or ask of the user it doesn't always follow that they should be interrupted for you to do this.
  4. The standard MessageBox uses the systems default styling and can't be overridden. If you are using your own styles or colour scheme in the app then the MessageBox may end up standing out like a sore thumb when displayed.

Hopefully that makes the reasoning behind my statement clearer.

Yes, despite all this you may still want to use it. Yes, you may have a scenario where it still makes sense to use it. Yes, you may not care what I think and don't see a problem with how it looks.
No, I can't stop you using it.
What I want to do is help you to create the best apps you can and I think this is a simple example of one way you can start to do this.


2 comments:

  1. Anonymous8:04 pm

    Alternatives?

    ReplyDelete
    Replies
    1. Anonymous10:17 pm

      Look in the prior article.

      Delete

I get a lot of comment spam :( - moderation may take a while.