[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: What is delegation

  • From: David Brownell <db@E...>
  • To: xml-dev@i...
  • Date: Mon, 12 Oct 1998 15:59:24 -0700

what is delegation
Dean Roddey wrote:
> 
> I'm sure you'll get some definitions, but here are
> some examples that may help...

See also my response of this morning, archived at

http://www.lists.ic.ac.uk/hypermail/xml-dev/9810/0245.html

Some technical motivations for delegating:

- Coping with situations where the interface isn't
  "exactly" the same (e.g. adapters that implicitly
  add another argument, extra setup needed, etc);

- Sometimes you need lots of objects to delegate to
  the same object, and yet have distinct identity.
  That object might be a flyweight, but to use it
  in some cases you might need to restore its weight.

- Base classes differ; client A needs something to
  call object B but needs its callback to derive from
  some concrete class.  It delegates to object C which
  is so derived, and which calls B.

- As Dean noted, "composite" objects include others
  with "has-a".  Distributed systems often work that
  way ... a user account object "has-a" home directory,
  a password, a set of files.  But those are objects in
  their own right, so "is-a" (subtyping) is wrong.

I've not found "aggregation" to be helpful except when
talking about COM, but that may be because COM has rules
about aggregating that don't apply to more classic object
composition/delegation schemes.  And of course, everyone
has their own ways to slice'n'dice design problems.

- Dave

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.