SlideShare uma empresa Scribd logo
1 de 17
talks@goneopen.com
AkJS – May 2013
ANGULARJS & THE
PROMISE OF
HYPERMEDIA CLIENTS
Agenda
• Explaining links
• Code samples
Links – follow them and don‟t construct
them
Start and end point
It‟s all about connectedness
Hypermedia is defined by the presence of
control information embedded within the
information (message) presented to the client,
such that from the message, systems or users
obtain choices and select actions.
Adapted from: Fielding, 2001
Following the links
• the server provides the options per request
• the client traverses the links to make more
requests
What can you do?
What will these do?
<a href=“/orders/2”>My coffee</a>
<link rel=”stylesheet" type=”text/css" href
“/default.css” />
<form action=”/orders/” method=”post">
<input type=”radio” name=“type” value=“med”/>
<input type="submit” value=“Submit”/>
</form>
What might this do?
{
links:[
{ rel:"self", type:"application/json", href:"/orders/2" },
{ rel:”edit-media", type:”text/html", href:"/orders/2" },
{ rel:”index”, type:"application/json", href:"/orders/”
],
type:"medium”
}
Choose the links to follow
The web application
Application State
Client
Server
Resource
Representation
Resource
Internet
Following the links with promises
// ... ask for a representation
link.get(„HEAD‟, „collection‟, „application/json‟)
.done(function (content) {
// ... content is resource
})
Semantic Interface
Examples:
• first, last, collection, item, index, latest-item,
next-archive, current, edit-form, create-form,
next, prev
• pay, authenticator
Semantic Link: Example
<link rel="collection" type="application/json"
href=“http://localhost/orders/”/>
<link rel="authenticator" type="application/json"
href=“http://localhost/session/”/>
The code
Let‟s look at the code
that traverses those
messages
Let‟s keep our promises
Todd Brackley
goneopen.com
@toddbNZ
Useful refs (and referred to
materials)
• How to get a cup of coffee
http://www.infoq.com/articles/webber-rest-
workflow
• Hypermedia and node.js. Amundsen
• Restful WebServices
• Restful Web APIs
• Fielding‟s dissertation
• Test-Driven Web APIs on infoq.com
• Designing a RESTful Web API
REST a la Fielding (6 + 4 +/- 1)
• Client-Server
• Statelessness
• Cache
• Uniform Interface ---
>
• Layered System
• Code-on-demand
(optional but
increasingly
important)
• Identification of
Resources
• Manipulation of
resources through
representations
• Self-descriptive
messages
• Hypermedia as the
engine of application
state (HATEOAS)
The six minus one
The other four (interface
constraints)

Mais conteúdo relacionado

Semelhante a Angularjs and the promise of hypermedia clients

Ecommerce by bhawani nandan prasad
Ecommerce by bhawani nandan prasadEcommerce by bhawani nandan prasad
Ecommerce by bhawani nandan prasadBhawani N Prasad
 
Primavera unifier integration_wp
Primavera unifier integration_wpPrimavera unifier integration_wp
Primavera unifier integration_wpCampin Chou
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarAppfinz Technologies
 
Metrics that Matter-Approaches To Managing High Performing Websites
Metrics that Matter-Approaches To Managing High Performing WebsitesMetrics that Matter-Approaches To Managing High Performing Websites
Metrics that Matter-Approaches To Managing High Performing WebsitesBen Rushlo
 
Constraints Make You Sexy - What is Rest
Constraints Make You Sexy  - What is RestConstraints Make You Sexy  - What is Rest
Constraints Make You Sexy - What is Restanorqiu
 
purposssessgagagaagagaagagaaaaaaaaaaaaaa
purposssessgagagaagagaagagaaaaaaaaaaaaaapurposssessgagagaagagaagagaaaaaaaaaaaaaa
purposssessgagagaagagaagagaaaaaaaaaaaaaazaidAhmad84
 
session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.pptJayaprasanna4
 
Audit and outsourcing: their role in creating interoperable repository infras...
Audit and outsourcing: their role in creating interoperable repository infras...Audit and outsourcing: their role in creating interoperable repository infras...
Audit and outsourcing: their role in creating interoperable repository infras...Kevin Ashley
 
The Art and Science of Requirements Gathering
The Art and Science of Requirements GatheringThe Art and Science of Requirements Gathering
The Art and Science of Requirements GatheringVanessa Turke
 
API & Backend Integration
API & Backend IntegrationAPI & Backend Integration
API & Backend IntegrationElewayte
 
Understanding Web Analytics and Google Analytics
Understanding Web Analytics and Google AnalyticsUnderstanding Web Analytics and Google Analytics
Understanding Web Analytics and Google AnalyticsPrathamesh Kulkarni
 
Chap 5 software as a service (saass)
Chap 5 software as a service (saass)Chap 5 software as a service (saass)
Chap 5 software as a service (saass)Raj Sarode
 

Semelhante a Angularjs and the promise of hypermedia clients (20)

Ecommerce by bhawani nandan prasad
Ecommerce by bhawani nandan prasadEcommerce by bhawani nandan prasad
Ecommerce by bhawani nandan prasad
 
Restful webservices
Restful webservicesRestful webservices
Restful webservices
 
EAI (Integration) and Mulesoft
EAI (Integration) and MulesoftEAI (Integration) and Mulesoft
EAI (Integration) and Mulesoft
 
Primavera unifier integration_wp
Primavera unifier integration_wpPrimavera unifier integration_wp
Primavera unifier integration_wp
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumar
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
GLAM COLLECTION.pptx
GLAM COLLECTION.pptxGLAM COLLECTION.pptx
GLAM COLLECTION.pptx
 
contentDM
contentDMcontentDM
contentDM
 
Metrics that Matter-Approaches To Managing High Performing Websites
Metrics that Matter-Approaches To Managing High Performing WebsitesMetrics that Matter-Approaches To Managing High Performing Websites
Metrics that Matter-Approaches To Managing High Performing Websites
 
Constraints Make You Sexy - What is Rest
Constraints Make You Sexy  - What is RestConstraints Make You Sexy  - What is Rest
Constraints Make You Sexy - What is Rest
 
purposssessgagagaagagaagagaaaaaaaaaaaaaa
purposssessgagagaagagaagagaaaaaaaaaaaaaapurposssessgagagaagagaagagaaaaaaaaaaaaaa
purposssessgagagaagagaagagaaaaaaaaaaaaaa
 
session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.ppt
 
Web service architecture
Web service architectureWeb service architecture
Web service architecture
 
Audit and outsourcing: their role in creating interoperable repository infras...
Audit and outsourcing: their role in creating interoperable repository infras...Audit and outsourcing: their role in creating interoperable repository infras...
Audit and outsourcing: their role in creating interoperable repository infras...
 
Attribution modelling
Attribution modellingAttribution modelling
Attribution modelling
 
The Art and Science of Requirements Gathering
The Art and Science of Requirements GatheringThe Art and Science of Requirements Gathering
The Art and Science of Requirements Gathering
 
API & Backend Integration
API & Backend IntegrationAPI & Backend Integration
API & Backend Integration
 
Understanding Web Analytics and Google Analytics
Understanding Web Analytics and Google AnalyticsUnderstanding Web Analytics and Google Analytics
Understanding Web Analytics and Google Analytics
 
Chap 5 software as a service (saass)
Chap 5 software as a service (saass)Chap 5 software as a service (saass)
Chap 5 software as a service (saass)
 

Último

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
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
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
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
 
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
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Último (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 
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
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
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
 
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
 
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.
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Angularjs and the promise of hypermedia clients

  • 1. talks@goneopen.com AkJS – May 2013 ANGULARJS & THE PROMISE OF HYPERMEDIA CLIENTS
  • 3. Links – follow them and don‟t construct them Start and end point
  • 4. It‟s all about connectedness Hypermedia is defined by the presence of control information embedded within the information (message) presented to the client, such that from the message, systems or users obtain choices and select actions. Adapted from: Fielding, 2001
  • 5. Following the links • the server provides the options per request • the client traverses the links to make more requests
  • 7. What will these do? <a href=“/orders/2”>My coffee</a> <link rel=”stylesheet" type=”text/css" href “/default.css” /> <form action=”/orders/” method=”post"> <input type=”radio” name=“type” value=“med”/> <input type="submit” value=“Submit”/> </form>
  • 8. What might this do? { links:[ { rel:"self", type:"application/json", href:"/orders/2" }, { rel:”edit-media", type:”text/html", href:"/orders/2" }, { rel:”index”, type:"application/json", href:"/orders/” ], type:"medium” }
  • 9. Choose the links to follow The web application
  • 11. Following the links with promises // ... ask for a representation link.get(„HEAD‟, „collection‟, „application/json‟) .done(function (content) { // ... content is resource })
  • 12. Semantic Interface Examples: • first, last, collection, item, index, latest-item, next-archive, current, edit-form, create-form, next, prev • pay, authenticator
  • 13. Semantic Link: Example <link rel="collection" type="application/json" href=“http://localhost/orders/”/> <link rel="authenticator" type="application/json" href=“http://localhost/session/”/>
  • 14. The code Let‟s look at the code that traverses those messages
  • 15. Let‟s keep our promises Todd Brackley goneopen.com @toddbNZ
  • 16. Useful refs (and referred to materials) • How to get a cup of coffee http://www.infoq.com/articles/webber-rest- workflow • Hypermedia and node.js. Amundsen • Restful WebServices • Restful Web APIs • Fielding‟s dissertation • Test-Driven Web APIs on infoq.com • Designing a RESTful Web API
  • 17. REST a la Fielding (6 + 4 +/- 1) • Client-Server • Statelessness • Cache • Uniform Interface --- > • Layered System • Code-on-demand (optional but increasingly important) • Identification of Resources • Manipulation of resources through representations • Self-descriptive messages • Hypermedia as the engine of application state (HATEOAS) The six minus one The other four (interface constraints)

Notas do Editor

  1. Links and forms
  2. Known set of data contracts that we can use to obtain data