Home Help Center

Facet documentation?

brianbrian Member brian whitneyOrganization: boulder research and developmentProject: MarketBank ✭✭✭
There are numerous references in the
Distributed Programming With Ice document
to facets, but no concrete description of how to
use them as far as I could see. There are references
to Chapter 17 and/or "XREF", but there is nothing
in Chapter 17 on facets.

Also searched in demos for "facet" and found nothing.

Can someone please point me in the right direction
for application developer documentation.


Thanks,


Brian

Comments

  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    Re: Facet documentation?
    Originally posted by brian
    There are numerous references in the
    Distributed Programming With Ice document
    to facets, but no concrete description of how to
    use them as far as I could see. There are references
    to Chapter 17 and/or "XREF", but there is nothing
    in Chapter 17 on facets.

    Also searched in demos for "facet" and found nothing.

    Can someone please point me in the right direction
    for application developer documentation.

    I'm sorry, but I haven't written the facet chapter yet. Facets are currently undergoing some changes. The new version won't make it into Ice 1.2, but will be part of Ice 1.3. At that time, we'll also publish the facet chapter.

    Briefly, facets allow you to provide multiple interfaces. The server can attach any number of named facets to a servant. A facet is simply an Ice object of arbitrary interface. The client can then ask for a facet of an object by name, either by calling ice_getFacet(), or by using a dynamicCast with a second argument that is the facet name. If the target object supports the required facet, the client gets a new proxy to the facet and a null proxy otherwise.

    Facets are useful for a number of things. In particular, they provide a good answer to the old problem of how to version an already deployed application without breaking backward compatibility, and they allow you to design more flexible and extensible systems: facets do not require changes to the Slice definitions of an object, meaning that facets are less tightly coupled (at the type system level); without facets, you would have to add explicit operations to Slice interfaces to get equivalent functionality.

    You can find a bit of info about facets by looking at test/Ice/operations. The test uses facets and illustrates the client- and server-side API. But be warned: the facet APIs may change by the time Ice 1.3 is released so, if you use facets now, your code may break later.

    Cheers,

    Michi.
  • brianbrian Member brian whitneyOrganization: boulder research and developmentProject: MarketBank ✭✭✭
    Thanks again for the quick response, Michi.

    Hope things go well with the Facet development.
Sign In or Register to comment.