|
|
Comments and Discussions
|
|
 |
|

|
Wow, good catch Martin
- Adam Kinney
|
|
|
|

|
Sorry, guys. I work with the folks at Port80 -- that's why my responses were "for the authors". Joe is sitting right next to me, working on making Microsoft Web servers safer, faster and friendlier.
Thanks for the diligent eyes,
Chris @ Port80
|
|
|
|

|
Well that explains it
Good article by the way, definitley got me thinking.
- Adam Kinney
|
|
|
|

|
Thank you for explanation. It's nice to hear, that all is ok
--
Martin Vobr
www.rebex.net/ftp.net/ - the only .NET ftp component with NUnit tests
|
|
|
|

|
So many users type urls e.g. www.codeproject.com straight into Google? Maybe the address bar should be gone by default?
Davy
Blog for Software Testing, Bugs, Quality, Security and Stability - www.latedecember.com
News From Scotland - The Angus Blog and The Dundee Blog
My Personal Blog - Homepage.
|
|
|
|

|
Good article and I certainly think your intentions are spot on. However you should distinguish between web-applications and web-sites.
A site such as Amazon should use clean URLs, perfectly right. I should be able to type www.amazon.com/books/sciencefiction/asimov/irobot and be taken to that particular book. Amazon are shocking for this though. However when it comes to their checkout procedure (the web-app bit really) then I should not be bothered about the URL or trying to type in URLs.
I also disagree about querystrings not being abstract. The alternative is to submit form data which is far more technology specific and hard to handle than a very easy to cut-and-paste URL string. Plus you don't get the annoying "Do you want to resubmit the form data?" when you refresh
Anyway, good article, lots of good points.
Paul Watson Bluegrass Cape Town, South Africa
brianwelsch wrote:
I find my day goes by more smoothly if I never question other peoples fantasies. My own disturb me enough.
|
|
|
|

|
Our comments are posted below:
Good article and I certainly think your intentions are spot on. However you should distinguish between web-applications and web-sites.
REPLY: Yes that is true. However, we do think that when using a URL as a UI regardless of site purpose or style it should be well thought. For a Web application the entry points should be well defined and regular and everything else hidden. For "web sites" where entry point isn't as important the clean URL is more important as ever as you note. Unfortunately in most cases the distinction between Web app and site isn't always as clear as it could be.
A site such as Amazon should use clean URLs, perfectly right. I should be able to type www.amazon.com/books/sciencefiction/asimov/irobot and be taken to that particular book. Amazon are shocking for this though. However when it comes to their checkout procedure (the web-app bit
really) then I should not be bothered about the URL or trying to type in URLs.
I also disagree about querystrings not being abstract. The alternative is to submit form data which is far more technology specific and hard to handle than a very easy to cut-and-paste URL string. Plus you don't get the annoying "Do you want to resubmit the form data?" when you refresh
REPLY: Agreed on the Posting issue and how it is handled but I think you will see that you could rewrite the query string to abstract things more so and still use GET. Imagine a query string simply going from userid=4&view=6 to /userid/4/view/6 or something. The value is not maybe as huge as some of the other points made, but obviously given the amount of mod_rewrite hacking going on it, there are proponents for this.
On a related note, in the future we may see with the rise of Rich Internet Applications (e.g. FlashMX) that people will have one entry point URL and within that app you don't pass state data the traditional way. If this works out the query string and somewhat post method will certainly be diminished in usage significantly. However, so far this has not come to pass and may never. Obviously the web application people are pushing this model more than the "web site" folks.
Anyway, good article, lots of good points.
REPLY: Thanks if just getting people to question the current status quo in Web app development and quality then we did our job.
|
|
|
|

|
Chris Neppes wrote:
On a related note, in the future we may see with the rise of Rich Internet Applications (e.g. FlashMX) that people will have one entry point URL and within that app you don't pass state data the traditional way
For pure web-applications that is fine. But I sincerely hope the RIA method is not applied to content and resources.
The very fundamental principle of the internet is the URL. Soon as you start hiding it behind one non-changing URL and preventing resources from being accessed directly via specific URLs then you kill off the net.
I personally see web-applications dying off and internet enabled applications picking up from there. The web will go back to being a linked content datastore.
Paul Watson Bluegrass Cape Town, South Africa
brianwelsch wrote:
I find my day goes by more smoothly if I never question other peoples fantasies. My own disturb me enough.
|
|
|
|
|

