From: Ronald Garcia (rgarcia4_at_[hidden])
Date: 2000-12-28 18:01:59
I agree that there is not enough literature available
currently with respect to writing libraries. Many introductory texts
at least for C and C++, describe the wonders of functional
decomposition and perhaps pay a little lip service to separation of
files, but I have yet to see much literature on the mental tools
needed to develop good libraries. It seems that many of the newer
techniques in programming (Object Orientation, Generic, Components,
Beans, CORBA etc) are hyped specifically for the ability to build
reusable units of functionality and then glue components together.
One problem I have seen is the lack of literature describing how best
to use these technologies to do so.
At least to bring things home to BOOST, C++ as it currently stands
provides many features for the development of abstractions for
reusable code. Specifically the STL and the less often mentioned
iostreams library reveal rather impressive uses of techniques for
developing reusable, extensible, and efficient components. Many of
those techniques are being effectively used here at BOOST to develop
C++ libraries. But while isolated techniques have been written about in
various capacities (expression templates, traits, writing exception
safe c++ code), not all of these techniques have been documented in a
way that makes them easily accessible. In addition newer ideas such
as Feature Modelling seem to be only known about by a small portion of
the C++ user community.
I would definitely like to see more literature on idioms and
techniques for effective library development. In the case of BOOST
specifically I would like to see this for C++ and hope to contribute
to such a process here.
IMO, the hardest part of developing quality libraries is the
development of clear and powerful interfaces. Given a set of quality
interfaces or abstractions, the implementation seems to be much less
of an effort.
Unfortunately, I can't point you to any web pages that teach effective
library development. I think that much of the discussion that occurs
on this list should be distilled in a more accessable format.
A few starting points, though. As far as Various types of
programming, I can recommend possible places to look:
I've seen mention of the following book:
Hanson, D.R. "C Interfaces and Implementations: Techniques for
Creating Reusable Software."
Unfortunately, I can't really vouch for the contents, but it may be a
good place to look.
As far as Object Oriented code goes, I would recommend:
GOF, "Design Patterns"
Which discusses some techniques for developing abstractions.
Fowler, Martin "Refactoring"
The book is in Java, but some of the code in here gives examples of
uses of Design Patterns for building abstractions.
Meyers, Scott "Effective C++" and "More Effective C++"
The above books do not specifically attack library development, but
the ideas most definitely carry over.
For Generic Programming and "new" style C++ libraries:
Austern, Matt "Generic Programming and the STL"
Josuttis "The Standard C++ Library"
Langer et. al (Iostreams Handbook?)
I think that the Iostreams library is chock full of ideas for
developing C++ libraries that are reuseable and extensible. Josuttis
also covers it, but this book seems to be pretty definitive.
I have also heard mention that Scott Meyers is also coming out with an
Effective STL book. I don't know what the focus of this book is as
far as extending the library vs. using it in Applications, but I have
a feeling it will be worth taking a look at.
But now my curiosity is piqued. What books would others suggest
provide a good foundation for development of BOOST-worthy libraries?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk