SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                1




                 5-Minute Introduction to REST
                                           (Learning REST by Example)

                                                     Roger L. Costello
                                                     Timothy D. Kehoe
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                2




                                                  What is REST?
             • REST is a design pattern.
             • It is a certain approach to creating Web
               Services.
             • To understand the REST design pattern,
               let's look at an example (learn by example).
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                3

                                  Example:
                         Airline Reservation Service
             • Suppose that an airline wants to create a
               telephone reservation system for customers
               to call in and make flight reservations.
             • The airline wants to ensure that its premier
               members get immediate service, its frequent
               flyer members get expedited service and all
               others get regular service.
             • There are two main approaches to
               implementing the reservation service...
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                                               4


                     Approach 1
         "Press 1 for Premier, Press 2 for…"
             The airline provides a single telephone number.
             Upon entry into the system a customer encounters an
             automated message, "Press 1 if you are a premier member,
             press 2 if you are a frequent flyer, press 3 for all others."
                                                                                                           Premier
                                                                                                          Customer
                                                                                                        Representative
      Premier Members
                                                                                                             F.F.
                                                                                            Answering
                                                                     Airline Reservations                 Customer
                                                                                             Machine    Representative
Frequent Flyer Members

                                                                                                           Regular
                                                                                                          Customer
                                                                                                        Representative
    Regular Members
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                                                       5



                                                           Approach 2
         Telephone Numbers are Cheap! Use Them!
             The airline provides several telephone numbers - one number
             for premier members, a different number for frequent flyers,
             and still another for regular customers.
                                                                                                         Premier
                                                                                 1-800-Premier          Customer
                                                                                                      Representative
              Premier Members

                                                                                                         F.F.
                                                                                 1-800-Frequent       Customer
                                                                                                    Representative
        Frequent Flyer Members
                                                                                                       Regular
                                                                                1-800-Reservation     Customer
                                                                                                    Representative
             Regular Members
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                6




                                                            Discussion
             • In Approach 1 the answering machine
               introduces an extra delay, which is particularly
               annoying to premier members. (Doesn't
               everyone hate those answering systems)
             • With Approach 2 there is no intermediate step.
               Premier members get instant pickup from a
               customer service representative. Others may
               have to wait for an operator.
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                7




                Web-Based Reservation Service
             • Suppose now the airline (kings-air.com) wants to
               provide a Web reservation service for customers
               to make flight reservations through the Web.
             • Just as with the telephone service, the airline
               wants to ensure that its premier members get
               immediate service, its frequent flyer members get
               expedited service, all others get regular service.
             • There are two main approaches to implementing
               the Web reservation service. The approaches are
               analogous to the telephone service...
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                                               8


                                             Approach 1
                                          One-Stop Shopping
             The airline provides a single URL. The Web service is
             responsible for examining incoming client requests to
             determine their priority and process them accordingly.

                          client
                                                                                                           Premier
             Premier Members                                                                              Customer

                                                                                   Web        Determine     F.F.
                         client                                                 Reservation    Priority   Customer
        Frequent Flyer Members                                                    Service
                                                                                                           Regular
                                                                                                          Customer

                         client
            Regular Members
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                9




                           Approach 1 Disadvantages
             • There is currently no industry accepted practice (rules) for
               expressing priorities, so rules would need to be made. The
               clients must learn the rule, and the Web service application
               must be written to understand the rule.
             • This approach is based upon the incorrect assumption that
               a URL is "expensive" and that their use must be rationed.
             • The Web service is a central point of failure. It is a
               bottleneck. Load balancing is a challenge.
             • It violates Tim Berners-Lee Web Design, Axiom 0 (see
               next slide).
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                            10



                                    Web Design, Axiom 0
                                   (Tim Berners-Lee, director of W3C)

             • Axiom 0: all resources on the Web must be
               uniquely identified with a URI.
                                                       URL1                     resource1



                                                       URL2                     resource2



                                                       URL3                     resource3
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.


                            Approach 2:
                                                                                                        11




                     URLs are Cheap! Use Them!
             The airline provides several URLs - one URL for premier
             members, a different URL for frequent flyers, and still
             another for regular customers.
                                                                                           Premier
                                           http://www.kings-air/reservations/premier       Member
                        client                                                            Reservation
              Premier Members                                                               Service


                                                                                           Frequent
                                       http://www.kings-air/reservations/frequent-flyer      Flyer
                 client                                                                   Reservation
        Frequent Flyer Members                                                              Service


                                                                                           Regular
                                           http://www.kings-air/reservations/regular       Member
                        client                                                            Reservation
                                                                                            Service
            Regular Members
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                12




                                 Approach 2 Advantages
             • The different URLs are discoverable by search engines and
               UDDI registries.
             • It's easy to understand what each service does simply by
               examining the URL, i.e., it exploits the Principle of Least
               Surprise.
             • There is no need to introduce rules. Priorities are elevated
               to the level of a URL. "What you see is what you get."
             • It's easy to implement high priority - simply assign a fast
               machine at the premier member URL.
             • There is no bottleneck. There is no central point of failure.
             • Consistent with Axiom 0.
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                13




                                                                     Recap
             • We have looked at a reservation service.
             • We have seen a telephone-based version
               and a Web-based version of the reservation
               service.
             • With each version we have seen two main
               approaches to implementing the service.
             • Which approach is the REST design pattern
               and which isn't? See the following slides.
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                                               14


                                        This Ain't the
                                      REST Design Pattern
                                                                                                           Premier
                                                                                                          Customer
                                                                                                        Representative
      Premier Members
                                                                                                             F.F.
                                                                                            Answering
                                                                      Airline Reservation                 Customer
                                                                                             Machine    Representative
