dev@jsr311.java.net

Re: Alternate API proposition

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 26 Apr 2007 19:18:05 +0200

Jerome Louvel wrote:
> The @HostRef concept seemed helpful in the BlinkSale API case. I'm not fixed
> on it. Paul's parsing is simple indeed but it could have been less simple in
> the case where the URI is formed differently.

One way we could avoid more scary string code is to expose URI template
functionality to the application (to extract template values from a URI,
or to produce a URI given template values), alternatively one can always
use the Java regex package for more complex patterns.


> In addition, it gives some
> deployment information to the parent container.
>

I am not sure what it means to provide host information for deployment
in say a servlet container like Tomcat. This is the kind of thing that
could change between development, testing and production deployment so
baking the host/port details into the application code may be
problematic. (Internally transforming the URI won't work when URIs of
resources need to be embedded into representations.)

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109