[ajug-members] boolean best?
barry at alltc.com
Fri Dec 12 12:12:06 EST 2008
Excellent observation by Andrew and Tim; I've had developers jump
on Enumerations (the latest shiny toy that feature-starved Java
developers are overusing) and use them to replace lookup tables in
databases. Unfortunately, part of our *requirements* are that those
same lookup lists be available to the other languages needing that
information...which worked swimmingly well when they were database
tables; not so much as a Java enum.
My favorite part? The main justification being that they can see
the possible values in the auto-completion features of their Java
IDE. The followup question of "How does that work out for the Flex/
Ajax/etc. developers?" is typically met by silence and a puzzled look.
On Dec 12, 2008, at 11:56 AM, Tim Watts wrote:
> As Andrew points out the implementation isn't as important at the
> representation. In my experience, a boolean is seldom a good choice to
> represent real world things. Internal object state?, yes; real world
> not so much. A robust application almost always has to allow for the
> know" factor.
> On Friday 12 December 2008 10:25 am, AGoodspeed at cfglife.com wrote:
>> The most important thing is not how you implement it, but that it
>> your requirements. Certain applications may require separate sex and
>> gender attributes (and/or multiples for an individual, like birth,
>> current...) for example, and either of them can have more than two
>> depending on the requirements.
All Things Computed
More information about the ajug-members