CS 4720 RESTfulness CS 4720 – Web & Mobile Systems.

Slides:



Advertisements
Similar presentations
EC Admin Functionality Enhancements December 2001 Release
Advertisements

Pierre-Johan CHARTRE Java EE - JAX-RS - Pierre-Johan CHARTRE
1. XP 2 * The Web is a collection of files that reside on computers, called Web servers. * Web servers are connected to each other through the Internet.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 The Web Wizards Guide to PHP by David Lash.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Using Perl for CGI Programming.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
7 Copyright © 2005, Oracle. All rights reserved. Maintaining State in J2EE Applications.
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
System Wide Information Management (SWIM)
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
ZMQS ZMQS
REST - Representational State Transfer
REST & SOAP Peter Drayton
Representational State Transfer (REST): Representing Information in Web 2.0 Applications this is the presentation Emilio F Zegarra CS 2650.
Service Oriented Architecture
REST Vs. SOAP.
REST Introduction 吴海生 博克软件(杭州)有限公司.
Building and using REST information services Rion Dooley.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Applied Architectures Software Architecture Lecture 17.
IDU0075 Sissejuhatus veebiteenustesse
Server Access The REST of the Story David Cleary
REST (Representational State Transfer)
Web Service Testing RESTful Web Services Snejina Lazarova Dimo Mitev
Programming Web Services: RPC via SOAP and REST. 2Service-Oriented Computing RPC via SOAP A Web service is typically invoked by sending a SOAP message.
BT Wholesale October Creating your own telephone network WHOLESALE CALLS LINE ASSOCIATED.
© 2011 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary. Towards a Model-Based Characterization of Data and Services Integration Paul.
ABC Technology Project
1 Kerberos Anita Jones November, Kerberos * : Objective Assumed environment Assumed environment –Open distributed environment –Wireless and Ethernetted.
The World Wide Web. 2 The Web is an infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that.
CREATING A PAYMENT REQUEST FOR A NEW VENDOR
©2007 First Wave Consulting, LLC A better way to do business. Period This is definitely NOT your father’s standard operating procedure.
Squares and Square Root WALK. Solve each problem REVIEW:
Getting Familiar with Web Pages 1 2 The Internet Worldwide collection of interconnected computer networks that enables businesses, organizations, governments,
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
25 seconds left…...
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Week 1.
We will resume in: 25 Minutes.
1 PART 1 ILLUSTRATION OF DOCUMENTS  Brief introduction to the documents contained in the envelope  Detailed clarification of the documents content.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 31 Slide 1 Service-centric Software Engineering 1.
Introduction Peter Dolog dolog [at] cs [dot] aau [dot] dk Intelligent Web and Information Systems September 9, 2010.
Web Architecture & Services (2) Representational State Transfer (REST)
REST.  REST is an acronym standing for Representational State Transfer  A software architecture style for building scalable web services  Typically,
Wyatt Pearsall November  HyperText Transfer Protocol.
REST - Introduction Based on material from InfoQ.com (Stefan Tilkov) And slides from MindTouch.com (Steve Bjorg) 1.
1 Seminar on Service Oriented Architecture Principles of REST.
Web Database Programming Week 7 Session Management & Authentication.
Advanced Web Technologies Lecture #4 By: Faraz Ahmed.
Representational State Transfer (REST). What is REST? Network Architectural style Overview: –Resources are defined and addressed –Transmits domain-specific.
CS 4720 Model-View-Controller CS 4720 – Web & Mobile Systems.
RESTful Web Services What is RESTful?
Web Technologies Lecture 10 Web services. From W3C – A software system designed to support interoperable machine-to-machine interaction over a network.
Persistence Maintaining state: Queries. State is the Problem What is state? facebook status logins (which user are you?) conversations talking about what?
WEB SECURITY WEEK 1 Computer Security Group University of Texas at Dallas.
REST API Design. Application API API = Application Programming Interface APIs expose functionality of an application or service that exists independently.
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
REST- Representational State Transfer Enn Õunapuu
Representational State Transfer
WEB API.
$, $$, $$$ API testing Edition
WEB SERVICES From Chapter 19, Distributed Systems
Presentation transcript:

CS 4720 RESTfulness CS 4720 – Web & Mobile Systems

