background preloader

Architectural Styles and the Design of Network-based Software Architectures

Architectural Styles and the Design of Network-based Software Architectures
Related:  [FR] RESTful Web Services

Peter Williams - Versioning REST Web Services Managing changes to APIs is hard. That is no surprise to anyone who has ever maintained an API of any sort. Web services, being a special case of API, are susceptible to many of the difficulties around versioning as other types of APIs. For HTTP based REST style web services the combination of resources and content negotiation can be used to mitigate most of the issues surrounding API versioning. Let’s assume you have a REST/HTTP web service that has some account resources. ===> GET /accounts/3 HTTP/1.1 Accept: application/vnd.mycompany.myapp+xml <=== HTTP/1.1 200 OK Content-Type: application/vnd.mycompany.myapp+xml <account><name>Inigo Montoya</name></account> First, you probably noticed that my example uses a vendor MIME media type to describe the representation. Backwards compatible changes Often changes will need to be made to expose new behavior of the system that do not negatively impact correctly implemented clients. Incompatible changes Everyone gets what they need. Conclusion

Haters gonna HATEOAS — Timeless Every time someone mentions RESTful web services, there’s always that one person that has to chime in: “That’s not really RESTful, it’s just kinda RESTful.” I’d always filed that information away, under ‘things to learn later,’ and let it simmer in the back of my brain. I’ve finally looked into it, and they’re absolutely right: 99.99% of the RESTful APIs out there aren’t fully compliant with Roy Fielding’s conception of REST. Before we answer that question, let’s back up a bit: Why aren’t these web services RESTful? “The Swamp of POX.” The four levels of REST Let’s start at the bottom and work our way up. Now, The Swamp of POX means that you’re using HTTP. Level one is where it starts to get interesting. However, there are a set of common operations that are performed on resources, and it seems kinda silly to make a new URI for every operation, especially when they’re shared. The final level, Hypermedia Controls, is the one that everyone falls down on. Content Negotiation Super simple.

Calcul des prédicats Un article de Wikipédia, l'encyclopédie libre. Le calcul des prédicats du premier ordre, ou calcul des relations, ou logique du premier ordre, ou tout simplement calcul des prédicats est une formalisation du langage des mathématiques proposée par les logiciens de la fin du XIXe siècle et du début du XXe siècle. Le trait caractéristique de la logique du premier ordre est l'introduction : Ceci permet de formuler des énoncés tels que « Tout x est P » et « Il existe un x tel que pour tout y, x entretient la relation R avec y » en symboles : et Le calcul des prédicats du premier ordre égalitaire adjoint au calcul des prédicats un symbole de relation, l'égalité, dont l'interprétation est obligée : c'est l'identité des éléments du modèle, et qui est axiomatisée en conséquence. Le calcul des propositions est la partie du calcul des prédicats qui concerne ce qui ne contient pas les notions de variables, de fonctions et de prédicats et donc pas les quantificateurs . On se donne pour alphabet : ou . ?

Service web Un article de Wikipédia, l'encyclopédie libre. Un service web (ou service de la toile[1]) est un programme informatique de la famille des technologies web permettant la communication et l'échange de données entre applications et systèmes hétérogènes dans des environnements distribués. Il s'agit donc d'un ensemble de fonctionnalités exposées sur internet ou sur un intranet, par et pour des applications ou machines, sans intervention humaine, de manière synchrone ou asynchrone. Le concept a été précisé et mis en œuvre dans le cadre de Web Services Activity[2], au W3C, particulièrement avec le protocole SOAP. Très grandes généralités sur un service web. Dans sa présentation la plus générale, un service web se concrétise par un agent, réalisé selon une technologie informatique précise, par un fournisseur du service. Il existe plusieurs technologies derrière le terme services web : Les Services Web de type Representational state transfer (REST)[modifier | modifier le code] Portail d’Internet

The Web Origin Concept Abstract This document defines the concept of an "origin", which represents a web principal. Typically, user agents isolate content retrieved from different origins to prevent a malicious web site operator from interfering with the operation of benign web sites. In particular, this document defines how to compute an origin from a URI, how to serialize an origin to a string, and an HTTP header, named "Origin", for indicating which origin caused the user agent to issue a particular HTTP request. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. This Internet-Draft will expire on May 31, 2011. Copyright Notice Copyright (c) 2010 IETF Trust and the persons identified as the document authors. 1. 1. 2. 2.1.

