ASP
  Home arrow ASP arrow Page 4 - Enhancing Readability with ASP
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP

Enhancing Readability with ASP
By: Justin Cook
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 60
    2004-06-22

    Table of Contents:
  • Enhancing Readability with ASP
  • Trim the String
  • What Does 07/13/2004 Mean?
  • How to Use It

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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.

     

    ASP ARTICLES

    - Using MySQL with ASP
    - ADO for the Beginner
    - ADO.NET 101: Data Rendering with a DataGrid ...
    - Introducing SoftArtisans OfficeWriter 3.0 En...
    - Getting Remote Files With ASP
    - The Real Basics of Functions in ASP
    - Enhancing Readability with ASP
    - Mimicking PHP's String Formatting Functions
    - Windows Server Hacks 12, 77, and 98
    - How to Sort a Multi-Dimensional Array
    - Developing an Information Management Tool wi...
    - What are Active Server Pages?
    - Getting Remote Pages with ASP
    - FTP’ing Files with ASP
    - Apply Single-Sign-On to Your Application





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT