If I changed the DB from english to metric, there's no reason that my
application should change, only the objects that actually deal with
data from the DB need to care (because they can convert it back to
metric and let the application run unmodified.  The application very
likely will care, but there is no need for it to care based on when
the DB changes.  Rather, the application should be isolated from the
change, or at least given time to evolve, rather than forcing an
absolute paradigm shift.

That's why I suggested deprecating the method, and adding two methods,
one for each side of the shift.  That'd help the application switch to
metric at it's leisure, though it will have to switch eventually.  At
the very least, the application will have to switch to an explicit
"gas left in gallons" call, rather than the ambigious "gas left" call,
which is enough, because it removes ambiguity, even though the app
hasn't actually switched to metric.

It's a convoluted example, and probably one that isn't particularly
common (since any app written these days should be written in metric
to being with, and let the UI/localization code with the conversion),
but it does illustrate the point of how an entirely encapsulated
interface can save you lots of hassles.  It also illustrates how
interfaces have to be allowed to evolve over time.  The hope is that
they don't, but that's about as realistic as expecting every person in
a democracy to vote in every election.

And yes, if I understand your post correct, there will only ever be
one attribute, it's value will just shift by a factor of 3.8 or so at
some point.  The application shouldn't have to care about the shift,
though it should evolve to avoid any ambiguity over the point.

cheers,
barneyb

On 8/29/05, John Farrar <[EMAIL PROTECTED]> wrote:
> Well... I see the point (perspective at least). If but like the gas scenario
> in last post. The lines are never perfectly ignorant... or your code would
> have no idea what method to call and what it returns. So like when you
> change from English to Metric... there is an issue. (Or were you saying
> there should be two methods rather than two attributes?)
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to