Paul Hounshell has this article about how to develop applications for which plugins can later be written.