My two cents: When file extensions identify mime types, I think that's fine; by convention you get what you expect without having to request it first and read the Content-type response header. However, URL's that have ".do" (the struts idiom) or ".jsp" or ".php" are revealing implementation details and should be avoided. On the last struts app I worked on, I specifically cfg'd the controller to use .html so I wouldn't be exposing the tell-tale ".do" extensions.

Matt Raible wrote:
I like file extensions personally, but I don't really have a valid
reason.  Maybe because .html is serving up HTML.  Is that really an
implementation detail?

On 5/3/06, Allen Gilliland <[EMAIL PROTECTED]> wrote:
This is a subtopic of the overall discussion about the new url
structure.  I think we can make this decision can be made apart from the
general discussion.

My current position is that file extensions should not be used for these
reasons ...

1. as described by this w3c document about choosing urls, it is a best
practice not to include file extensions because the represent an
implementation detail.  urls are virtual and do not need file extensions
to be valid.  http://www.w3.org/Provider/Style/URI

2. we can't make file extensions work for all urls anyways, so it seems
a little hacky and inconsistent to use them only for part of the url
structure.

3. it is always possible to map the virtual urls into real files in any
way desired.  how a url is served up is an implementation detail and
should not affect what the url is.

I didn't copy over the discussion about this that started on the wiki,
but one item that came up was how media files will work.  I am not
saying that our media files (gif, jpg, png, etc) can't have file
extensions either, i am only talking about urls to our html and xml
content right now.

So, does everyone agree with that?  Does anyone still think we should
use file extensions and why?

-- Allen



--
Ian Kallen || Architect, Technorati Inc. || m: 415.505.5208
blog@ http://www.arachna.com/roller/page/spidaman
Support Odyssey of the Mind! http://happyvalley2006om.blogspot.com/

Reply via email to