On Mar 31, 2005, at 1:20 PM, Beatrix Willius wrote:
You mentioned
factories and whatnot -- too messy. Not needed.
I have lots of code like:
if MailClient = "AppleMail" then
'do something
elseif MailClient = "Entourage" then
'do something else
'more mail clients, even more to be added
end if
I really want to get rid of this. To add a new MailClient I need to
change code in about 10 places. So I would like to know why is the
factory approach is too complicated.
Well, what you're describing is totally separate from preference
handling. You're talking about how to respond to the data contained
within one particular preference. There's nothing wrong with using a
factory to build an object in this case, but this decision is going to
be specific to each individual preference. I thought you were talking
about trying to create some sort of general-purpose preferences system
that used a factory.
-Thomas
Personal web page:
<http://homepage.mac.com/thomasareed/>
My shareware:
<http://www.bitjuggler.com/>
Free REALbasic code:
<http://www.bitjuggler.com/extra/>
There are 10 kinds of people in the world -- those who understand binary
numbers and those who don't.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|