Re: COM... is it the best model so far?



COM is not designed for binary reuse. However, nothing
prevents you from using source code reuse as this sidesteps
COM altogether.

BTW, you don't need to know a CLSID of a COM object
in order to use it - you only need its interfaces. A completely
separate piece of code may deal with object instantiation
leaving the rest of your code independent of CLSID
knowledge. In fact, the COM objects you use don't even
need CLSIDs if they are manufactured by other COM
objects.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

<sweetchuck74@xxxxxxxxx> wrote in message
news:1181317318.753573.292750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Recently, i am examining different component model or framework
deployed in different systems.
What are you people think about the aggreagation or extensibility of
COM?

Even though COM has been successful for many years, IMHO COM is weak
on aggregation or component composition point of view.
For example, creating new component out of existing component
(aggregation) or creating new component from component interactions
(component composition) is hard to do with COM.

There are several component models which seperate the implementation
of component from the usage or composition.
For example,
each component only specifies "required interface" and "provide
interface".
there should be a glue component or container component that are
responsible to instantiate inner components and retrives the
interfaces from them in order to configure or map "required interface"
to "provide interface".

This has several advantages. Consider below cases.
(1) component A need to use interface IB provided by component B. In
COM, component A needs to know CID of component B and IID of interface
IB in order use it. In other words, A is tightly coupled with
component B. In future source code need to be changed if component A
want to use interface IB implemented by component C which exhibits
better performance. If we seperates configuration out of component A,
no source changes are needed on component A. We only need to update
container component. Only dependency component A has is the type of
interface or IID that it requires. It doesn't matter which component
provides this "required interface" since container component figures
out and configures it when instantiating component A.

Such approach also has some drawbacks, particually in dynamic aspect.

Compared with COM, what are the drawbacks of such component model?



.



Relevant Pages

  • Re: A basic question about constants. A final field that is not final?
    ... Actually, final has been removed in the source code in src.zip but it is not removed in the online javadoc at http://java.sun.com/j2se/1.5.0/docs/api/index.html, and, worse, the field of the binary version is final yet. ... I have another problem with CachedRowSetImpl. ... Do you know if I can get the source code of this implementation of CachedRowSet? ... the changes will not be committed until one of the CachedRowSet interface transaction methods is called. ...
    (comp.lang.java.help)
  • Re: COM... is it the best model so far?
    ... prevents you from using source code reuse as this sidesteps ... you don't need to know a CLSID of a COM object ... each component only specifies "required interface" and "provide ... there should be a glue component or container component that are ...
    (microsoft.public.vc.atl)
  • Re: COM... is it the best model so far?
    ... Microsoft MVP, MCSD ... prevents you from using source code reuse as this sidesteps ... each component only specifies "required interface" and "provide ... there should be a glue component or container component that are ...
    (microsoft.public.vc.atl)
  • Re: how to limit access to source code...
    ... > interface and also additional code for some calculations. ... > to limit access to the source code for the gui itself. ... implementing Calc, compiles it, puts the class file to the classpath. ...
    (comp.lang.java.programmer)
  • Re: C# Plugin system - same interface in two different assemblies...
    ... Yes - the source code for the interface is present twice. ... they only have to reference the assemblies they *do* use. ... Duplicating source code just makes that worse, ... If there's a bug in an SDK client helper ...
    (microsoft.public.dotnet.languages.csharp)