Paulo Gaspar wrote:

> Hi Berin,
> 
>>BTW, What you call a service, we call a Component.
>>
>  
> 
> ARGH! Again!
> =:o)
> 
> So, what is a Service and what is a Component? 
> Is it written somewhere?


Actually, in a few places.  There are even a few books out on Component Oriented
Programming.

The basic criterea is that a Component is defined by it's interface,
which provides a black-box view of the Component.  Furthermore, it
is also defined by the contracts that the interface defines.

For example, the interface here:

/** Provides object storage */
interface Store
{
     /** returns a lookup key for the object */
     int store(Object o);

     /** returns an object for the lookup key */
     Object retrieve(int key);
}

Any Component that implements this interface only has three contracts:

1) It must store objects in some manner
2) It must generate a key for a stored object
3) It must be able to retrieve an object based on that key

What the interface does not define follows:

1) It does not determine whether it is permanent or temporary storage
2) It does not define if the key is no longer stored after the first retrieval
3) It does not define the machanism for storage

It is important to note that the interface, its explicit contracts, and
just as importantly what it does not define all make up a Component.
Components are best used to provide services of some sort.  That is why
the URL (an Object) is not a Component.

This is true whether you are using COM, KOM, CORBA, Bonobo, SOM, Component
Pascal, Java, or a partridge and a pear tree.




-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to