CS 4720 And verily the Intarwebz were created The evolution of the web –Server / Client –Simple pages –Web applications 2

CS 4720 And verily the Intarwebz were created 3

CS 4720 And verily the Intarwebz were created 4

CS 4720 And verily the Intarwebz were created 5

CS 4720 The Statefulness… or lack there of… How does state play into SIS? Why? How? 6

CS 4720 Nouns speak louder than… verbs… Look at the links in SIS What are they? Verbs. This is the evolution of the web –We have tried to force the web into the same mold as stand-alone programs –This is not good! –We need to take advantage of the asynchronous nature of web communication! 7

CS 4720 REST Definition: REST –Representation State Transfer –a software architectural style for distributed hypermedia systems, such as the web –(but not necessarily the web) 8

CS 4720 Principles of REST 1. Statelessness In the simplest terms, this principle forbids for any state information to be stored on the server This does not forbid state to be stored client- side Every message though must contain all information needed for understanding 9

CS 4720 Principles of REST 2. Idempotency The output of identical requests is itself identical In other words, if you go to the same page twice, you get the same page (barring changes in the content model) Allows for caching, which improves user- perceived responsiveness 10

CS 4720 Principles of REST 3. Addressable Resources Everything has its place and every place has a thing Everything is a resource See amazon.com for a good example URLs reflect the resource 11

CS 4720 Principles of REST 4. Well-defined operations In the context of the Web and HTTP, were talking: –POST –GET –PUT –DELETE This reflects possible actions 12

CS 4720 Principles of REST 5. Formatted/Structured Data The resources you get should be encoded in a uniform way (like HTML, XML, etc.) 13

CS 4720 Sounds good… but… Sure sounds hard to pull off good web apps with these constraints… Lets think about a shopping application Whats the usual way? 14

CS 4720 RESTful Shopping What are the actions that you want to take in a shopping application? 15

CS 4720 RESTful Shopping In real life, who holds the shopping cart? You, or your personal shopping buddy provided by the store? If its you (and I hope it is) where do you store cart information? –In a frame? (UGH… I just threw up a little in my mouth) –In a cookie? (not what its meant for!) –HTML5 SessionStorage object … eventually 16

CS 4720 RESTful Shopping Well, just for argument, well give you your shopping buddy (well call him Carl) In this instance, the shopper will be asking the store to set aside items for them The difference here is basically philosophical, but bear with me If we treat the cart as part of the STORE and not owned by the CLIENT, then RESTfulness can still be maintained 17

CS 4720 RESTful Shopping 18 SenderMessage ClientShow me your products. ServerHeres a list of products. ClientOkay, Id like to buy 2 of place it in my basket, my username is XtremeShopper and password is bubbahttp://shop.com/product/X ServerDone. Ive put it in your basket at ClientActually, I dont need 1 of those. Please remove one of X from my basket, my username is XtremeShopper and password is bubba ServerDone. Ive removed it from your basket at ClientGreat. Ring it up - username is XtremeShopper password is bubba ServerShould I charge that to your account?

CS 4720 RESTful Shopping Uh… wasnt that a session? Not quite – a session disappears when the user does –Theoretically, this would be around until the user removes everything or checks out It is addressable, its formatted, its idempotent, and it uses defined operations The differences are very subtle, but they are there 19

CS 4720 Sounds good… but… REST means that the server is stateless and cannot store any data about the clients current state/session This example was a bit extreme Like most things, moderation is the key to getting the right balance between server and client resource utilization 20

CS 4720 Your turn Lets go find some RESTful and non-RESTful apps. Why are they behaving that way? Why do you think they were designed this way? 21

CS Review REST REST: Representational State Transfer It is a software architecture style / philosophy, not a protocol / system / etc. Main Principles: Stateless client-server – No state info is stored server- side Identification of resources - Individual resources are identified in requests, for example using URIs Manipulation of resources through a simplified set of operations – In HTTP, POST, GET, PUT, and DELETE The use of structured data – Such as HTML or XML

CS 4720 REST Examples What web systems are RESTful? Others? –CS4720 homepage? Yes. –cnn.com? Potentially. –Collab? The architecture potentially, but not the individual modules. –SIS? Is there a rule it doesnt break? Remember the fundamental concept: nouns (resources), not verbs (actions) to interact 23