Re: Design decision
by Paul Prescod other posts by this author
Nov 21 2001 8:19PM messages near this date
view in the new Beta List Site
Re: Design decision
|
Re: Design decision
Chris Radcliff wrote:
>
> ...
>
> > $foo->listPorts() # list of ports
> > $foo->findPort(...) # find a port by name and namespace
> >
>
> Note how the comments become redundant.
Okay, how about a compromise. Ports becomes a property, so it should be
a straightforward noun (perhaps implemented as an
attribute-method-thingee in many languages).
Port(...) is renamed findPort(...)
> This way, it's possible to add setPort, addPort, removePort without
> overloading Port in a potentially confusing manner.
I just sent out a message where I proposed that we put those on the
Ports object itself.
> ... A standard
> vocabulary could be used for all WSDL sections (addMessage, findBinding,
> removeOperation).
That's one of the advantages of moving them to the list object. You have
$wsdl-> Ports->getItem(...), $wsdl->Messages->getItem(...),
$wsdl-> Operations->getItem(...). And once you use language overloading
you get
$wsdl-> Ports[0] and $wsdl->Messages[0] etc.
> > 2. ->Ports returns the ports in THIS WSDL. ->Port("...") finds a port
> > in any included or imported WSDL
> >
>
> I'm not sure why this would be desired. Wouldn't a list of all ports in
> any included or imported WSDL be more useful?
One issue is that that would preclude lazy loading of WSDLs. A smart
implementation of findPort() could only load WSDLs until it finds the
port it expects, using the QName to guide it about what imports to deal
with. Another issue is that there is no way we could make the list
editable because how would you state which WSDL the insertions etc. go
into.
> A side question: is this going to use a nested-object model (like DOM,
> which would have $foo->findBinding("bar")->findOperation("baz")) or a
> flat-object model (which would have $foo->findOperation("bar", "baz"))?
> Forgive me if this is a stupid question or it's already been covered. I
> haven't been paying close attention. :)
I think nested. I'm not sure that the "proper" nesting of
findOperation("bar", "baz") is unambiguous. Maybe "bar" is a binding and
maybe "bar" is an portType.
Paul Prescod
_______________________________________________
Ws-dev mailing list
Ws-dev@[...].com
http://listserv.ActiveState.com/mailman/listinfo/ws-dev
Thread:
Paul Prescod
Cameron Laird
Paul Prescod
Chris Radcliff
Rich Salz
Paul Prescod
Paul Kulchenko
Paul Prescod
Paul Prescod
|