Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between a component-oriented and object oriented language?

Tags:

oop

com

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?

like image 343
Eminem Avatar asked Jun 25 '12 22:06

Eminem


People also ask

What is the difference between component and object?

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.

What is a component-oriented language?

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.

What is a component in object-oriented programming?

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.

What is difference between oops and pops?

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.


1 Answers

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.

like image 66
pyfunc Avatar answered Sep 28 '22 12:09

pyfunc