Peter Williams - Versioning REST Web Services (Tricks and Tips) In my previous post on this subject I described an approach to versioning the API of a REST/HTTP web service. This approach has significant advantages over the approach that is currently most common (i.e. embedding a version token in the URL). However, it does have some downsides. This post is an attempt to outline those and to present some ways to mitigate the negative impacts. Using content negotiation to manage versions requires, by definition, the introduction of nonstandard media types. There is really no way around this. The browser not working is a pretty big issue. Unfortunately, I don’t really have a great general solution for browsers. Curl One advantage of having the version token directly in the URL is that it makes it really easy to use curl against the service. curl --header 'Accept: application/vnd.foo.myformat-v1+xml' That is not too horrible, really. curl Nonobviousness Unfamiliarity Related Posts

Richardson Maturity Model A model (developed by Leonard Richardson) that breaks down the principal elements of a REST approach into three steps. These introduce resources, http verbs, and hypermedia controls. Recently I've been reading drafts of Rest In Practice : a book that a couple of my colleagues have been working on. Figure 1: Steps toward REST To help explain the specific properties of a web-style system, the authors use a model of restful maturity that was developed by Leonard Richardson and explained at a QCon talk. Level 0 The starting point for the model is using HTTP as a transport system for remote interactions, but without using any of the mechanisms of the web. Figure 2: An example interaction at Level 0 Let's assume I want to book an appointment with my doctor. POST /appointmentService HTTP/1.1 [various other headers] <openSlotRequest date = "2010-01-04" doctor = "mjones"/> The server then will return a document giving me this information If all is well I get a response saying my appointment is booked.

Développement mobile multiplateforme en C et C++ avec MoSync SDK Vous êtes développeur C et/ou C++ et vous avez envie de créer des applications mobiles. Vous avez besoin, si vous ne les connaissez pas déjà, d'aller apprendre d'autres langages comme le Java (pour Android, BlackBerry, J2ME), l'objective-C (pour l'iOS), ou le C# (pour Windows Phone 7); étant donné qu'avec le C++ seul, vous êtes limité à Bada, à Symbian et à Windows Mobile (ces deux derniers n'ayant plus vraiment le vent en poupe). Vous pouvez aussi vous rabattre sur les technologies Web comme le HTML 5, le JavaScript et le CSS3 associées à des bibliothèques comme Phonegap pour parvenir à vos fins mais vous serez limités au niveau des accès aux fonctionnalités natives du téléphone. Depuis 2004, la start-up suédoise Mobile Sorcery devenue MoSync AB a commencé le développement d'un Framework cross plateforme de développement mobile. MoSync SDK est disponible sur Windows et Mac. Voici en vrac une liste globale des fonctionnalités disponibles dans le MoSync SDK : Vous avez aimé ce tutoriel ?

SOAP, REST, and More Service Station More On REST Jon Flanders In the last two columns, I've described the basics of REST and talked about exposing and consuming Web feeds. In this column, I'll answer a number of questions that often come up when I make presentations or conduct training sessions on using REST to build service-based applications. Which is better, REST or SOAP? This is one of the most common questions I get about REST, and it is probably the least fair. Comparing REST with the remote procedure call (RPC) style of building client-server applications would be more accurate. In contrast to RPC, REST lacks the metadata-generated proxy (see the next question for more information), which means that the client is less coupled to the service. My perspective is that both REST and SOAP can be used to implement similar functionality, but in general SOAP should be used when a particular feature of SOAP is needed, and the advantages of REST make it generally the best option otherwise. What about security?

Uniform access principle Explanation[edit] The problem being addressed by Meyer involves the maintenance of large software projects or software libraries. Sometimes when developing or maintaining software it is necessary, after much code is in place, to change a class or object in a way that transforms what was simply an attribute access into a method call. Programming languages often use different syntax for attribute access and invoking a method, (e.g. obj.something versus obj.something()). The syntax change would require, in popular programming languages of the day, changing the source code in all the places where the attribute was used. This might require changing source code in many different locations throughout a very large volume of source code. Going the reverse way (from method to simple attribute) really wasn't a problem, as one can always just keep the function and have it simply return the attribute value. Many programming languages do not strictly support the UAP but do support forms of it.

Fieldings' dissertation online by vikasjee Apr 26

Related:  Development