Re: Interface question
From: Adrian Forbes [ASP MVP] (sorry_at_noemail.zzz)
Date: 02/25/04
- Next message: Rowland Shaw: "Re: SMS Services"
- Previous message: david: "Re: SMS Services"
- In reply to: Andy Ranoe: "Re: Interface question"
- Next in thread: Andy Ranoe: "Re: Interface question"
- Reply: Andy Ranoe: "Re: Interface question"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Feb 2004 00:34:22 -0000
> What is the best way to achieve this - do I scrap the use of interfaces
Yes. If you are using ASP/VBScript then you might as well not use
interfaces.
Well, you can hack it kinda. You can keep your interface but add methods to
your mail class that calls that interface, or the interface of your choice.
So you might have MyClass with MyFirstInterface and MySecondInterface that
both have a DoSomething method. The reason you implemented
MySecondInterface.DoSomething was to fix a big in the previous one. You
have existing clients that bind to the old one and some to the new one.
Well you can add DoSomething to MyClass also. Originally
MyClass.DoSomething would just have called DoSomething on MyFirstInterface
and your VBScript code would call MyClass.DoSomething. When you implemented
the second interface you can make your VBScript clients use it by updating
MyClass.DoSomething to call MySecondInterface.DoSomething. Or you could
create DoSomething2 and have your VBScript clients call that.
It is messy and defeats the point a little, but if you really want
interfaces it is the only way.
- Next message: Rowland Shaw: "Re: SMS Services"
- Previous message: david: "Re: SMS Services"
- In reply to: Andy Ranoe: "Re: Interface question"
- Next in thread: Andy Ranoe: "Re: Interface question"
- Reply: Andy Ranoe: "Re: Interface question"
- Messages sorted by: [ date ] [ thread ]