Ed Leafe wrote:
The example I gave back when I used to give this topic at conferences was a light switch in a room. In your app, you want to control the lighting by turning the switch on and off. Now let's imagine the switch is a typical mechanical switch with contacts that are opened and closed when you flip the toggle. In code, you could write oSwitch.contact1.Closed = .T., or oSwitch.TurnOn(), and either code would work great. However, if at a later date the switch was replaced by a mercury switch, or an electronic switch, or a dimmer switch, the first example of code would probably fail, since it was written to use an implementation detail of a particular switch, instead of the public interface all switches are designed to use. By coding to the public interface, such as the TurnOn() method, the code will work no matter how the switch works internally.

I meant to reference that example too in my session at FoxForward! I recall you saying that...I think it was in the Profox archives from 2001?

--

Thanks,
--Michael



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to