[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: COM vs XP-COM


Michael Nelson wrote:

> On Mon, 6 Apr 1998, Andy Grover wrote:
>
> > I just finished reading the Modularization Techniques doc, and am a
> > little bit mystified...the use of nsISupports instead if IUnknown seems
> > like a case of being different for its own sake...nsISupports quacks
> > like an IUnknown...ergo...;-)
> >
> > What I mean to say is, the doc says NS can't use COM because it isn't
> > cross-platform, but what is being used is exactly the same! Is it OK
> > w/MS to mimic their technology to the nth degree, but they've
> > copyrighted IUnknown??
>
> This is nonsense. With a little work, the in-process model COM is easy to
> emulate. On Windows you would simply defer to the system's COM
> implementation and become a first-class citizen like all other COM
> objects.

The main reason for not calling a spade a spade is that the spade is actually
only a spade on Windows. Sure, making nsISupports work like IUnknown is
trivial, implementing CoGetInstanceFromIStorage(), not so much. (I picked
that out of a hat, please don't bombard me with implementations :)

It was never our intention to fully emulate or use COM cross platform, the
fact that it does work the same in minor cases is more of a Stupid Code Trick
than a carefully constructed effort to reproduce COM. It was only our
intention to use something COM-like because COM techniques are extremely well
documented at this point. Calling the root interface nsISupports rather than
IUnknown is a pointed way of emphasizing that it's not really COM, so you
shouldn't expect the myriad of COM support calls to be supported.

What we have is very light-weight and extremely simple, to go down the full
COM path would be a lot more work and would pull in a lot more cruft than we
generally want people to have to deal with to create modules.

Will
--
Will Scullin
Netscape Communications Corporation
scullin@xxxxxxxxxxxx
http://people.netscape.com/scullin/





This mailing list archive is a service of Copilotco.