Frequent Flyer Members

                                                                                                           Regular
                                                                                                          Customer
                                                                                                        Representative
    Regular Members
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                                                    15


                                         This is the
                                      REST Design Pattern
                                                                                                      Premier
                                                                                1-800-Premier        Customer
                                                                                                   Representative
             Premier Members

                                                                                                      F.F.
                                                                                1-800-Frequent     Customer
                                                                                                 Representative
        Frequent Flyer Members
                                                                                                    Regular
                                                                          1-800-Reservation        Customer
                                                                                                 Representative
            Regular Members
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                                                16


                                         This ain't the
                                      REST Design Pattern
                        client
                                                                                                           Premier
            Premier Members                                                                               Customer

                                                                                Reservation   Determine     F.F.
                        client                                                     Web         Priority   Customer
      Frequent Flyer Members                                                      Service
                                                                                                           Regular
                                                                                                          Customer

                        client
          Regular Members
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.


                                          This is the
                                                                                                                       17




                                      REST Design Pattern
                                                                                                          Premier
                                                         http://www.kings-air/reservations/premier        Member
                                       client                                                            Reservation
                             Premier Members                                                               Service


                                                                                                          Frequent
                                                      http://www.kings-air/reservations/frequent-flyer      Flyer
                                client                                                                   Reservation
                       Frequent Flyer Members                                                              Service


                                                                                                          Regular
                                                          http://www.kings-air/reservations/regular       Member
                                      client                                                             Reservation
                                                                                                           Service
                           Regular Members
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                18


              Two Fundamental Aspects of the
                  REST Design Pattern
             • Resources
                   Every distinguishable entity is a resource. A
                   resource may be a Web site, an HTML page, an
                   XML document, a Web service, a physical device,
                   etc.
             • URLs Identify Resources
                   Every resource is uniquely identified by a URL.
                   This is Tim Berners-Lee Web Design, Axiom 0.
Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved.
                                                                                                19


               The Three Fundamental Aspects
                 of the REST Design Pattern

                                                                 Resources



                                       URLs                                     Simple Operations

              In this tutorial we discussed how Resources and URLs are
              fundamental to REST. In a follow up tutorial we will discuss
              how Simple Operations are also fundamental to REST.

Weitere ähnliche Inhalte

Kürzlich hochgeladen

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

Empfohlen

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

5 minute-intro-to-rest

  • 1. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 1 5-Minute Introduction to REST (Learning REST by Example) Roger L. Costello Timothy D. Kehoe
  • 2. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 2 What is REST? • REST is a design pattern. • It is a certain approach to creating Web Services. • To understand the REST design pattern, let's look at an example (learn by example).
  • 3. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 3 Example: Airline Reservation Service • Suppose that an airline wants to create a telephone reservation system for customers to call in and make flight reservations. • The airline wants to ensure that its premier members get immediate service, its frequent flyer members get expedited service and all others get regular service. • There are two main approaches to implementing the reservation service...
  • 4. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 4 Approach 1 "Press 1 for Premier, Press 2 for…" The airline provides a single telephone number. Upon entry into the system a customer encounters an automated message, "Press 1 if you are a premier member, press 2 if you are a frequent flyer, press 3 for all others." Premier Customer Representative Premier Members F.F. Answering Airline Reservations Customer Machine Representative Frequent Flyer Members Regular Customer Representative Regular Members
  • 5. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 5 Approach 2 Telephone Numbers are Cheap! Use Them! The airline provides several telephone numbers - one number for premier members, a different number for frequent flyers, and still another for regular customers. Premier 1-800-Premier Customer Representative Premier Members F.F. 1-800-Frequent Customer Representative Frequent Flyer Members Regular 1-800-Reservation Customer Representative Regular Members
  • 6. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 6 Discussion • In Approach 1 the answering machine introduces an extra delay, which is particularly annoying to premier members. (Doesn't everyone hate those answering systems) • With Approach 2 there is no intermediate step. Premier members get instant pickup from a customer service representative. Others may have to wait for an operator.
  • 7. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 7 Web-Based Reservation Service • Suppose now the airline (kings-air.com) wants to provide a Web reservation service for customers to make flight reservations through the Web. • Just as with the telephone service, the airline wants to ensure that its premier members get immediate service, its frequent flyer members get expedited service, all others get regular service. • There are two main approaches to implementing the Web reservation service. The approaches are analogous to the telephone service...
  • 8. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 8 Approach 1 One-Stop Shopping The airline provides a single URL. The Web service is responsible for examining incoming client requests to determine their priority and process them accordingly. client Premier Premier Members Customer Web Determine F.F. client Reservation Priority Customer Frequent Flyer Members Service Regular Customer client Regular Members
  • 9. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 9 Approach 1 Disadvantages • There is currently no industry accepted practice (rules) for expressing priorities, so rules would need to be made. The clients must learn the rule, and the Web service application must be written to understand the rule. • This approach is based upon the incorrect assumption that a URL is "expensive" and that their use must be rationed. • The Web service is a central point of failure. It is a bottleneck. Load balancing is a challenge. • It violates Tim Berners-Lee Web Design, Axiom 0 (see next slide).
  • 10. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 10 Web Design, Axiom 0 (Tim Berners-Lee, director of W3C) • Axiom 0: all resources on the Web must be uniquely identified with a URI. URL1 resource1 URL2 resource2 URL3 resource3
  • 11. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. Approach 2: 11 URLs are Cheap! Use Them! The airline provides several URLs - one URL for premier members, a different URL for frequent flyers, and still another for regular customers. Premier http://www.kings-air/reservations/premier Member client Reservation Premier Members Service Frequent http://www.kings-air/reservations/frequent-flyer Flyer client Reservation Frequent Flyer Members Service Regular http://www.kings-air/reservations/regular Member client Reservation Service Regular Members
  • 12. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 12 Approach 2 Advantages • The different URLs are discoverable by search engines and UDDI registries. • It's easy to understand what each service does simply by examining the URL, i.e., it exploits the Principle of Least Surprise. • There is no need to introduce rules. Priorities are elevated to the level of a URL. "What you see is what you get." • It's easy to implement high priority - simply assign a fast machine at the premier member URL. • There is no bottleneck. There is no central point of failure. • Consistent with Axiom 0.
  • 13. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 13 Recap • We have looked at a reservation service. • We have seen a telephone-based version and a Web-based version of the reservation service. • With each version we have seen two main approaches to implementing the service. • Which approach is the REST design pattern and which isn't? See the following slides.
  • 14. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 14 This Ain't the REST Design Pattern Premier Customer Representative Premier Members F.F. Answering Airline Reservation Customer Machine Representative Frequent Flyer Members Regular Customer Representative Regular Members
  • 15. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 15 This is the REST Design Pattern Premier 1-800-Premier Customer Representative Premier Members F.F. 1-800-Frequent Customer Representative Frequent Flyer Members Regular 1-800-Reservation Customer Representative Regular Members
  • 16. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 16 This ain't the REST Design Pattern client Premier Premier Members Customer Reservation Determine F.F. client Web Priority Customer Frequent Flyer Members Service Regular Customer client Regular Members
  • 17. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. This is the 17 REST Design Pattern Premier http://www.kings-air/reservations/premier Member client Reservation Premier Members Service Frequent http://www.kings-air/reservations/frequent-flyer Flyer client Reservation Frequent Flyer Members Service Regular http://www.kings-air/reservations/regular Member client Reservation Service Regular Members
  • 18. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 18 Two Fundamental Aspects of the REST Design Pattern • Resources Every distinguishable entity is a resource. A resource may be a Web site, an HTML page, an XML document, a Web service, a physical device, etc. • URLs Identify Resources Every resource is uniquely identified by a URL. This is Tim Berners-Lee Web Design, Axiom 0.
  • 19. Copyright © [2005]. Roger L. Costello, Timothy D. Kehoe. All Rights Reserved. 19 The Three Fundamental Aspects of the REST Design Pattern Resources URLs Simple Operations In this tutorial we discussed how Resources and URLs are fundamental to REST. In a follow up tutorial we will discuss how Simple Operations are also fundamental to REST.