DOC PREVIEW
ODU CS 791 - REST REPRESENTATIONAL STATE TRANSFER

This preview shows page 1-2-3-19-20-39-40-41 out of 41 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

REST Representational State TransferPresentation OverviewMotivation Behind RESTWhat Is REST?Slide 5Slide 6Slide 7Slide 8Slide 9World Wide Web: A RESTfull DesignSlide 11Slide 12REST vs. RCP ApproachExample of RPC ApplicationExample of REST ApplicationREST vs. Web Services (RPC)REST in More DepthREST is about ArchitectureFirst Definition of RESTREST Architectural CharacteristicsSlide 21REST Operational CharacteristicsSlide 23Full Definition of RESTWhy REST?REST and Web SyndicationAmazon S3Slide 28SummaryQuestions and DiscussionSlide 31Slide 32Slide 33Slide 34Slide 35ReferencesExtrasSlide 38Slide 39Slide 40Slide 41RESTREPRESENTATIONALSTATETRANSFERScott Ainsworth & Louis Nguyen (Group 1)Old Dominion University, CS 791: Web Syndication Formats, January 29, 2008Presentation OverviewMotivation Behind RESTWhat is REST?A Simple ExampleThe Web: a RESTful designREST in more depthREST CharacteristicsWhy REST?REST vs. Web ServicesREST is a Syndication Enabler2Motivation Behind RESTRoy Fielding instrumental in Web architectureWent back for Ph.D.Called it RESTFormally define the Web architecture3What Is REST?A Simple, Concrete ExampleSuppose we have a Web bulletin boardSuppose we need to view, update, and delete messagesSuppose we follow common procedural programming practices4What Is REST?What message actions are required?Create messageView messageView message for updateDelete message5What Is REST?How do these actions map to HTTP and Web pages?Note the dependence on GET. Why is this?6Action HTTP MethodURLCreate MessagePOST http://bbs/msg.php?m=createView Message GET http://bbs/msg.php?m=view&id=12Update MessagePOST http://bbs/msg.php?m=update&Id=12Delete MessageGET http://bbs/msg.php?m=delete&id=12What Is REST?In addition to GET and PUT, HTTP protocol also includes:PUT: create or replace an objectDELETE: delete an object7What Is REST?How do the message actions map in REST?8Action HTTP MethodURLCreate MessagePOST http://bbs/message/newView Message GET http://bbs/message/12Update MessagePUT http://bbs/message/12Delete Message DELETE http://bbs/message/12What Is REST?HTTP methods POST, GET, PUT, and DELETE are often compared with Create, Read, Update, and Delete (CRUD) operations associated with database functions: HTTP CRUDPOST Create, UpdateGET ReadPUT Create, UpdateDELETE DeleteHTTP methods do not always correspond directly with a single database operation.9World Wide Web: A RESTfull DesignThe Web is example of RESTfull design that conforms to REST principles.The Web consist of HTTP, content types (HTML, etc), and DNS.HTML includes JavaScripts and applets to support code on demand (COD), which allows downloading and executing of code locally.COD provides improved extensibility and configurability, and better access to resources 10World Wide Web: A RESTfull DesignHTTP is a communications protocol used as a transport to request and retrieve information on the WebUniform Interface: URIs, methods, status codes, headers, and content typesSafe Methods: GET, HEAD, OPTIONS, and TRACERetrievals should not change the state of the server, ie. No side effectsGET with side effects: useful for delete/insert message from a database (GET /edit.cgi?action=new)Unsafe Methods: POST, PUT, DELETE 11World Wide Web: A RESTfull DesignHTTP based on client-server principle: separation of web server and browserWhen RESTful, HTTP is statelessClient request, and every thing needed to complete the request, can be processed by the any server without knowing previous request Stateless transaction exampleBuyer: Do you have a 1966 Ford Mustang for sale in Norfolk, VA?Ebay Server1: Yes, there’s one in near ODU and one in Ocean View area. Which one are you interested in?Buyer: I’m interested in buying a 1966 Ford Mustang near ODU in Norfolk, VA. Is it still for sale?Ebay Server2: Yes, here you go: ebay.com/odu_mustang12REST vs. RCP ApproachRemote Procedure Call (RPC) application exposed one or more resourcesProvides unique set method invocationResources are hidden and RCP applications must have knowledge of the resources in order to locate and communicate with itREST is more object orientedResources are highly visible and provided by URLClient can interact with resources uniformly and navigate/transverse between URL w/o much knowledge of the resources13Example of RPC ApplicationRPC OperationsgetUser() addUser() removeUser() updateUser()getLocation() addLocation() removeLocation()updateLocation() listUsers() listLocations()findLocation() findUser()RPC Client CodeexampleAppObject = new ExampleApp('example.com:1234')exampleAppObject.removeUser('001')14Example of REST ApplicationREST Define Resourceshttp://example.com/users/http://example.com/users/{user} (1 for each user)http://example.com/findUserFormhttp://example.com/locations/http://example.com/locations/{location} http://example.com/findLocationFormREST Client CodeuserResource =new Resource('http://example.com/users/001')userResource.delete()userResource.findLocationForm()15REST vs. Web Services (RPC)Web Services RESTProtocols SOAP (Simple Object Access Protocol) over HTTP.HTTPRequest MechanismXML over HTTP, usually POSTHTTPActions (verbs) Many different actions, which are hidden within the request body.Standard HTTP methods (GET, PUT, POST, DELETE)Security Additional SOAP-specific security layer.Web server securityWeb Server HTTP and Web server are simple conduits with much of their power and capability are bypassedHTTP and Web server exploited to fullest extent16REST in More DepthArchitecture and Architectural StyleREST CharacteristicsElementsConfigurationsConstraints, Principles, Guidelines17REST is about ArchitectureSoftware architectureAn abstraction of the elements, configurations, constraints, principles, and guidelines that govern a system’s design and evolution.Software architectural styleA set of constraints that restrict a software architecture.18First Definition of RESTA software architectural style for networked application architectures.19REST Architectural CharacteristicsElementsComponents: Perform computation.Take data as input and produce data as output.Examples: Web Servers, Gateways, Proxies, Applications, DBMSes, Web Browsers.Connectorsdefine interactions between components and encapsulate the details of transferring


View Full Document

ODU CS 791 - REST REPRESENTATIONAL STATE TRANSFER

Documents in this Course
Load more
Download REST REPRESENTATIONAL STATE TRANSFER
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view REST REPRESENTATIONAL STATE TRANSFER and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view REST REPRESENTATIONAL STATE TRANSFER 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?