Slide 1

Slide 1 text

@andyhume UX Camp Brighton • 1st October 2011 FRIENDLY URLS THE CULT OF

Slide 2

Slide 2 text

WHAT IS FRIENDLY? readable/clean reflect structure and hierarchy of data hackable shareable

Slide 3

Slide 3 text

They help orient users in your architecture. [avoid] exposing the mechanism of how you run your server. “ “ Jesse James Garrett Tim Berners-Lee

Slide 4

Slide 4 text

WHAT IS FRIENDLY? /cgibin/post.pl?id=13213 /post?id=13213 /posts/?year=2008&month=feb&day=23 /posts/2008/feb/23/ /post?id=13213 /post/my-blog-post /posts/2008/feb/23/ /posts/2008/jan/23/

Slide 5

Slide 5 text

Clean URLs, RESTful URLs or user- friendly URLs are purely structural URLs that do not contain a query string “ Wikipedia

Slide 6

Slide 6 text

Clean URLs, RESTful URLs or user- friendly URLs are purely structural URLs that do not contain a query string “ Wikipedia

Slide 7

Slide 7 text

STILL FRIENDLY? /place/lat/50.81754/lon/-0.03124/category/banks/poi/cashpoint YOUR WEBSITE IS YOUR API

Slide 8

Slide 8 text

REST... ANYONE? Um... Friendly URLs Er... Not SOAP Hm... Flickr API “

Slide 9

Slide 9 text

ROY FIELDING Why is the web successful?

Slide 10

Slide 10 text

UNIFORM INTERFACE GET POST DELETE RESOURCE ORIENTED /photos/12345 DOING THINGS TO OBJECTS

Slide 11

Slide 11 text

AN HTTP REQUEST GET /photos/12345 Host: www.flickr.com GET /my-bucket/pdf/12345.pdf Host: aws.amazon.com

Slide 12

Slide 12 text

QUERY STRINGS ...contain data to be passed to web applications. “ Wikipedia the knobs of URLs “ Kyle Neath, Github

Slide 13

Slide 13 text

RESOURCE OR SEARCH? /UK/Sussex/Brighton/North+Laine THIS IS A SEARCH BASED ON A STRING /maps/?q=North+Laine, Brighton, Sussex, UK THIS IS A REQUEST FOR A DISTINCT RESOURCE

Slide 14

Slide 14 text

WARNING SIGNS /typefaces/slabserif/clarendonbracketed/tags/rubbish INTERCHANGEBLE DIRECTORIES /nuts/salted/toasted/kosher /nuts/salted/kosher/toasted RETURNS EMPTY LIST NOT 404

Slide 15

Slide 15 text

AMAZON http://www.amazon.co.uk/Sharp-LC40LE811E-40-inch-Freeview- Technology/dp/B003IC4F58/ref=sr_1_1? ie=UTF8&qid=1317461997&sr=8-1

Slide 16

Slide 16 text

THE INDEPENDENT http://www.independent.co.uk/life-style/food-and-drink/kate- middleton-jelly-bean-expected-to-fetch-500-2269573.html http://www.independent.co.uk/life-style/food-and-drink/utter-PR- fiction-but-people-love-this-shit-so-fuck-it-lets-just-print- it-2269573.html

Slide 17

Slide 17 text

TWITTER http://twitter.com/#!/andyhume

Slide 18

Slide 18 text

FACETED SEARCH /cars?brand=ford&model=escort&year=1980 FULL HIERARCHY /cars/ford/escort/1980 FULL QUERY STRING /cars/ford/escort?year=1980 RANDOM SEPARATOR /cars/ford,escort,1980 HIERARCHY/QUERYSTRING HYBRID

Slide 19

Slide 19 text

APPLICATION STATE /maps/Sussex/Brighton/North+Laine THIS IS APPLICATION STATE /maps? f=q&source=s_q&hl=en&geocode=&q=clearleft&aq=&sll=50.819522, -0.13642&sspn=0.197161,0.313454&g=brighton&ie=UTF8&z=12&iwl THIS IS A RESOURCE

Slide 20

Slide 20 text

WHAT’S THE POINT? ...of making application state data friendly/clean? ...of exposing application state to users? ...of address bars? BIG POINT GOES HERE

Slide 21

Slide 21 text

WATCH OUT ...for people trying to ‘friendlyerise’ application state ...for people trying to ‘friendlyerise’ search queries BIG POINT GOES HERE