We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Just explain me what is  COM, DCOM, WebServices (easy)

Medium Priority
874 Views
Last Modified: 2013-11-25
Can someone explain me what is COM, DCOM, WebServices?
My most used languages are Delphi, ASP and PHP.
It would be nice if there is some examples for it. (cases of use and maybe code)

Tnks a lot.
Rafael Cardoso
Comment
Watch Question

COM is Microsofts Common Object Model.  Basically, it's a standard way to implement components on one machine running Windows such that they are language independant, e.g. you can use a COM object from Delphi, ASP, or PHP.  It is a set of a handful of functions every COM object MUST implement (e.g. "tell me what your properties are"), and calling standards, e.g. string format.

'simplified ASP Example
  dim x
  set x = server.createobject("ADODB.RecordSet")
  x.open "Select * from MyTable"

DCOM is Distributed COM, enabling you to create and use COM objects on a different computer than where your code is running.  DCOM is good in that it hides almost every aspect of distributing your object, e.g. you can get and set properties and call methods the same way as if the COM object is local.  DCOM is bad in than it is horribly slow compared to other RPC mechanisms and only works within a Microsoft Network, not over the Internet.  Some tools support DCOM directly, e.g. in VB you can do

set x = createobject("ADODB.RecordSet", "MachineName")

In other lanaguages, you have to register the object in windows (using dcomcnfg) as a remote object, and then then it looks like a local COM object (except for being horribly slow).

SOAP, Simple Object Access Protocol, by the way, was Microsoft's (an IBM's I believe) attempt to solve the problem of accessing objects over the Internet.  Essentially it wrapped COM objects and exposed a HTML/XML interface that would work over the Internet.

WebServices, like SOAP, enables you to expose "services" over the Internet through a standardized XML interface.  Unlike SOAP, WebServices are not intended solely for objects, but rather any "service".  Because it is just an XML interface, you can use it from any language (or COM components) that allow you to do standard Internet operations.  Unlike DCOM, you have more control of what actions require an interaction over the network.  Like DCOM, it is horribly slow compared to RPC, but at least the slow operations are more exposed so you know why it is slow.  Most tools have good support for COM or DCOM, as they have been around for a while.  You can create a COM object in Visual Studio 6.0 in seconds flat.  If you want to do WebWervices, you either have to use the latest tools (e.g. Visual Studio .Net, don't know about Delphi or PHP), or do a lot of the underlying plubing yourself (parsing XML and whatnot)

As usual there are always exceptions to the above.  e.g. I think you can do COM under Linux with the right third party libraries.

Author

Commented:
"set x = server.createobject("ADODB.RecordSet")"

ADODB.RecordSet is a COM Object, Correct? Or i´m using COM to create a instance of a ADODB.RecordSet Object?
If i´m using COM to create Object, how i program and object like that, and where i register/say to my app that this object exists.

"WebServices, like SOAP, enables you to expose "services" over the Internet through a standardized XML interface.  Unlike SOAP, WebServices are not intended solely for objects, but rather any "service".  Because it is just an XML interface, you can use it from any language (or COM components) that allow you to do standard Internet operations.  Unlike DCOM, you have more control of what actions require an interaction over the network.  Like DCOM, it is horribly slow compared to RPC, but at least the slow operations are more exposed so you know why it is slow.  Most tools have good support for COM or DCOM, as they have been around for a while.  You can create a COM object in Visual Studio 6.0 in seconds flat.  If you want to do WebWervices, you either have to use the latest tools (e.g. Visual Studio .Net, don't know about Delphi or PHP), or do a lot of the underlying plubing yourself (parsing XML and whatnot)"

I spend my day reading MSDN about WebServices, and i notice that all the say are about sending a XML file and receiving a XML file, that is my need (i will talk about what i need). But MSDN doesnt say nothing about who receive (infact where i program to process my XML received) or who will create the XML to send. I compreend that i can do it with a lot of languages, but i need to register it somewhere, like a dll? or a simple ASP.NET can handle it?



More Points. To make it worth. ;)

[]´s
Rafael Cardoso
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
tnks a lot ;)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.