Re: Interface-based programming

From: Rakesh Rajan (rakesh-no-spam-rajanhere_at_hotmail.com)
Date: 09/25/04


Date: Sat, 25 Sep 2004 22:34:30 +0530

Hi Patrick,

By creating interfaces and publicizing it to your clients, you are promising
them that your component will have that definition, whatever the
implementation would be. Instead of making an abstract class public, it's
always better to hide the implementation and making ppl know only the
definitions.

HTH,
- Rakesh Rajan

"Patrick Kristiansen" <patrick@sixulon.dk> wrote in message
news:457dae9b.0409250801.16533a2d@posting.google.com...
> Hi group!
>
> I've been reading Juval Löwys "Programming .NET Components", and I
> think it is a very good book, giving nice guidelines on how to really
> exhaust the possibilities of .NET in general.
>
> Juval Löwy is indeed an advocate of using interface-based programming
> (he wrote a chapter dedicated to it, and he's using it througout the
> book).
>
> I have one simple question. When designing your own components, is it
> true - according to the rules of interface-based programming - that
> you should create interfaces for your clients to use, and advertise
> for them to do so? So every time I design a class, it should have a
> corresponding interface?
>
> Regards,
> Patrick



Relevant Pages

  • Re: CORBA IDL versioning, evolution, backward compatibility
    ... Extend existing interfaces with new interfaces, ... New clients will use the ... real-life versioning requirements are not ... modifying a struct can have nasty cascading affects. ...
    (comp.object.corba)
  • Re: Must TLB be distributed with app?
    ... "Brian Muth" wrote: ... My interfaces are dual actually. ... If I understand the matter correctly, clients that don't use IDispatch ...
    (microsoft.public.vc.atl)
  • Re: CORBA IDL versioning, evolution, backward compatibility
    ... Extend existing interfaces with new interfaces, ... New clients will use the ... that contains the old struct. ... typedef short ProductState; ...
    (comp.object.corba)
  • Re: What multi-tier components to use
    ... Enterprise Java Beans. ... Java Clients to be able to talk to a Java Service. ... even though I still had to rebuild the interfaces every ... if your client- and server-side interfaces are out of sync ...
    (borland.public.delphi.thirdpartytools.general)
  • Sink Implementation for dispInterfaces
    ... I have an Active X control that uses dispinterfaces for Source interfaces to ... Is this also proves that C++ clients can not ...
    (microsoft.public.vc.atl)