The document discusses hypermedia APIs and provides examples of how to design hypermedia types and representations. Some key points discussed include:
- Defining base formats, state transfer methods, domain styles, and application flow for hypermedia types
- Examples of link and control "h-factors" that can be included in representations
- Designing hypermedia representations for a sample message board application, including resources for messages and users
- Examples of representations that include links to provide navigation and state transitions between resources
An introduction to REST and RESTful web services.
You can take the course below to learn about REST & RESTful web services.
https://www.udemy.com/building-php-restful-web-services/
What is REST?
What is RESTful Webservices
HTTP-REST Request Basics
HTTP-REST Vocabulary
Authentication (OAuth)
OAuth 2.0 Web Server Flow
REST APIs using Apex REST
Resources
This presentation gives a high level concepts and more of code to take a stab at developing a simple Restful server. I targeted people who would like to build a simple RESTFul server from scratch and experiment.
Overview of REST web service concepts (Representational State Transfer).
REST is a radically different approach for web services compared to the combo SOAP/WSDL.
REST defines an architectural style for web applications and web services.
REST makes heavy use of the underlying HTTP protocol.
REST itself is not a protocol but defines architectural principles based on the concept of addressable resources and a uniform access to these resources based on the well-known HTTP-methods GET, POST, PUT and DELETE.
The state of a client (web service consumer) is controlled by the REST web service through connected links between resources (resource oriented architecture). The client state however is stored on the client itself thus greatly increasing scalability of REST-based architectures.
The REST paradigm has mostly superseded SOAP / WSDL type web services in many enterprise applications. This is largely owed to the fact that the underlying HTTP protocol is well understood and proved its scalability in the WWW.
An introduction to REST and RESTful web services.
You can take the course below to learn about REST & RESTful web services.
https://www.udemy.com/building-php-restful-web-services/
What is REST?
What is RESTful Webservices
HTTP-REST Request Basics
HTTP-REST Vocabulary
Authentication (OAuth)
OAuth 2.0 Web Server Flow
REST APIs using Apex REST
Resources
This presentation gives a high level concepts and more of code to take a stab at developing a simple Restful server. I targeted people who would like to build a simple RESTFul server from scratch and experiment.
Overview of REST web service concepts (Representational State Transfer).
REST is a radically different approach for web services compared to the combo SOAP/WSDL.
REST defines an architectural style for web applications and web services.
REST makes heavy use of the underlying HTTP protocol.
REST itself is not a protocol but defines architectural principles based on the concept of addressable resources and a uniform access to these resources based on the well-known HTTP-methods GET, POST, PUT and DELETE.
The state of a client (web service consumer) is controlled by the REST web service through connected links between resources (resource oriented architecture). The client state however is stored on the client itself thus greatly increasing scalability of REST-based architectures.
The REST paradigm has mostly superseded SOAP / WSDL type web services in many enterprise applications. This is largely owed to the fact that the underlying HTTP protocol is well understood and proved its scalability in the WWW.
The glory of REST in Java: Spring HATEOAS, RAML, Temenos IRISGeert Pante
-Introduction to REST and REST Maturity
-Spring HATEOAS
-RAML: RESTful API Modeling Language
-IRIS: Temenos Interaction, Reporting & Information Services
Les Hazlewood, Stormpath co-founder and CTO and the Apache Shiro PMC Chair demonstrates how to design a beautiful REST + JSON API. Includes the principles of RESTful design, how REST differs from XML, tips for increasing adoption of your API, and security concerns.
Presentation video: https://www.youtube.com/watch?v=5WXYw4J4QOU
More info: http://www.stormpath.com/blog/designing-rest-json-apis
Further reading: http://www.stormpath.com/blog
Sign up for Stormpath: https://api.stormpath.com/register
Stormpath is a user management and authentication service for developers. By offloading user management and authentication to Stormpath, developers can bring applications to market faster, reduce development costs, and protect their users. Easy and secure, the flexible cloud service can manage millions of users with a scalable pricing model.
Building RESTful applications using Spring MVCIndicThreads
REST is an alternate and simpler approach for implementing WebServices. It is based on the HTTP protocol and hence leverages a lot of existing infrastructures. It uses an uniform interface thus making it easy to build client applications. In this session we will look at the fundamental concepts behind REST (Resource, URI, Stateless Conversation ..) and how to apply it in the context of a real applcation. We will also discuss the pros & cons of RESTful vs Soap based webservices. We will discuss the design of RESTful application and then look at how to implement it using Spring MVC.
The glory of REST in Java: Spring HATEOAS, RAML, Temenos IRISGeert Pante
-Introduction to REST and REST Maturity
-Spring HATEOAS
-RAML: RESTful API Modeling Language
-IRIS: Temenos Interaction, Reporting & Information Services
Les Hazlewood, Stormpath co-founder and CTO and the Apache Shiro PMC Chair demonstrates how to design a beautiful REST + JSON API. Includes the principles of RESTful design, how REST differs from XML, tips for increasing adoption of your API, and security concerns.
Presentation video: https://www.youtube.com/watch?v=5WXYw4J4QOU
More info: http://www.stormpath.com/blog/designing-rest-json-apis
Further reading: http://www.stormpath.com/blog
Sign up for Stormpath: https://api.stormpath.com/register
Stormpath is a user management and authentication service for developers. By offloading user management and authentication to Stormpath, developers can bring applications to market faster, reduce development costs, and protect their users. Easy and secure, the flexible cloud service can manage millions of users with a scalable pricing model.
Building RESTful applications using Spring MVCIndicThreads
REST is an alternate and simpler approach for implementing WebServices. It is based on the HTTP protocol and hence leverages a lot of existing infrastructures. It uses an uniform interface thus making it easy to build client applications. In this session we will look at the fundamental concepts behind REST (Resource, URI, Stateless Conversation ..) and how to apply it in the context of a real applcation. We will also discuss the pros & cons of RESTful vs Soap based webservices. We will discuss the design of RESTful application and then look at how to implement it using Spring MVC.
Principles and patterns of object oriented design. answering the most common questions faced when designing a system, e.g., how to model the domain? how to prepare the code for modification? how to handle an object's life cycle?
An Authentication and Authorization Architecture for a Microservices WorldVMware Tanzu
SpringOne Platform 2016
Speaker: David Ferriera; Director, Cloud Technology, Forgerock
Microservices architecture elevates the challenges for Authentication and Authorization management. When a single frontend request can result in many backend microservices calls, it is important to balance security and performance. ForgeRock provides a standards-based blueprint that provides a flexible solution for making these choices while protecting your Cloud Foundry services end to end.
This talk is about how to secure your frontend+backend applications using a RESTful approach. As opposed to traditional and monolithic server-side applications (where the HTTP session is used), when your frontend application is running on a browser and not securely from the server, there are few things you need to consider.
In this session Alvaro will explore standards like OAuth or JWT to achieve a stateless, token-based authentication using frameworks like Angular JS on the frontend and Spring Security on the backend.
Video available at https://skillsmatter.com/skillscasts/6058-stateless-authentication-for-microservices
An introduction to hypermedia driven APIs. What is Hydra, what are its benefits and how to implement it.
It begins with a description of the current usage of REST APIs and goes until we have a linked API that describes operations and properties.
Hydra is a vocabulary that lives on top of JSON-LD
One Web (API?) – Alexandre Bertails - Ippevent 10 juin 2014Ippon
Un simple site Web ne suffit plus : si je veux que les machines puissent comprendre et interagir avec mes données et pas seulement des pages HTML, je dois exposer une Web API.
Or les styles, architectures et buzzwords sont variés (Web services, REST, hypermedia et maintenant HATEOAS, etc.) et les religions sont légion. Il a fallu de longues années pour que l’industrie et la communauté Web voient émerger de bonnes pratiques. L’heure est maintenant à la consolidation.
Cette présentation se veut une rétrospective sur l’évolution des Web APIs et plus généralement des données sur le Web. Je ferai une revue de l’état de l’art, illustrée par des exemples concrets et des conseils pratiques.
Le speaker : Alexandre est expert Linked Data à Pellucid Analytics. Auparavant au W3C. Code principalement en Scala et est intéressé par le Web, les données et les questions d’anonymat/vie privée sur le Web.
Presentation about working with the Activity Stream in IBM Connections 4+ meaning what the concepts behind the Activity Stream are, who to work with it and how to perform many of the tasks you would need to do such as marking/unmarking as actionable etc.
Mikkel Heisterberg - An introduction to developing for the Activity StreamLetsConnect
The future of business is social and the activity stream is the way events and messages are communicated in the social business. In this session you’ll learn all there is to know about the activity stream including exactly what it is and how to interact with it using your favorite development environment whether that be JavaScript, XPages, Java or even the plain vanilla HTTP based REST API. This session is for you if you want to start working the Activity Stream.
Cdm mil-18 - hypermedia ap is for headless platforms and data integrationDavid Gómez García
Slides from my talk at Codemotion Milan 2018. Speaking about how Headess and Hypermedia REST APIs can leverage the way . we integrate different platforms and share date between them
David Gómez G. - Hypermedia APIs for headless platforms and Data Integration ...Codemotion
We live in a interconnected world, were every day new devices, systems, and applications are connected to share information or interact between them. Thus, the importance of designing systems prepared to offer their services and data to a wide range of customers, that could discover, navigate and use their API in a standard and easy way to be consumed. But designing a headless platform to be used easily through their services is not straightforward. In this talk we will go over the challenges that we've found in adding headless nature to our platform and the foundations and tools that we have
Little Opinions, Big Possibilities: The Tools and Patterns for Building Larg...Brian Mann
I gave this talk July 31 at BackboneConf 2013 in Boston, MA
backboneconf.com
Backbone has been used to build some of the greatest web apps in the world. Chances are, you have one running in your tabs. But the gap from first starting Backbone to building a large application is enormous. In this talk, Brian Mann will focus on closing that gap, and pave the way for creating powerful and highly scalable Backbone Apps.
One of the biggest pain points of Backbone is dealing with its boilerplate code. Let’s face it; Backbone is notorious for being small and un-opinionated. While an attractive feature, it unfortunately means automation and workflow falls on developer’s shoulders. This often results in bloated code bases, reinvented patterns, frustration, and wasted time.
Instead of building your application’s infrastructure from scratch, Brian will show you how to become a much happier Backbone developer by demonstrating how to build modular Backbone apps using Marionette JS.
For videos and screencasts visit:
http://www.backbonerails.com
1.Wireless Communication System_Wireless communication is a broad term that i...JeyaPerumal1
Wireless communication involves the transmission of information over a distance without the help of wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and communicating between two or more devices using a wireless signal through wireless communication technologies and devices.
Features of Wireless Communication
The evolution of wireless technology has brought many advancements with its effective features.
The transmitted distance can be anywhere between a few meters (for example, a television's remote control) and thousands of kilometers (for example, radio communication).
Wireless communication can be used for cellular telephony, wireless access to the internet, wireless home networking, and so on.
ER(Entity Relationship) Diagram for online shopping - TAEHimani415946
https://bit.ly/3KACoyV
The ER diagram for the project is the foundation for the building of the database of the project. The properties, datatypes, and attributes are defined by the ER diagram.
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesSanjeev Rampal
Talk presented at Kubernetes Community Day, New York, May 2024.
Technical summary of Multi-Cluster Kubernetes Networking architectures with focus on 4 key topics.
1) Key patterns for Multi-cluster architectures
2) Architectural comparison of several OSS/ CNCF projects to address these patterns
3) Evolution trends for the APIs of these projects
4) Some design recommendations & guidelines for adopting/ deploying these solutions.
This 7-second Brain Wave Ritual Attracts Money To You.!nirahealhty
Discover the power of a simple 7-second brain wave ritual that can attract wealth and abundance into your life. By tapping into specific brain frequencies, this technique helps you manifest financial success effortlessly. Ready to transform your financial future? Try this powerful ritual and start attracting money today!
2. 2
ISEP/IPP
Building Hypermedia APIs with HTML5 and
Node
Mike Amundsen
ISBN: 978-1-4493-0657-1
RESTful web APIs
Leonard Richardson, Mike Amundsen
ISBN: 1449358063
4. “Programming for distributed
hypermedia environments
usually means that message
transfers must carry more than
just data; they must carry
additional information including
metadata and higher-level
application flow control
options.”
Mike Amudsen 4
ISEP/IPP
7. HYPERMEDIA IS THE ENGINE
“hypermedia payloads carry more
information than just the data
stored on the server. Hypermedia
payloads carry two types of vital
metadata: metadata about the data
itself and metadata about the
possible options for modifying the
state of the application at that
moment.”
Mike Amudsen
7
ISEP/IPP
9. H-FACTORS
Links
represent opportunities for a
client to advance the state of
the application by activating a
link.
Controls
provide support for additional
metadata when executing link
operations.
Not all media types
support all h-factors
11
ISEP/IPP
13. MEDIA TYPE
Describes the message structure and semantic
Use standard media types as much as possible
http://www.iana.org/assignments/media-types/media-types.xhtml
Not all media types are hypermedia enabled, e.g.,
image/jpeg
15
ISEP/IPP
19. (CLIENT INITIATED) STATE
TRANSFER
None / read-only
State is only transmitted from the server to the client
Predefined
State transmitted from the client to the server follows predefined
payloads defined by the server and known by the client
Ad-hoc
The server tells the client what state to trasmit. E.g., HTML <FORM>
21
ISEP/IPP
20. DOMAIN STYLE
Specific
The payload has domain specific terms that are understood by client
and server, e.g., <shipping address>
General
The payload uses some general blocks that can be reused in diferent
use cases, e.g., <adress type=“shipping”>
Agnostic
The payload uses domain agnostic terms and (well known) decorators
to add semantic, e.g., <link rel=“edit”>
22
21. SPECIFIC DOMAIN STYLE
EXAMPLE
<!-- domain-specific design -->
<order>
<id>...</id>
<shipping-address>...</shipping-address>
<billing-address>...</billing-address>
...
</order>
23
ISEP/IPP
24. APPLICATION FLOW
None
The hypermedia type contains no identifiers for application flow.
Intrinsic
The application flow identifiers are defined within the hypermedia
type itself. E.g., Atom and AtomPub define a small set of link
relations to indicate application flow (“edit”, “edit-media”, and “self”).
Applied
The application flow identifiers are not part of the hypermedia type,
but the type designs contain allowances (usually element decorators
or attributes) for applying external values to indicate application flow.
E.g., HTML attributes: profile, id, name, rel, and class.
26
25. NO APPLICATION FLOW
EXAMPLE
Media type: text/uri-list
# urn:isbn:0-201-08372-8
http://www.huh.org/books/foo.html
http://www.huh.org/books/foo.pdf
ftp://ftp.foo.org/books/foo.txt
27
ISEP/IPP
29. SIMPLE MESSAGE SERVICE
A service that allows users to post messages.
Post a new message
Update a message
Search messages by text, user, and date
Get all the messages of one user
Register a new user
Update the user data
Upload the user photo
31
ISEP/IPP
Message
User
1
0..n
30. MESSAGES RESOURCES
Resource The message collection
URL /message
GET
POST
PUT
DELET
E
return all messages
create new entry, returns 201
not allowed
not allowed
Resource A message (Item in the collection)
URL /message/:id
GET
POST
PUT
DELET
return specific message or 404
update existing entry or 404
overwrite existing or create new given the id
deletes the message 32
ISEP/IPP
31. USERS RESOURCES
Resource The user collection
URL /user
GET
POST
PUT
DELET
E
return all users
create new entry, returns 201
not allowed
not allowed
Resource An user
URL /user/:id
GET
POST
PUT
DELET
return specific user or 404
updates existing entry or 404
overwrite existing or create new given the id
deletes the user 33
ISEP/IPP
32. NO HYPERMEDIA
REPRESENTATIONS
Message
{
id: "a1",
text: "Sample one",
sender: "Mary",
createdOn: now,
updatedOn: now
};
User
{
id: "Mary",
name:"Mary",
email: "mary@contoso.com",
roles:[],
createdOn: now
};
34
ISEP/IPP
Missing:
• Explicit id as URI
• Explicit links to other
resources
• Application flow
33. HYPERMEDIA MISSING FOR
MESSAGES
Message collection
Paging links
First page
Next page
Previous page
Message Item
Resource links
User
Message collection
Actions
Edit the message
Delete the message
35
ISEP/IPP
34. HYPERMEDIA MISSING FOR
USERS
User collection
Paging links
First page
Next page
Previous page
User Item
Resource links
User’s messages
User’s photo
User collection
Actions
Edit the user
Cancel user account
36
ISEP/IPP
35. SOME DESIGN DECISIONS
Base format
JSON
State transfer
Predefined
Domain style
Specific
Application flow
Intrinsic
37
ISEP/IPP
36. LINK RELATIONS
Don’t reinvent the weel
IANA
http://www.iana.org/assignments/link-relations/link-relations.xhtml
Microformats
http://microformats.org/wiki/existing-rel-values
38
ISEP/IPP
37. COMMON LINK RELATIONS
rel Description Definitio
n
collecti
on
The target IRI points to a resource which
represents the collection resource for the
context IRI.
[RFC657
3]
edit Refers to a resource that can be used to
edit the link's context.
[RFC502
3]
edit-
form
The target IRI points to a resource where a
submission form for editing associated
resource can be obtained.
[RFC686
1]
next Indicates that the link's context is a part of
a series, and that the next in the series is
the link target.
[HTML5]
payme Indicates a resource where payment is [RFC598 39
ISEP/IPP
Source: http://www.iana.org/assignments/link-relations/link-relations.xht
45. CONTINUE THE ROAD TO
HYPERMEDIA
Several things are missing:
Reuse generic collection media type, e.g.,
Collection+JSON, OData
Reuse existing media types and microformats, e.g.,
hCard
“New item” template
Search templates, e.g., OpenSearch
Photo subresource: information + media
47
ISEP/IPP
47. THE HYPERMEDIA
CONSTRAINT
“The application is therefore an
engine that moves from one state to
the next by examining and
choosing from among the
alternative state transitions in the
current set of representations.”
Roy Fielding
49
ISEP/IPP
48. SUGGESTED READINGS
Fielding, R. “REST APIs must be hypertext-driven”.
http://roy.gbiv.com/untangled/2008/rest-apis-must-
be-hypertext-driven
Atom/AtomPub.
http://bitworking.org/projects/atom/rfc5023.html
Collection+JSON media type.
http://amundsen.com/media-types/collection/
OData. http://www.odata.org/
OpenSearch. http://www.opensearch.org/Home
HTTP PATCH. http://tools.ietf.org/html/rfc5789
50
ISEP/IPP
An API that is based on the notion of hypermedia
Message payload is of an hypermedia-enabled media type
From wikipedia: http://en.wikipedia.org/wiki/HATEOAS
This principle is the key differentiator between a REST and most other forms of client server system.
Rather than the actions and interfaces a client may use being defined elsewhere, such as in a WSDL file or predefined in the client code, the principle is that the hypermedia in eachserver response will contain links that correspond to all the actions that the client can currently perform. Therefore, dependent on the current application state, every server response describes the new actions that are available. The server can change the range of allowable responses in a dynamic way, and a client should adapt its behavior to these changes.
A client of a RESTful application need only know a single fixed URL to access it. All future actions should be discoverable dynamically from hypermedia links included in the representations of the resources that are returned from that URL. Standardized media types are also expected to be understood by any client that might use a RESTful API. Application state transitions are driven by a combination of the known processing rules for each media type, client selection from the server-provided choices in representations received, and the user's manipulation of those representations. Thus interactions are driven by hypermedia, rather than by any out-of-band information.[1]
If necessary, the client’s knowledge of media types, resource communication mechanisms, and user interaction, may be improved on-the-fly by the transmission of code-on-demand from the server to the client as defined elsewhere in the REST architecture.[2]
LE: embed the contente of the link target with the current content
LO: traverse the link
LT: traverse the link but construct the link with the template
LI: submit content using idempotent request (e.g., PUT, DELETE)
LN: submit content using non-idepontent request (e.g., POST)
The possible metadata elements (and their values) can vary between supported
protocols (FTP, HTTP, etc.) as does the details for communicating this link metadata.
For example, in HTTP, this is accomplished through HTTP Headers. Regardless of the
mechanism, control factors fall into four categories: Read, Update, Method, and Link
Annotation.