
private vs public API declares
Every time we take, say, all the code required to create an application of
some consequence and begin to subdivide it according to some logical
methodology the result is 'more objects' to keep in some ordered fashion.
This process of breaking up a large block of code into smaller manageable
pieces requires looking at what each bit of code actually does and then
finding some verbal/word handle that quickly expresses that functionality...
like: API Common Dialog Operations.
The methodology can be applied to smaller and smaller blocks of code. For
instance the API Common Dialog Operations could become several separate
modules based on just which of the Common Dialog Operations they perform
leading to: API FileOpenSave, API ColorDialog, ...etc. After all, an app is
not likely to need the Color Dialog code when saving or opening a file.
The methodology works just as well on very small sections of code as it does
on very large sections of code... thus the methodology can lead to an
excessive number of small code units unless some 'reasonable' restraint is
used as the means to know when enough is enough.
In a practical world and especially in programming, a certain amount of
redundancy allows us to keep like processes self-sufficient and thus much
more easily ported from app to app.
Programming is a human activity and too many small things, like grains of
sand on the beach, loose all of their individually unique characteristics
and merge into a sea of sand... which in programming would make them
useless. Theories are nice and helpful and often give us a goal but we don't
live in theories, we live in a world where our own limitations are often the
best reference point when deciding just how to go about handling a difficult
task.
--
Mark E Alsop