HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 353289 thumbnail
User 292522 avatar

By Roy van Rijn
via redcode.nl
Published: Feb 02 2010 / 05:19

Its a common problem in most JEE projects, handling null-values. But why is this a problem? What strategies and patterns can we follow to reduce this problem?
  • 24
  • 0
  • 3815
  • 0

Comments

Add your comment
User 283139 avatar

ceaseoleo replied ago:

0 votes Vote down Vote up Reply

The whole programming by contract I get, but is the general opinion working with empty objects is better than checking for null. IMO, you still have to check for state somewhere. Example, I request a collection , i still have to check for empty case. If I request a user for an id i still have to check if its empty or not. Isn't null for these type of conditions.. what is point of null value if we want to avoid it completely ?

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.