Felix Meschberger wrote:
Am Sonntag, den 18.11.2007, 16:01 +0100 schrieb David Nuescheler:
I noticed that the resolution for scripts in microsling is based on
the mime-type
and not how I would have expected based on the extension.

Actually, the resolution is based on the request url extension, only
that there is some kind of an indirection, others call this
abstraction :-)

abstraction is certainly useful in general, but we should make sure it doesn't make microsling more complicated to use and understand. I must admit I'd rather call this an indirection than an abstraction, because I have know what the mime-type for a certain resource is. Moreover I also have to make sure the mapping from extension to mime-type is available somewhere. This adds additional complexity to development and deployment.

The problem is, that the extension is not all the times
unique. For example, there are people using .htm and others that are
using .html but all of them mean text/html. So instead of requiring two
scripts for .htm and .html, we just require html (for text/html).

I think this can be solved quite easily by including an existing script. e.g. if you already have a html.esp and now want to support the .htm extension, simply create a htm.esp and include html.esp.

there's also the other side of the story. for a mime-type there may exist multiple extension that refer to it. e.g. excel files. both xls and xlt (the template) have the same mime type: application/vnd.ms-excel This may be quite unfortunate if you want to treat the template differently. Besides, do I really have to name the script vnd.ms-excel.esp? xsl.esp seems so much more intuitive.

regards
 marcel

Reply via email to