I came across this line in a book on WCF:
...and the languages used for writing COM components (such as C++ and Visual Basic) were at best object-oriented but not component-oriented ...
What is the difference between the two?
A component is Standard-Based (or) Architecture-Based. But an object is Language-Based. A component provides services, whereas an object provides operations and methods. A component can be understood by everyone, whereas an object can be understood only by the developers.
Component-oriented programming is a technique of developing software applications by combining pre-existing and new components, much the same way automobiles are built from other components.
In object-oriented programming and distributed object technology, a component is a reusable program building block that can be combined with other components in the same or other computers in a distributed network to form an application.
OOP is secure as it has a feature to hide the data whereas POP does not have any such feature. The difference between oop and pop is not limited but adheres to various aspects, such as the codes can be reused in OOP whereas there is no reusability in POP.
My opinion/understanding is probably wrong and I am going to shot into flames for writing this.
Object Oriented to "me" means a way of recognizing key data models essential to the context of the problem and corresponding methods that manipulates the state of these data, also within the context of the problem. It is a pattern for organizing data. Another pattern is organizing simply on the basis of functions subdivided to manageable levels - procedural.
Component Oriented pattern does not so much care as to how you organize your various pieces of data models but how you tie them up. That is how do they talk to each other. It could be many ways COM/RPC, Web Services (REST/SOAP) etc. That is loose coupling or tight coupling.
And the author is just trying to say that COM capabilities were built with a language that does not provide COM facilities in-built to it :)
My understanding is that the statement is incorrect as choice of tie-ing up the components, is an abstraction at higher level than what language like C/C++ provides. COM just provides one of the ways to tie-up the components.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With