[4suite-dev] Reforming HTTP: redirects, etc.
Uche Ogbuji
uche.ogbuji at fourthought.com
Wed May 8 23:22:58 MDT 2002
The Fourthought team has long agreed that the HTTP facilities need to be
improved for better flexibility and conformance. Some of the problems
have been really biting me in the backside lately, so it's time to start
putting forth some of the ideas on the list and getting them addressed.
The first thing is how we deal with representing resources. The core
facility of the repo's HTTP handler is the ability to run XSLT against
resources, and the fact that the XSLT gives a full API to 4Suite
facilities. Therefore, the user does a lot of serving up Web pages in
the form:
http://spam.com/eggs/?xslt=monty.xslt
Problems include:
*) The browser can't cache this because of the query args
*) It's not very user friendly
To get around the second prolem, it's common to set up aliases from
http://spam.com/eggs/
to the above. These can either be true temporary HTTP redirects set up
in the server properties file using the
Redirect
Or by a crude set of rules of the form "for all objects of type X, if
accessed over HTTP, apply stylesheet Y and return the result". This is
also specified in the server props file using the DefaultXslt directive
(and there may be others).
The problems with the first approach include clutter in the server
properties file and the overhead/browser-bug-minefield of redirects.
The main problem with the second is that it is quite inflexible.
IIRC a developer's meeting a few months back, we were gravitating
towards a solution such as the following:
There is a container or other resource
/eggs/
Then, one can access the "raw" resource document directly
http://spam.com/eggs/
We can also set up a "virtual" container for HTTP, which is effectively
a view on the resource:
http://spam.com/eggs/monty
Which might behind the scenes apply /eggs/monty.xslt against /eggs/ and
return the rendered result.
We might also chain views:
http://spam.com/eggs/monty/full
Which could mean "run /eggs/ through eggs/monty.xslt and run the result
of that through eggs/full.xslt" (chained stylesheets), or it could mean
"run /eggs/ through eggs/monty.xslt passing in the string 'full' as some
parameter" (friendly, cacheable parameters).
The idea was that the views would also be written in XSLT, and we would
have a small API for defining the interpretation of views.
These are incomplete ideas, but I wanted to get them down. I'm
interested in others' ideas, and use cases would be solid gold.
Thanks.
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Track chair, XML/Web Services One (San Jose, Boston):
http://www.xmlconference.com/
DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html
RDF Query using Versa -
http://www-106.ibm.com/developerworks/xml/library/x-think10/index.html
XML, The Model Driven Architecture, and RDF @ XML Europe -
http://www.xmleurope.com/2002/kttrack.asp#themodel
More information about the 4suite-dev
mailing list