API Design

B

Bora Eryilmaz

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
 
P

Phlip

Bora said:
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.
 
S

Stefan Strasser

Phlip said:
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.
 
E

EventHelix.com

"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
 
S

Stefan Strasser

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
 
A

Achintya

Bora said:
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..
 
B

Bora Eryilmaz

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top