[PEAK] peak.naming question
Andy Gross
andy at andygross.org
Thu Dec 23 11:34:02 EST 2004
On Dec 22, 2004, at 12:36 AM, Phillip J. Eby wrote:
>
> This is a bit off topic, but in general, '//' in a URL is intended to
> designate a naming *authority*, rather than a name. There are some
> PEAK URLs that allow a '//' for something that is not an authority,
> but these date from before Ty and I understood the name vs. authority
> distinction. In general, the URL RFC's do not recommend using '//'
> when you are not beginning something with a hostname, or some other
> "universal" naming scheme (like LDAP OIDs). For this reason, I would
> suggest that 'someproto:foo' would be better syntax for a use case
> like this.
Gotcha. That makes sense.
> The idea here is that a *name* (like "foo") is translated by a naming
> service to a *reference* which designates a *factory* and one or more
> *addresses*. Addresses (URL schemes) are supposed to be reusable for
> a variety of purposes. So, even though there is a default factory
> associated with URL schemes, you do not subclass the URL scheme just
> to get a different factory. Instead, just create a reference to bind
> the desired factory to the appropriate addresses. Then, so that code
> doesn't need to know the details, just use the configuration system or
> a name-based context to map from a symbolic name (like "foo") to the
> reference.
>
Thanks for the tips. I was able to refactor out 2 URL subclasses - I'm
working on a Context now to provide the name resolution/expansion.
/arg
More information about the PEAK
mailing list