|
Please see my responses below. Thanks for the comments...
>Dirty URLs are difficult to type.
Users don't ever type them anyway. They use the web pages, they don't mess about in the address bar. That's obvious
REPLY: Is it? Have you never received a truncated or wrapped URI in an email and had to reconstruct it? Have you never seen a complex URI referenced in a PowerPoint presentation or hard copy materials? Have you never had someone repeat one over the phone to you?
>Dirty URLs are a security risk.
No they aren't. Bad programmers are the risk. You do not offer an alternative that is better than a query string!
REPLY: First, you neglect to mention file extensions, which are a major source of "noise" in traditional URLs, and which almost always betray the backend technology. This a principal reason we suggest removing them. As to query string alternatives, we make two suggestions in the article: 1) pregenerate static pages where appropriate (which has additional performance and searchability benefits) and 2) rewrite them to a more innocuous, harder-to-guess-at format (an old mod_rewrite trick, as detailed in some of links at the bottom of the article).
>and the parameters used (via the query string)
But they do promote abstraction. [confused] The query string has a standard format (I have used PHP, C# and Java). So you can use any language on the server. I really cannot understand where you are coming from on this.
REPLY: First, while a query string is not bound to the technology used to parse it (though, as we point out, the file extension normally is), it does nothing to abstract the URL from a key implementation detail, namely, whether the page is dynamic or static. A clean URI, by contrast, has the same form regardless of how, or when, or by what kind of agent, a given resource was composed.
Second, doing without the query string format is one way to encourage developers to stop thinking of the URL as part of a backend system, and to start thinking of it as what it is -- a public interface. Maybe this in turn will help discourage such practices as exposing database field names in the URL -- the SQL injector's delight.
Finally, to take the idea still further, imagine getting rid of parameter names altogether. Think of how modern programming languages work. Imagine having to do this to call a function:
foo(parm0=value0, parm1=value1, parm2=value2)
Silly looking, isn't it? Why should someone calling this function need to know (and accurately repeat) the internal parameter names? Why should its implementation be bound to those names forever? Why not abstract such details from the interface?
Well, exposing parameter names in a function signature makes no more sense than exposing them in a URL's query string. This illustrates a general principle of abstraction: anything internal to the application that _can_ be taken out of its public interface, should be. Obviously, the traditional query string isn't there yet.
|
|
|
|

|
Ok, thanks for your reply.
|
|
|
|

|
Chris Neppes (for the authors) wrote:
Finally, to take the idea still further, imagine getting rid of parameter names altogether. Think of how modern programming languages work. Imagine having to do this to call a function:
foo(parm0=value0, parm1=value1, parm2=value2)
Silly looking, isn't it? Why should someone calling this function need to know (and accurately repeat) the internal parameter names? Why should its implementation be bound to those names forever? Why not abstract such details from the interface?
Well, exposing parameter names in a function signature makes no more sense than exposing them in a URL's query string. This illustrates a general principle of abstraction: anything internal to the application that _can_ be taken out of its public interface, should be. Obviously, the traditional query string isn't there yet.
I can fully understand your point, as in the point about amazon and the /sciencefiction/asminov querystring.
However, Visual Basic uses this syntax, and if you ever use ADO, or ADO.NET with parameters, you will also know that this kind of functionality is used. The reason it is used is because it allows you to ommit optional parameters. Similarly, if you could goto amazon.co.uk/author=asminov&category=sciencefiction, or amazon.co.uk/title=irobot&author=asminov, then surely this would be more usefull that trying to second guess whether you needed to enter the category then the author.
I can see how this kind of functionality can be usefull (especially if you have a good search engine for your site, so that going to http://www.foo.com/thing returns a search result for "thing" rather than a 404), but simply putting in place another method of passing parameters to the site isn't going to help, as users are rarely going to think of the same random URL as the programmer.
|
|
|
|

|
(For the authors):
I think you are confusing two different cases here, each of which demonstrates a different advantage of clean URIs:
Case 1: You have /www.foo.com/thing and the /thing is an interface to a resource that is reasonably represented by that term. This is like saying www.microsoft.com/word and getting the main Word homepage, for example. Here, the advantage of a clean URI is primarily for the end user seeking to find a resource, without necessarily knowing where it is in the site -- as you point out, it is a kind of search mechanism.
Case 2: You have actual URL parameters, some of which happen to be optional. In this case, if one wants to keep the URL as abstract as possible, optional arguments could easily be accomodated the way they are accomodated in most programming languages, namely as something that can be added to a call when necessary. Thus, just as both of these function calls will work:
foo(arg0, arg1, optarg0)
foo(arg0, arg1)
...so would both of these URLs:
www.foo.com/arg0/arg1/optarg0/
www.foo.com/arg0/arg1/
Here, the abstraction is not for the sake of end users, but rather for programmers -- those who build and maintain the application, and those who make use of it -- and the main benefit is not searchability or guessability, but interface persistence. Even VB, as verbose as it is compared to a terse language like C, still does not require that arguments be named when they are passed.
|
|
|
|

|
I like the query string to URLs. It makes it possible to specify parameters. For example, I can take google and be simple:
google.com/search?q=search
^-Google ^-Search ^-Query
Nice and clean. No need to type http://www.google.com/search?hl=nl&ie=ISO-8859-1&q=search&btnG=Zoeken&lr=
- Daniël Pelsmaeker
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
Changes are afoot in both development practices and Web server technology that should help advance URLs to the next generation.
| Type | Article |
| Licence | |
| First Posted | 20 May 2003 |
| Views | 62,736 |
| Bookmarked | 25 times |
|
|