Embed Vs Extend

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.


CategoryRant


EditText of this page (last edited April 14, 2006) or FindPage with title or text search