<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Julian Castaneda &#187; Best Practices</title>
	<atom:link href="http://www.smooka.com/blog/category/best-practices/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smooka.com/blog</link>
	<description>From programming to music!</description>
	<lastBuildDate>Mon, 29 Aug 2011 15:50:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Best Practices &#8211; Displaying Application Messages and Alerts</title>
		<link>http://www.smooka.com/blog/2009/10/15/best-practices-displaying-application-messages-and-alerts/</link>
		<comments>http://www.smooka.com/blog/2009/10/15/best-practices-displaying-application-messages-and-alerts/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 13:00:37 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[alerts]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[jAlert]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[messages]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.smooka.com/blog/?p=191</guid>
		<description><![CDATA[On my last post I wrote on how to debug and log error messages using Zend Framework and Firebug. Today I wanted to write on how to [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.smooka.com/blog/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/blog/wp-content/thumbnails/191.jpg&amp;w=70&amp;h=70&amp;zc=1&amp;ft=jpg' alt='post thumbnail' /></p>
<p><img class="alignleft size-full wp-image-200" title="traffic-light" src="http://www.smooka.com/blog/wp-content/uploads/traffic-light.jpg" alt="traffic-light" width="125" height="125" />On my last post I wrote on <a href="http://www.smooka.com/blog/2009/08/21/zend-framework-firebug-log-debug/">how to debug and log error messages using Zend Framework and Firebug</a>. Today I wanted to write on how to properly display messages and alerts to users.</p>
<p>There are different type of messages you can display to a user in a web application. From the typical validation messages, to a dreadful fatal error in your app.  Here are some rules I tend to follow when alerting the users that they must take an action without causing confusion:</p>
<ul>
<li>Use the same massaging system to display all messages</li>
<li>Stick to 3 different types: warning (<span style="color: #ffcc00;">yellow</span>),  success (<span style="color: #008000;">green</span>), and error (<span style="color: #ff0000;">red</span>)</li>
<li>On system error, do not display the system error to the user</li>
<li>Display informative messages when interface can be confusing</li>
</ul>
<p><span id="more-191"></span></p>
<p>Users tend to adapt to applications, but if you are not consistent with your user interface, users will have a more difficult time associating things. That&#8217;s why I suggest you stick to one messaging system (format). This will create a balance in the application and users will be less prone to confusion.</p>
<p>Associating color to different types of actions or messages has been used for decades and not just on the web. The clearest example is traffic lights were you see the common <span style="color: #ff0000;">red</span>, <span style="color: #f8cc06;">yellow</span> and <span style="color: #008000;">green</span>.<br />
So, why re-invent the wheel and introduce new types of messages with weird color associations. Stick to at least these 3 basic colors, and use them accordingly. For example, if you have a fatal error or you want the user to stop the current action use <span style="color: #ff0000;">red</span>. To warn or inform the user then use <span style="color: #ffcc00;">yellow</span>, and last but not least use <span style="color: #008000;">green</span> for success messages.</p>
<p>On system error, do not display the system error to the user. This rule should be obvious, but for some reason there are still developers that like to show errors or exceptions that the application throws. Always display a user friendly message. Something along the lines of &#8220;Sorry, an unexpected error occurred. Please try again, and if the problem persists please let us know&#8221;. Remember to log the error, so you can troubleshoot the problem at a later time if necessary.</p>
<p style="text-align: center;"><img class="size-full wp-image-197 aligncenter" title="FreshBooks" src="http://www.smooka.com/blog/wp-content/uploads/fresh2.JPG" alt="FreshBooks" width="530" height="240" /></p>
<p>My last rule is about guiding the users on how to use your application. When I&#8217;m creating a new application, I always have some idea on how the user should use a certain feature within the app. This does not  mean they will use it how you thought. So why not train them while the use the application. My suggestion is to display messages that will be helpful, especially in places were the application can be confusing, or you want them to follow some sort of path. Never assume the user will be smart enough to figure out how to use your application!</p>
<p>That being said, I developed <a href="http://www.smooka.com/blog/2009/02/22/jalert-jquery-alert-box-plugin/" target="_self">jAlert, a plug-in for jQuery</a> that will aid you in displaying messages accordingly to the rules I discussed. Feel free to to use it on any of your projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smooka.com/blog/2009/10/15/best-practices-displaying-application-messages-and-alerts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

