URLs are UI
hanselman.com
hanselman.com
http://urlme.me/<search_prhase_for_meme_image>/<top_text>/<bottom_text>.<ext>
http://urlme.me/http://urlme.me/simply/one_can't_simply/fix_the_web
..but your example might lead the way.
Also, I hope this stays up for a long time to come.
?host=imgur
To the URL and it will 301 to the image hosted on Imgur. That is assuming you have more faith in the longevity of Imgur than you do in the longevity of my side project :Dhttps://github.com/sammoorhouse/zendtrump/blob/master/zendtr...
@ZenDTrump
http://urlme.me/success/I,%20captbaritone/lick%20goats.jpg
This can get much nastier fast.
Next are you going to upload an image to imgur that "looks like" the creator of imgur is saying something bad?
http://urlme.me/philosoraptor/what%20if%20urls%20were%20actu...?
Where's my question mark? ;)
Nice idea and nice execution though, too bad the contraints work against it.
EDIT: Aaaaaand the UI broke on HN too!
FTFY.
But yeah, having to url encode stuff is annoying
HN would still remove the ? though.
The only difference is that you need to upload a selection of base images and assign shortnames to them, instead of entering a general search phrase.
example.com/sites/MySite/MyList.aspx
can be functionally the same as
example.com/sites/MySite/MyList.aspx?GUIDGUIDGUIDGUIDGUIDGUIDGUIDGUIDGUID=GUIDGUIDGUIDGUIDGUIDGUIDGUIDGUIDGUID&GUIDGUIDGUIDGUIDGUIDGUIDGUIDGUIDGUID=GUIDGUIDGUIDGUIDGUIDGUIDGUIDGUIDGUID&GUIDGUIDGUIDGUIDGUIDGUIDGUIDGUIDGUID=GUIDGUIDGUIDGUIDGUIDGUIDGUIDGUIDGUID&GUIDGUIDGUIDGUIDGUIDGUIDGUIDGUIDGUID=GUIDGUIDGUIDGUIDGUIDGUIDGUIDGUIDGUID
Why, SharePoint, why?
Or even worse, Angular SPAs
example.com/page#nice_page_you_have_there/shame_if_you_tried_to_share_it
As a tester, I always check:
1. What happens if I go to "example.com", "http://example.com", "https://example.com"
2. Sharing URLs - at least you should get a landing page, but I've seen 404s from shared URLs
I've been playing with drupal for a few weeks and there's the concept of an alias in drupal where everything is /node/{node-id} internally but the user sees the alias every time.
About angular 2+, you can have routes I believe. Like {base-url}/user/keganunderwood can show you the profile page for me. Even if you go to it directly.
1a. https://foo.com/
1b. https://www.foo.com/
2a. https://foo.com/search/products/couches/color/red
2b. https://foo.com/search?products=couches&color=red
3a. /posts?recent
3b. /posts?recent=
3c. /posts?recent=true
4a. /post/1234/products-couches-furniture-red-cheap-recent-ikea-tags
4b. /post/1234/
I can think of good reasons for picking each of these, and even good reasons for picking their alternatives. URL design is tricky to get right because realistically you can't change it later.4c. /post/_level/modular/1234--Products--Couches%20red+cheap%20ikeaTags%28OLD%29.aspx
Actually, tell me a few of these websites.
www for old folks, non www for all the rest.
> 2a. https://foo.com/search/products/couches/color/red > 2b. https://foo.com/search?products=couches&color=red
https://foo.com/search?products=couches&color=red
Those are parameters, not a path. The first one has only value as an SEO optimization.
> 3a. /posts?recent > 3b. /posts?recent= > 3c. /posts?recent=true
/posts/recent
> 4a. /post/1234/products-couches-furniture-red-cheap-recent-ikea-tags > 4b. /post/1234/
Both should work on your website, 4b should redirect on 4a.
That's kind of the point of the article - these are parameters for the programmer, but are UI to the user.
Separating parameters by "&", except for the first KVP which is separated by "?" from the URL is not intuitive. On the other hands, they path editing is familiar.
While I find it more visually pleasing, this is my issue with this style: traversing up would first include /search/product/couches/color, which doesn't make sense. I've seen alternatives like /color:red/ before - which takes away the pairing-problem but feels odd..
Of course, if the site is designed such that it forces you to pick those attributes in a specific order, that URL scheme would make sense (but that would be a poor design for other reasons).
There are technical reasons to consider, as well (yes, it's DNS again). If you want to receive emails @foo.com, you have to set MX records for foo.com., and that means you can't set a CNAME anymore - you'll have to make do with A/AAAA records.
For a lot of applications this is not an issue, but it does mean an overhead for highly distributed services. You won't see many global/high traffic companies drop the benefits 'www' gives. This is not purely to get the 'old folks' market.
(PS: The subdomain doesn't have to be www., of course - cnn goes with edition.cnn.com., for example.)
Also, I'm a single person, and I have multiple independent web sites. Many of them live under the same domain. Lots of companies have many more. You can play annoying tricks to smush them all into a single name (at least, most of the time), but why?
I think the world is ready to internalize the idea of hierarchic names, at least insofar as understanding they're independent entities grouped under the same name. Haven't seen any studies, but it seems like we're past the 'do I need the "www"'? point.
All that said, I also like short. The magic comes from knowing when to choose what, and I don't think you get there with rules-of-thumb alone.
https://foo.com/search?products=couches;color=red;show_recent;> The only thing that matters there is the 6380. Try it https://stackoverflow.com/users/6380 or https://stackoverflow.com/users/6380/fancy-pants also works. SO will even support this! http://stackoverflow.com/u/6380.
This works too: https://stackoverflow.com/users/6380/a3n
That doesn't seem right, and on a different site could even be dangerous.
This scheme is used on other sites, too.
It's yet another way to mislead. Just because other misleading schemes exist doesn't mean this isn't also misleading and potentially bad.
As for "How so" ... I didn't think it through. I'll go with "potentially not good," but equally not thought through. Since the subject of the article is URLs as UI, when you send someone a URL to "look at this", what they see is the URL, and in my example the human readable part is "the site" and "a3n", but what they get is nothing to do with a3n.
I can only intuitively start with "that's misleading," and imagine (but not point out) the possibility of "something bad". Maybe something merely annoying like rick-rolling.
Sure, you can create a weird looking or even misleading URLs that way but I don't think it's a big problem because 1/ as soon as the page load the URL gets rewritten to the real title and 2/ it's often very easy to obfuscate links regardless of that. Many platforms allow you to hide your links behind an href with some markup for instance, so you can make bogus links very easily. Think of something like:
<a href="http://evil.org/">http://google.com</a>
This is very common in spam emails.You can't even trust the browser's link preview tooltip because it can be overridden in JS. So in general it's a bad idea to blindly trust an URL "from the outside", slug or not.
I really, really wish youtube would do the same thing for instance, it's completely impossible to know what a youtube link is pointing towards. You could argue that they want short URLs but since they already have a "youtu.be" shortening service to make them even shorter it feels a bit redundant.
What!? Just tooltip, or status bar also?
Google does that for instance, if you hover on top of a search result it'll look like a direct like to the website, however if you look at the HTML source it looks something like this:
<a href="https://en.wiktionary.org/wiki/test" onmousedown="return rwt(this,'','','','2','AFQjCNHdfeYp_b4PzYbkDh9qequUqhrOQw','','0ahUKEwjmkPK0qfrUAhVD2hoKHSc9DG0QFggwMAE','','',event)">test - Wiktionary</a>
So even though the href goes to wikipedia in this case if I click the link the browser goes to a google page that then redirects me.You can see the real URL by right-clicking on the link and then hovering again, it causes the "onmousedown" code to run and replace the href by the real value.
Duckduckgo uses a "click" event handler instead. As far as I can't tell Bing doesn't do anything and directly links the target website, which is odd. I may be missing something.
Edit: but this has the potential to break links if the user changes their display name.
The fact of the matter is unskilled people are always going to be designing websites. This is OK!
However, it does mean that we should require them to do as little as possible so they have the best chance of getting it right. Asking them to design a second UI right from the start on top of the first HTML/JS one -- and then telling them never to change it(!) -- is a little much.
Instead of URLs, websites should have UUIDs to identify each resource. They should also have metadata describing what that resource is. The metadata (eg "articles/urls-are-uis") should be able to change without breaking links to the resource. Browsers should be intelligent enough so that when you hover over a link you see the metadata, not the UUID.
(This has one downside which if if you link to thing X and the UUID is later changed to point to thing Y, it may look like you linked to something you didn't mean to. This can be trivially fixed by including a "what the metadata was when I made the link" field in links along with the UUID)
EDIT: I'm actually not set on UUIDs specifically, they're a little long. Any random, non-meaningful identifier is fine.
Really I'm just saying that points 2 & 3 of the article are so good we should have made them the default (and perhaps only) option from the start.
For a blog, news, or other chronological content, I'd like to see a timestamp of some form. If it's rigidly hierarchical content, then a hierarchy (of which I should be able to remove 'subdirectories' to see the parent content) makes sense. Otherwise flat IDs are OK too.
Too bad browser developers seem to love hiding or mutilating them...
Regardless: I am quite serious... do you seriously try to remember and type, from memory, URLs with title slugs?
From one side I hear that hypertext should be the engine of application state. This implies that the URL router should control just about everything, and that you should be able to click a link in an email and jump directly to any state of your application. From the other side I hear that web apps can be just as capable as desktop apps, and it's only a matter of time before we'll be using PhotoshopJS in a browser.
What isn't said is that Photoshop has no concept of an "address bar", and it probably will never have one. As with so many things, the best practices for a blog or message board might be completely different from the best practices for a creative application. Could you design a URL format to represent the state of a Photoshop editing session? Would you even want to?
Something's gotta give.
If the URL represented state, then it should change as you're filling out an HTML form, at each keystroke. But instead there is one URL for the blank form and one after you click Submit.
A better rule is one URL per "document" or "record." So in your Photoshop example, there would be a different URL per file that you edit (www.photoshop.com/image001.psd) but not per edit. Well, if the app saved versions, then you could append ?v=203. But in general I think it's enough to align URLs to "documents" (like a news story) or "records" (like a particular profile in a contact database).
I'm referring to HATEOAS, the final and most demanding "stage" of RESTful API design: http://timelessrepo.com/haters-gonna-hateoas
> A better rule is one URL per "document" or "record." So in your Photoshop example, there would be a different URL per file that you edit (www.photoshop.com/image001.psd) but not per edit. Well, if the app saved versions, then you could append ?v=203. But in general I think it's enough to align URLs to "documents" (like a news story) or "records" (like a particular profile in a contact database).
This sounds like a good idea.
But for phishing .. with all the tricks possible with Unicode lookalikes, I wonder if people are still doing easily visible character exchanges? qoogle instead of google?
Proposed what? Great article and I completely agree with it, I'm frustrated perhaps daily by bad URLs, (I don't know if I've ever written a more lame description of myself!) but I was very confused by the ending.
I was expecting the author to propose a (informal, but) concrete system for URL UI. I know it's short of implicit throughout, but a summary would be good.
While it is nice UI, it's probably SEO first. This ensures keywords in the URL while making it safe to mangle.
Since Twitter gives all links the same allotment of characters, it's really frustrating that people insist on sticking to shorturls.
Goes to show how tracking and advertising keeps ruining the Web.
Does it? The documentation I've read doesn't suggest this, unless you're including Twitter's own wrapping of links with its own shortURL t.co
Having entries like the following in my calendar app would be amazing:
"Company event on <date>, for details see linked email"
I remember Tim had a diagram that showed "links" between all different systems, all addressable by URI/URL.