Learning Something About the URL

Alan Skorkin has written a nice article on the essentials of the URL. He argues that since all programmers are likely to encounter web programming at some point, the URL is one of the fundamentals of programming that developers should master. I agree with this.

There are a couple of things I found interesting in the article. First, Alan describes the path component of a URL as “basically [something that] tells us where on the server machine a resource lives”. While this is often true, particularly historically, it’s clear that URLs increasingly represent concepts rather than files. In his book The Art of Rails, Edward Benson points out that web developers are more and more often crafting URLs to represent high-level concepts, and the URL thus plays the role of the API for web applications. Frameworks such as Ruby on Rails certainly encourage this.

And then later in the article I discovered something I didn’t know about URLs: a path component can contain parameters, and these parameters are distinct from query parameters. Take this URL for example:

http://example.com/name1;p1=v1/name2;p2=v2?q1=w1&q2=w2

Here, p1 and p2 are path parameters, and v1 and v2 are their corresponding values, while q1 and q2 are query parameters with w1 and w2 their corresponding values.

Anyway, Alan’s article is a good discussion of the URL for developers. I found it useful, and my grip on one of programming’s fundamentals is now slightly tighter.

Explore posts in the same categories: Uncategorized

Leave a comment