View Poll Results: base class VS. Iinterface

Voters
3. You may not vote on this poll
  • Base Classes are the way to go

    2 66.67%
  • Iinterface is clearly superior

    0 0%
  • HUH, i'm a newb

    1 33.33%
Results 1 to 7 of 7

Thread: base class VS. Iinterface

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Location
    In A House :)
    Posts
    291

    base class VS. Iinterface

    heard arguments pro and con regarding using interfaces in the place of base classes.

    what sayeth ya'll
    --"Tap Dancing On The Brittle Edge Of Sanity"--

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: base class VS. Iinterface

    Using interfaces in place of base classes? That makes no sense. They both have appropriate uses and one should not be able to "replace" the other otherwise your design is wrong.

    Interfaces have a specific use. Base classes have a specific use. Sure you can use a base class in a similar fashion to an interface but if you don't need the benefits of the base class then it's pointless and counter-intuitive.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: base class VS. Iinterface

    Quote Originally Posted by DirtyHowi
    heard arguments pro and con regarding using interfaces in the place of base classes.
    I'm with kasracer - got any links that you have read pros and cons on. I wouldn't mind reading them just to see what they have to say, and how a case could be built that it should ALWAYS be one or the other.

    And you should add an "Both serve a purpose" option to your poll.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: base class VS. Iinterface

    Yeah, where's the "Use the right tool for the right job option?"

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: base class VS. Iinterface

    Quote Originally Posted by DirtyHowi
    heard arguments pro and con regarding using interfaces in the place of base classes.

    what sayeth ya'll
    Are these the same people that often pick up a patterns book, pick one at random, and wedge an application design around it just for the sake of using the pattern?

    It's like arguing whether a hammer or a screwdriver is more useful.

  6. #6
    Fanatic Member CodedFire's Avatar
    Join Date
    Aug 2007
    Location
    In Cog Neato
    Posts
    568

    Re: base class VS. Iinterface

    It's like arguing whether a hammer or a screwdriver is more useful.
    Depends on how big the butt of the screwdriver is.
    Languages: Visual Basic 05/08, C# 08
    IDE: Express Editions
    Framework: 2.0, 3.0, 3.5


    Lesson 5: Don't take domestic advice from perpetual singles. - Mendhak

  7. #7
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: base class VS. Iinterface

    I'm with everyone above on this! I can't make a vote as each has their own use and value depending upon the task/section at hand.

    Mendhak - "Golden hammer" anti-pattern comes to mind!!!

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

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