Enhancing Readability with ASP - How to Use It
(Page 4 of 4 )
At the end, it's all tacked together in a 'nice' format, hence the name of the function. Here's how you'd use it:
dim strDate
strDate = date()
response.write( strDate )
would be: 05/31/2004
dim strDate
strDate = date()
strdate = niceDate( strDate, false )
response.write( strDate )
would be: Mon May 31, 2004
Now, wouldn't you agree that this is so much nicer? No more finger counting!
And of course, to exclude the day, we would do this:
dim strDate
strDate = date()
strdate = niceDate( strDate, true )
response.write( strDate )
This would result in: May 31, 2004
No doubt you agree that users would be far more comfortable reading dates in this format, and therefore happier with your application!
Conclusion
When designing and building an application, we always have the objectives - the work that we need the application to do – first in mind. But if we can train ourselves to couple that objective with the needs of the users, greater acceptance of the application is far more likely to take place.
The two methods I've outlined in this article are key to this approach. I have found them very useful, and honestly I package them in a library of handy functions to re-use in basically every application I work on.
The first will really aid in the visual design of the system, as long strings will never crowd other information. This is one of those things where people will not really notice it, not being constrained to any number of characters. It will just happen, and they will just be okay with it.
With the niceDate function as well, people won't notice it. That's because they're used to dates in that format. They will never say “hey, there's a date like I'm used to!”, they will just read it an move on.
That should really be our goal in usability design. The tools we implement should be done so in such a comfortable manner that nobody really notices, they just happily work away, and move on with their busy lives without ever having to call us in frustration. Feel free to share any other functions that you've developed in this regard in the forum!
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |