Results 1 to 2 of 2

Thread: Why separate the interface from the implementation if you don't need polymorphism?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Location
    Manila, Philippines
    Posts
    16
    Many books about VB component development seem to promote the use of interfaces. I know it can be very useful if you have a general object type with different specific implementations (polymorphism). But what if I don't need polymorphism because my classes are all distinct from each other? Are there other advantages to separating the interface from the implementation?

    It seems simpler to just code the implementation class and use the default interface for that class provided by VB. An added benefit is you do not need any workarounds to use the default interface from scripting clients like ASP. Can someone please enlighten me? Thanks.

    Jason

  2. #2
    Lively Member
    Join Date
    Dec 1999
    Posts
    106
    I don't think you need to be enlightened here, if you aren't going to use VB's "polymorphism" then you shouldn't bother with interfaces.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width