It's often the case that your software interacts tightly with a powerful engine. So do you create your software as an extension of the engine, or do you embed calls to the engine within your software? ''Do you mean like embedding calls to a relational database in my software?'' If you're a typical programmer, you embed. This is WRONG WRONG WRONG and couldn't possibly be any more wrong! ''So I should extend relational databases instead of use them? I'm confused.'' Let's illustrate Embedding vs Extending with a simple example from OS user interfaces. Embed is what Microsoft application development is all about. Programmers get to embed the modules they want in their applications. In contrast, extend is what the original Unix user interface (the CLI) was all about. A ton of little commands that could be invoked at the user's whim. Of course, Embed isn't evil for the simple reason that Microsoft promotes it; though that should send a shiver down the spine of any right-thinking individual. Rather, it's evil because it puts all of the power in the hands of the developer instead of the user. And that invariably leads to the creation of gratuitous and inconsistent user interfaces. Instead of the developer being forced to be consistent with the primary engine they extend, they're free from all such considerations and, true to their black hearts, go about making gratuitously inconsistent interfaces. Why would they do such a thing? It's a combination of megalomania, hubris and unmitigated arrogance. To a developer, ''their'' interface is always the best one, even if they don't know what the hell they're talking about because they've never studied the subject in their life. See also NoApplication. Embed Vs Extend also applies to many other areas of programming, including whether to embed or extend the python interpreter. See http://twistedmatrix.com/users/glyph/rant/extendit.html -------------- Let's set motive aside for a moment and just list some examples of embedding and extending so that we can be sure we understand the distinction. * Unix commands EXTEND the unix kernel and its shells by adhering to their standard invocation protocol which is based on fork, exec, argv and open file descriptors. * Emacs commands EXTEND the emacs editor by adhering to its invocation protocol which is eval and possible key bindings. * PhotoShop plugins EXTEND PhotoShop by adhering to its plugin protocol which is exposed as extra menu options. * Some unix commands EMBED the Curses library which makes them and their users depend on the existence of a valid TERMCAP even when run from a batch script. * PhotoShop EMBEDS sophisticated image data handling routines that allow it to work efficiently on very large images. These routines are not available to the user directly or to other applications unless perhaps those applications are written as PhotoShop plugins. ---- CategoryRant