Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9190975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:34:39+00:00 2026-06-17T20:34:39+00:00

I see this too often on github and I fail to see the advantages,

  • 0

I see this too often on github and I fail to see the advantages, and even, use of interfaces in these relations.

Situation: A library has a base class Article which is declared abstract and is supposed to be extended. Why does it implement ArticleInterface which is basically:

interface ArticleInterface
{
     // some getter

     // some setter

     // getter...

     // setter....

     // etc...
}

I don’t see the use of Interface in this setup? Isn’t abstract class by itself sufficient as it already has those getters/setters and properties defined (it implements the interface). Only thing Interface does here is force property declaration which isn’t supposed to be the point of it, right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:34:40+00:00Added an answer on June 17, 2026 at 8:34 pm

    Interfaces make classes even more flexible. In the end, it really is the interface you want to define. An abstract class allows you to define some important parts of a classes interface and also (some of) the implementation. An interface is even more abstract, defining only the interface of the necessary functionality and leaving the implementation up to the implementer entirely.

    You should think about it this way: the interface is the definition, the abstract class is merely an example implementation of it. If this skeleton implementation is suitable for your purposes, extend it and use it. Otherwise, if you cannot or don’t want to inherit a specific class, you can implement the interface any way you want. You’re not forced to extend a specific class, you can use your own class hierarchy.

    For more information on why you should think in interfaces and why decoupling is rather important, you may want to read this article.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't see this problem too often but I've got a .cshtml that uses
All too often I've run into a situation in which a view in my
I often use the Stack data structure in both Java and C++. This is
This question is motivated by something I've lately started to see a bit too
I'm looking for a method to see how often people use my application and
i very often see code like this: jQuery('#aslkdjf').css({top:2+'px'}); can i get rid of the:
See this question. How to show popup message like in stackoverflow I am trying
see this fiddle . This upon running gives an error in console. I'm currently
See this code: TicketStoreService fakeTicketStoreService = MockRepository.GenerateMock<TicketStoreService>(); fakeTicketStoreService.Expect(service => service.DoSomething(Arg.Is(new Guid())) .Return(new Guid()); fakeTicketStoreService.DoSomething(Arg.Is(new
see this demo from jquery ui you have to hold down the Ctrl key

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.