Re: Component interfaces

/ Alessandro Vernet <> was heard to say:
| 1) Should inputs/outputs be passed by position only (e.g. just one
| sequence), by name only, or by a combination of both?
| My take - If we draw a parallel between components and functions in
| most programming languages, function inputs (called parameters), in
| general have names. And I think this is a good practice. Instead of
| having the XSLT component take a sequence of 2 documents, where the
| first one is the stylesheet and the second one is the data on which
| the stylesheet should be applied, I prefer to the XSLT component to
| have two named inputs: "stylesheet" and "dataToTransform", each one
| possibly validated with a schema.

I prefer named parameters as well, but if we want to allow components
to be chained together, I think we have to allow for the possibility
that inputs won't be named.

We have a model for "positional parameters": a sequence of nodes.
We don't have a model for a map or hash of parameters and I'm loathe
to invent it if we can avoid it.

                                        Be seeing you,

Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Thursday, 12 January 2006 15:35:09 UTC