Archive, Software Design
     

Software Design Tip of the Fortnight: Tip #1

Database identifiers are not important… to your users. Sure database identifiers are important to the database, and they are important to your data access layer, but they are meaningless to the users of your application.

Here are two simple rules I keep in mind when identifying unique entities on a user interface.

  1. Never label anything as an “Id” in the user interface.
  2. Since you can’t call anything and Id, don’t show Ids.

My problem with exposing database identifiers is echoed by Brian Guthrie in his article entitled “Don’t use auto-incremented database IDs as your resource identifier”. Database Ids lack any meaning, they are usually numeric, and for that matter are rarely unique at all.

Instead of exposing the database identifier try and find some other unique identifying property of your object that does make sense to your users. If its an order call it an order number, if its a customer call it a customer number.

Obviously this isn’t easy, and it may not be practical for all situations. So, for the sake of staying agile just try and find a happy medium.

Never miss an article! Subscribe to my newsletter and I'll keep you updated with the latest content.

 

About Jason

Jason is an experienced entrepreneur & software developer skilled in leadership, mobile development, data synchronization, and SaaS architecture. He earned his Bachelor of Science (B.S.) in Computer Science from Arkansas State University.
View all posts by Jason →

Leave a Reply

Your email address will not be published. Required fields are marked *