UrlEncodedQueryString CCC request
Richard Kennard
richard at kennardconsulting.com
Thu Oct 11 16:17:01 PDT 2007
Michael (Paul? Marc?),
Looking at the JSR311 URIBuilder, and with respect to Mark (Reinhold)'s
concerns, I actually don't think there is much of an overlap between
them. Specifically:
1) javax.ws.rs.core.UriBuilder seems primarily concerned with building
URIs by leveraging UriTemplates
2) java.net.UrlEncodedQueryString seems primarily concerned with
modelling a query string
While 1) is useful for building URIs in a JSR311-specific way, 2) is
useful for parsing and retrieving and modifying query parameters (eg.
not solely a builder)
So while an implementation of JSR311 may want to use
java.net.UrlEncodedQueryString internally, I don't see how the two
classes could effectively merge, because UriBuilder isn't concerned with
parsing and retrieving and modifying, and UrlEncodedQueryString isn't
concerned with UriTemplates.
Regards,
Richard.
Michael McMahon wrote:
> We have been asked by the CCC to go back and reconsider the design of
> the proposed
> UrlEncodedQueryString class/API and to consider aligning it with the
> URIBuilder class
> that has been proposed in JSR311. Also, the particular concern
> expressed by the CCC
> is that we possibly restricted the scope of the class too much.
>
> What I think we would like to achieve (for Java SE) is a general
> purpose URI builder that is not
> specifically tied to any particular type of web application.
>
> When Richard initially proposed the UrlEncodedQueryString, it was more
> like a URIBuilder
> but our concern (which I think is still valid) is that a Java SE class
> for constructing URIs
> must be solely based on defined standards (the URI rfcs), rather than
> on ad-hoc (albeit commonly used)
> conventions in the world of web applications. Specifically, I don't
> think we can impose
> any additional structure on URIs that is not explicitly specified in
> the relevant URIs.
> But if other people have a different view on this, I'm interested to
> discuss it.
>
> A reference for the JSR311 class is at
> https://jsr311.dev.java.net/nonav/javadoc/index.html
>
> and Paul Sandoz's blog entry talking about it is at
> http://blogs.sun.com/sandoz/entry/building_uris
>
> The javadoc for the proposed UrlEncodedQueryString is attached in a
> zip file
>
> Thanks,
> Michael.
--
Richard Kennard | Principal | Kennard Consulting
0402 629 952
http://www.kennardconsulting.com
More information about the net-dev
mailing list