|
-
Nulls and business objects.
For the longest time I have struggled to come up with a clean way to deal
with Null values when creating business objects that read data from a
database. In my particular case, I program in VB, VB 6 to be more specific.
And if there is one thing that I wish, is that VB had variables such as
Integers with the capability to not only receive numerical integer values
but also Null values. We would finally have a nice clean one to one
representation of the data from the database and the object model.
I currently use tricks such as Variants, assign default values such as a
person's age being -1, etc. Needless to say this is annoying and just one
more way to introduce bugs etc. Why can't there be a variable that does
this. Somebody suggested one being out there but I have not been able to
find it.
How do you guys deal with this issue? Does languages like Delphi allow you
to do this?
PS: There are some cases where I believe that using Null values is a great
idea, I don't want to get into a philosophical debate here, so not allowing
Nulls is not the right solution for me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks