API Design

Discussion in 'C++' started by Bora Eryilmaz, May 14, 2005.

  1. I am working on designing a set of abstract classes that would be subclassed
    by the users and they have to implement the abtract (virtual) methods.

    Does anybody know of a good reference on designing APIs and class libraries.
    I am particularly interested on how to design interface classes, what kind
    of methods to provide to the users, etc.

    I'd like to emphasize that what I want to learn is not how to "create"
    abstract classes and interfaces, but how to design
    "good/extendable/maintainable" interfaces.

    Thanks
    Bora
     
    Bora Eryilmaz, May 14, 2005
    #1
    1. Advertising

  2. Bora Eryilmaz

    Phlip Guest

    Bora Eryilmaz wrote:

    > I am working on designing a set of abstract classes that would be

    subclassed
    > by the users and they have to implement the abtract (virtual) methods.


    So you also have 3 completely different example projects that re-use this
    library, right?

    > Does anybody know of a good reference on designing APIs and class

    libraries.
    > I am particularly interested on how to design interface classes, what kind
    > of methods to provide to the users, etc.


    Design Patterns, Refactoring, Refactoring to Patterns, and the "Interface
    Segregation Principle" and "Dependency Inversion Principle" from Agile
    Software Development.

    > I'd like to emphasize that what I want to learn is not how to "create"
    > abstract classes and interfaces, but how to design
    > "good/extendable/maintainable" interfaces.


    Very briefly: By taking the extra care to push your library through enough
    developmental iterations, with 3 or more clients, to see if it is in fact
    maintainable. Anything else would be guesses, which are not good for
    engineering.

    --
    Phlip
    http://www.c2.com/cgi/wiki?ZeekLand
     
    Phlip, May 14, 2005
    #2
    1. Advertising

  3. Phlip schrieb:

    > Very briefly: By taking the extra care to push your library through enough
    > developmental iterations, with 3 or more clients, to see if it is in fact
    > maintainable. Anything else would be guesses, which are not good for
    > engineering.
    >



    Q: How can I do X?
    A: By doing it 3 times.

    SCNR.
     
    Stefan Strasser, May 14, 2005
    #3
  4. "Object-Oriented Analysis and Design with Applications (2rd Edition)"
    by Grady Booch has a complete chapter titled "Frameworks: Foundation
    Class Library". This chapter describes the process of designing a
    framework API.

    Deepa
    --
    EventStudio 2.5 - http://www.EventHelix.com/EventStudio
    Generate Sequence diagrams from a simple declarative language
     
    EventHelix.com, May 15, 2005
    #4
  5. Bora Eryilmaz

    Guest

    See Large-Scale C++ Software Design by Lakos. /david
     
    , May 15, 2005
    #5
  6. schrieb:
    > See Large-Scale C++ Software Design by Lakos. /david
    >


    although I agree that this is a very good book, I can't remember it
    saying much about API design
     
    Stefan Strasser, May 15, 2005
    #6
  7. Bora Eryilmaz

    Achintya Guest

    Bora Eryilmaz wrote:
    > I am working on designing a set of abstract classes that would be

    subclassed
    > by the users and they have to implement the abtract (virtual)

    methods.
    >
    > Does anybody know of a good reference on designing APIs and class

    libraries.
    > I am particularly interested on how to design interface classes, what

    kind
    > of methods to provide to the users, etc.
    >
    > I'd like to emphasize that what I want to learn is not how to

    "create"
    > abstract classes and interfaces, but how to design
    > "good/extendable/maintainable" interfaces.
    >
    > Thanks
    > Bora


    Hi,

    Good/Extendable/Maintainable interface designs comes with hands-on
    experience and by looking into design of those industry standards...i
    would recommend to you to look into the design of STLs which would give
    a fair idea of how the interfaces are to be designed...(would recomend
    "C++ Programming Language" by B. Stroustrup for an explanation of the
    STLs)

    Also non-standards like Graph Template Library (GTL) and Boost Graph
    Library (BGL) can help you learn many things about interface design.

    Hope this would help you in design.

    -vs_p..
     
    Achintya, May 16, 2005
    #7
  8. Thanks for all your replies.

    It was in fact the "C++ Programming Language" by B. Stroustrup that got me
    interested in this subject (API design). I like Chapters 23-25 in this book
    and read them a number of times. But other than these chapters, I cannot
    find any other good references on the API design issues, with real examples
    and applications.

    There are, of course, all these books that talk about generic issues
    regardind API & object design, with virtually no code examples and a lot of
    hand waving!

    bora



    "Achintya" <> wrote in message
    news:...
    >
    > Bora Eryilmaz wrote:
    >> I am working on designing a set of abstract classes that would be

    > subclassed
    >> by the users and they have to implement the abtract (virtual)

    > methods.
    >>
    >> Does anybody know of a good reference on designing APIs and class

    > libraries.
    >> I am particularly interested on how to design interface classes, what

    > kind
    >> of methods to provide to the users, etc.
    >>
    >> I'd like to emphasize that what I want to learn is not how to

    > "create"
    >> abstract classes and interfaces, but how to design
    >> "good/extendable/maintainable" interfaces.
    >>
    >> Thanks
    >> Bora

    >
    > Hi,
    >
    > Good/Extendable/Maintainable interface designs comes with hands-on
    > experience and by looking into design of those industry standards...i
    > would recommend to you to look into the design of STLs which would give
    > a fair idea of how the interfaces are to be designed...(would recomend
    > "C++ Programming Language" by B. Stroustrup for an explanation of the
    > STLs)
    >
    > Also non-standards like Graph Template Library (GTL) and Boost Graph
    > Library (BGL) can help you learn many things about interface design.
    >
    > Hope this would help you in design.
    >
    > -vs_p..
    >
     
    Bora Eryilmaz, May 16, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shlomo Anglister
    Replies:
    1
    Views:
    433
    Default User
    Aug 2, 2004
  2. Praveen, Tayal (IE10)
    Replies:
    0
    Views:
    396
    Praveen, Tayal (IE10)
    Mar 17, 2005
  3. John123

    Profiling API or Membership API

    John123, Oct 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    399
    John123
    Oct 20, 2006
  4. George2

    platform specific API or C standard API

    George2, Nov 12, 2007, in forum: C Programming
    Replies:
    13
    Views:
    774
    Tor Rustad
    Nov 13, 2007
  5. Timothy Grant
    Replies:
    5
    Views:
    440
    Timothy Grant
    Aug 6, 2008
Loading...

Share This Page