Skip to content


RESTful Architecture Style Distilled: Joe goes Jeans Shopping – Part Two (Realworld Experiences)

Desperate Times, call for desperate measures

Maybe it's time to just go to a real shop, the online ones were going to charge delivery anyway.

Well he has find one close by, lucky google maps has a convenient local search with a google maps directly in the search results.

It's a tough call, Joe is pretty lazy, but they are two blocks away and there are time pressures.

The nearest shop to him is "Le Small Fry Jeans".
Would have been good if they had a map on their lousy web page, he would have noticed how close they were earlier, like the embedded google maps mashup on "JeanStop".
They were difficult to find, even with a map.
Joe: enters the shop
Joe: I'm looking for some jeans
ShopAssistant #1: parle-vous francais?
Joe: (Thinking) Crap, well this is going to be difficult, if we can't communicate.
Joe: parle-vous anglais?
Joe: I can't even use a simpler and common communication mechanism (like pointing), because all their stuff is hidden away,if only there were a universal way I could tell her what I'm after.
Joe: discovers a printed catalog and gestures
ShopAssistant #1: ?? Puzzled look - shows him the front cover, only seems to be for female jeans.

Joe, finally gives up at this stage, reaches for his iphone and checks for nearast jean shops to his current location...

A chance discovery: "SlickJeanService"

Well today might be his lucky day after all. Just around the corner is another shop he didn't even see on his search results.

They must have been further down the page.

He enters.

Apparently in order to streamline their business process they have instituted a new protocol.

This will make the shopping experience faster, apparently...

Except Joe has to learn and memorise the new protocol/commands to GET what he is after.

It looks kind of like a Noodle Bar setup, you know there are 3 steps, first step is to pick your noodle type, second step is soup/laksa...

Well that is different thinks Joe, I don't really know what I want yet, I'd like it to be like my last pair, I don't even really know how to describe them, I just know what I like.

He'll give it ago. Inside there are more signs about how you can not deviate from this one path of conversation, any attempt to discuss with a Shop Assistant, results in redirection back to the beginning of the path.

He takes a step closer to the start line, it is a very busy store...
Oh Oh, trouble, there is a new set of instructions that don't match the large menu set of instructions, more reading.
They are in a process of further streamlining.
Joe looks like a deer in the headlights.
These instructions don't make a lot of sense...
Initially, Your Date of Birth to determine your Chinese Zodiac Animal is required and a combination of some secret formula will place you at some position in a queue

Joe is getting mad, he has to learn a different way of just getting into a queue, let alone work out how to ask for jeans when he can barely describe what he is looking for.

Too much thinking, must leave... Lucky every shop doesn't work like this, that is way too much work for lazy joe, on to the next shop...

Be careful what you ask for

The next nearest shop to him is "JeanStop".

There are three shop assistants serving the same number of customers.
Joe has to queue until one completes a sale
Joe: I'm looking for some jeans
ShopAssistant #1: Yes, you have come to the right place, we sell jeans
Joe: Great, Can you show me what have you've got?
ShopAssistant #1: That will take too long, give me some more information
Joe: Ok, I want some jeans, I'm a size 87cm, with a straight cut, I haven't decided about the wash or colour yet?
ShopAssistant #1: Wait right here, let me see if we have some....
ShopAssistant #1: Yes we have too many for me to bring out, can you refine your search
Joe: is thinking how should he phrase his question when the clock strikes 10:15. The shop assistant without a word, disappears out the back... Did he just go a coffee break?
Joe: Spins around to one of the other free shop assistants
Joe: I was looking for some jeans, I told that other guy what I was after
ShopAssistant #2: Sorry, I wasn't listening to your conversation, I don't know what you want, you'll have to start again
Joe: AAAAAAAAAAAAAAAAHHHHHHHHHHHHHH!!
Joe: starts again, but notices ShopAssistant#2 has a training badge on...
ShopAssistant #2: I understand all of your requests from prior conversations, except for that last one.
ShopAssistant #2: I will have to ask someone else, can you wait for ShopAssistant #1 to return from his break?
Joe: This guy is a dumb version of the real thing. He can only relay questions that he has found out from ShopAssistant #1.
Joe: Right now he wishes he had a url (/jeans/levis/501?style=stonewash&cut=straight&length=short) or even a picture in a catalog to point out to the guy what he was looking for.

He is tired of wasting his time and heads to the next shop...

All I want is a pair of jeans

Location: "HowMuchAreThoseJeansinTheWindow"

It is really busy in here there are about 4 to 1 customers to shop assistants.

At this shop however they are quickly flitting about between customers taking new requests and it isn't long before Joe gets some attention.

Joe: I'm looking for some jeans
ShopAssistant #1: Yes, you have come to the right place, we sell jeans, let me help you choose what you are looking for.
ShopAssistant #1: Here is our latest catalog, in it you will find -- starts to rattle off a list of stock...
Joe: Great, Well I need something in size 33inches
ShopAssistant #1: Yes, this way, tell me more. Do you like prefer any of these cuts; styles or lengths...
Joe: A few more back and forth conversations later...
ShopAssistant #1: Excuse me Joe, I must attend to another customer request, just flip open your catalog so you can let me know where we were up to when I get back.
Joe: Wow, the shop assistant started speaking Dutch and talking to another customer, they to have a catalog in hand, looks like it is in their language as well.
Joe: He looks around and sees another Shop Assistant using sign language. Those guys really know how to communicate
Joe: Does some more browsing by himself
ShopAssistant #3: Hi Joe, so what were you looking for?
Joe: Armed with the trusty catalog, points where he was last at so he can continue his conversation, but with a different ShopAssistant.
Joe: After a few more suggested options from ShopAssistant #3 and Joe finds what he is after.
Joe: GET those jeans.

So what does this have to do with REST anyway

Did Joe finally get his pair of jeans?

Well that doesn't matter too much, when we are here to talk about REST.

If you stuck to the script, you've already seen a lot of evidence that REST describes and some that it doesn't.

By far the best experience Joe had was at the last Location "HowMuchAreThoseJeansinTheWindow".

This shop embodied most of the important constraints of REST and it was this shop that seemed the most scalable, just like the architecture of the Web. Only a few Shop Assistants serving many customers.

The first enablers for this ability is for clients to be able to identify what they want (Universal Addressability), eg. Joe pointing his finger in the catalog will be understood by any of the Shop Assistants. Secondly our Shop Assistants are Stateless, that is they can suspend conversations with one client and switch to servicing another, without the need of them to remember anything specific to a particular client or conversation.

Stateful components make integration a complex and expensive proposition, see: "JeansRUS".

The other great thing about that shop, was the way the assistants guided the client, they always answered questions and gave a choice of other available options.

They also talked in a standard manner (Uniform Interface), unlike "SlickJeanService" that tried to force new ways of doing things for the sake of their one store.

If we combine these features we make it really easy for a client like Joe to talk to our Shop Assistants.

So all Joe needs to know is:
  • where the front door is
  • negotiate preferred content
  • how to ask questions
  • how to follow options

Stay Tuned

We leave Joe, with a new pair of Jeans.

See part one for RESTful Architecture Style Distilled: Joe goes Jeans Shopping- Part One (Online Experiences) .

Join us next time for Part Three when we dissect the story further.

[Post to Twitter] Tweet This Post 

Posted in Uncategorized.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.


Tweet This Post links powered by Tweet This v1.3.9, a WordPress plugin for Twitter.