Present Online
Send the link below via email or IM to invite your audience
Start the presentation
- Invited audience will follow you as you navigate and present
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can view together your prezi
- Learn more about this feature in the manual
Download prezi for:
Present offline on a PC or Mac.
- Embedded YouTube videos need an active Internet connection to play.
- Portable prezis are not editable.
Edit and present offline with Prezi Desktop
- To open PEZ file, please download Prezi Desktop
Do you really want to delete this prezi?
Neither you, nor the coeditors you shared it with will be able to recover it again.
Make your likes visible on Facebook?
Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.
REST
Rest interaction using hyper media control.
by Amir Rajan
on 12 August 2011
Tweet
Prezi Transcript
Client server Verb: HTTP/GET
Url: '/'
authorization: user@example.com Well known entry point:
verb: HTTP/GET
url: '/' Content-type: 'application/root'
Body:
{
Links:
[
{
Rel: "CreateUser",
Href: "/Users",
Meta: { Name: "Sample name" }
}
]
} User doesn't exist Verb: HTTP/POST
Url: '/users'
authorization: user@example.com
Content-type: application/json
body:
{ Name: 'Jane Doe' } creates/updates user Content-type: 'application/user'
{
Name: "Jane Doe",
Links:
[
{
Rel: "UpdateUser",
Href: "/Users"
Meta: { Name: "Sample name" }
},
{
Rel: "GetBlogsPosts",
Href: "/Blogs"
}
]
} Verb: HTTP/GET
Url: '/Blogs'
authorization: user@example.com get blog posts for user Content-type: 'application/blogs'
{
Items:
[
],
Links:
[
{
Rel: "AddBlogPost",
Href: "/Blogs/Add",
Meta: { Title: "Sample", Body: "Sample" }
}
]
} Verb: HTTP/POST
Url: '/blogs/add'
authorization: user@example.com
Content-type: application/json
body:
{ Title: "Restful Architectures", Body: "Hello World" } add blog to user's account Content-type: 'application/blogs'
{
Items:
[
{
Title: "Restful Architectures",
Links:
[
{
Rel: "Delete",
Href: "/Blogs/Delete/1",
},
{
Rel: "Detail",
Href: "/Blogs/Detail/1"
},
{
Rel: "Update",
Href: "/Blogs/Update/1",
Meta: { Title: "Sample", Body: "Sample" }
}
]
}
],
Links:
[
{
Rel: "AddBlogPost",
Href: "/Blogs/Add",
Meta: { Title: "Sample", Body: "Sample" }
}
]
} return the blog's detail Content-type: 'application/blog'
{
Title: "Restful Architectures",
Body: "Hello World",
Links:
[
{
Rel: "Delete",
Href: "/Blogs/Delete/1",
},
{
Rel: "Update",
Href: "/Blogs/Update/1",
Meta: { Title: "Sample", Body: "Sample" }
},
{
Rel: "GetBlogsPosts",
Href: "/Blogs"
}
]
} Verb: HTTP/GET
Url: '/Blogs/Detail/1'
authorization: user@example.com Rest Like The Best*
Amir Rajan
Improving Enterprises
www.amirrajan.net
@amirrajan Why Rest? what's Rest? Rpc relates to REST
as
Soap relates to ??? Hypermedia Control
The links tell me where I can go, and will only point to valid transitions the "works for me" protocol Uniform Interface:
everything comes back with a content-type that maps to an application type
everything has a "links" collection (if there are any valid ones) well known entry points to the application
root: "/" (definitley)
Maybe some other ones: eg: "/blogs/{id}" application/json
json is awesome, and that's what you'll get back,
...alternately you can use xml... I dont use HTTP/PUTS cause they make my head hurt
Posts can save or update...I'm just going to leave it
at that and not make my consumers guess Let's create a blog service!
See the full transcript




