Are Components Libraries


If components are to be units of release and reuse, then they seem a lot like class libraries (or, indeed, function libraries in older languages), except that they may be accessed through either a remote or local call.

Various definitions of components are floating around (at least in my head):

PleaseHelpMe? -- MartinPool
Yes. And with dynamic linking, they may even be local calls.

See ComponentFramework: a component is an object that conforms to well defined protocols (called AbstractInteractions in the ComponentDesignPatterns) by which it interacts with other components. Component classes are released in some form of packaging -- a DLL, executable or whatever -- that allows them to be integrated into a system by ThirdPartyBinding.

Are components libraries or are they objects or are they full of mud, it all depends on who you ask. DoComponentsExist? From my humble point of view, I see that components are implemented/designed for the most part in terms of objects, and that lots of them are packaged and deployed as libraries for runtime usage by other parties.

With COM components, one party that uses in-process components a lot is called REGSVR32.EXE. It basically instantiates the component and tells it to register itself. But it doesn't use any interfaces for that. It averts the whole component model thing and calls a C API call that's exported from the component's library. If the component is a standalone executable, you instead instantiate it and pass a command on the command-line telling it to register itself. Sacrilege!

Therefore, there are other ways of interacting with components that strongly resemble the way libraries are conventionally reused, but components transcend the nature of a library because they force clients to utilized a defined interaction protocol that separates the components interfaces from its implementation.

Some good reading for these rather Descartes-esque discussions on the existence of components can be found in the May issue of SD Magazine [1].


EditText of this page (last edited December 17, 2011) or FindPage with title or text search