- An object is an real programmatic entity i.e. an instance of class.
- However, a component can consist of more than one object.
- Component is a more abstract term. e.g. webserver is a component of an enterprise architecture or button is a component.
- Usually components encapsulate some reusable functionality, are autonomous but can be connected to other components. Objects can as well do this but
- Objects are, next to primitive types but components are usually bigger and have more common functions.
A software component is a system element offering a predefined service and able to communicate with other components. Clemens Szyperski and David Messerschmitt give the following five criteria for what a software component shall be to fulfill the definition:
|
A component is an object written to a specification. It does not matter what the specification is: COM, Java Beans, etc., as long as the object adheres to the specification. It is only by adhering to the specification that the object becomes a component and gains features like reusability and so forth. |
More importantly, components do not support inheritance whereas objects do.
(Adapted from:
http://forums.devx.com/showthread.php?s=2aa11bf305df7a0bc38815911cfb259b&t=25304
)
No comments:
Post a Comment