Live data from Hacker News

URLs are UI

hanselman.com

71–80 of 96 posts

Re: URLs are UI

#71
post #65

This is all solid advice, but there's something that still bothers me about URLs: 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,…

If you're using non-destructive editing a URL might indeed be helpful for sharing the progress and evolution of a file with others. Something like photoshop.app/jdavis703/file/oceanview.psd/layer/colorcorrect might be really useful.

That's a really interesting idea.

Re: URLs are UI

#72
post #40
post #31

> I love Stack Overflow's URLs. Here's an example: https://stackoverflow.com/users/6380/scott-hanselman > 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 differe…

That's a "slug", it's extremely common and IMO a good thing. 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 bo…

> You can't even trust the browser's link preview tooltip because it can be overridden in JS.

What!? Just tooltip, or status bar also?

Re: URLs are UI

#73

Earlier quoted context omitted.

> 1a. https://foo.com/ > 1b. https://www.foo.com/ 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/rec…

I disagree with 1 as a blanket statement. 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 globa…

Yep. The DNS hierarchy exists for a reason, and if you have a bunch of machines, you want to use it.

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.

Re: URLs are UI

#74

I agree with the article, and I really don't understand how Google Search can be so bad with URLs. Seems they get more and more paramenters every time I look, to the point my browser (Safari) hides the URL just for them.

Google Search is perhaps the definitive example of a site with no interest in human-readable URLs. Google wants you to navigate the web using Google, not by cutting and pasting URLs.

Plus it would be a bit ironic if the Google Search page itself cared for SEO :)

Re: URLs are UI

#75
post #62

I made a little project taking this idea to an extreme. The idea was, that you should be able to generate "meme" image macros simply by typing a URL. That way you could create memes on the fly anywhere that you can enter a URL (Slack/Twitter/Facebook/etc.) without having to leave the app. Just type a URL of the form: http://urlme.me/ / / . http://urlme.me/

And this is why URLs as input don't work: 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!

With slightly different server-side handling, that could work.

HN would still remove the ? though.

Re: URLs are UI

#78
post #31

> I love Stack Overflow's URLs. Here's an example: https://stackoverflow.com/users/6380/scott-hanselman > 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 differe…

I don't know how this works in different frameworks, but in principle, nothing prevents you from arranging it so that /user/6380/hanselman is valid but /user/6380/[somethingelse] 404s.

Edit: but this has the potential to break links if the user changes their display name.

Re: URLs are UI

#79
post #60

I made a little project taking this idea to an extreme. The idea was, that you should be able to generate "meme" image macros simply by typing a URL. That way you could create memes on the fly anywhere that you can enter a URL (Slack/Twitter/Facebook/etc.) without having to leave the app. Just type a URL of the form: http://urlme.me/ / / . http://urlme.me/

The 'x' (#cancel-copy) does nothing. You've to focus/blur #link to go back.

Ah, thanks for catching that. I've created an issue here: https://github.com/captbaritone/urlmeme/issues/13

Re: URLs are UI

#80

Which of the following URLS are clearer? 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…

I think this is more user friendly.

    https://foo.com/search?products=couches;color=red;show_recent;
Post reply on HN