background preloader

Designer une API REST

Designer une API REST
La période de fêtes approchant à grands pas, nous vous proposons une “Quick Reference Card” sur le design des API dont l’objectif est de synthétiser les bonnes pratiques de conception et de design d’API REST. Télécharger l’API Design – Quick Reference Card « Vous aimez les API, le Web ? » : Rejoignez nous! Si vous avez plus de temps, le présent article reprend – point par point – les éléments de la « carte de référence », en étayant et justifiant les propositions. Bonne lecture! Lorsque l’on souhaite concevoir une API, on est rapidement confronté à la problématique du « design d’API ». La mise en oeuvre d’une API à l’état de l’Art nécessite de prendre en compte: non seulement les principes substantiels des API RESTful issus de la littérature de référence (Roy Fielding, Leonard Richardson, Martin Fowler, spécifications HTTP…)mais également les bonnes pratiques utilisées par les API des “Géants du Web”. KISS – « Keep it simple, stupid » Exemples cURL Exemple Granularité Moyenne Sécurité Exemples ou

[Tutoriel] Créer son premier Web Component Ce petit tuto est un voyage dans le futur. Actuellement, il ne fonctionne que sous les versions les plus récentes de Chrome, mais il vous donne un aperçu de ce que pourra être le développement avec les web components dans quelques années, sans les polyfills (pour l’utilisation desquels il existe déjà des tutoriels en Français). Créer son premier composant La première chose indispensable pour créer une page avec des composants, c’est les custom elements. Maintenant, nous pouvons utiliser notre balise dans notre page. Notre navigateur affichera alors “Hello world!” Attention au nommage de notre balise. Nous avons utilisé, pour créer notre balise la fonction createdCallback, qui comme son nom l’indique, est appelée à la création. Si on veut quelque chose d’un peu plus classe qu’un Hello world! Si on se contente d’insérer cela dans notre navigateur, il ne se passe rien. Pourquoi ce scoped au niveau de la balise style ? Le côté très sympathique des imports, c’est qu’ils peuvent s’imbriquer.

Dave Snowden So what are we about? March 27, 2014 · News The first of three posts with some draft content for the new web site Cognitive Edge acts as a research centre for a distributed network of independent and in house consultants. Continued… Designing our new web site March 26, 2014 · News Two of the things that irritate me at conferences are Chairpeople who run over on time and then expect the speaker to reduce their time accordingly; the other is speakers who spend time with corporate slides rather than getting on with their subject. Continued… SAFe: the infantilism of management March 25, 2014 · I gave the opening keynote at the Agile conference in Brno today. Continued… The bunny of disappointment March 24, 2014 · Musings Yesterday I referenced the Melvyn Bragg podcast on complexity with Ian Stewart, Jeff Johnson and Eve Middleton-Kelly. I think the best... Continued… An obsessional interlude March 23, 2014 · Musings I spent most of yesterday exhibiting my obsessive tendency. Continued… Of rings and things

Introduction to Domain Driven Design, CQRS and Event Sourcing | Kenneth Truyers I recently started learning about domain driven design, CQRS and event sourcing. Up until now, I have been mostly involved in projects that use a ‘classic’ N tier/layer architecture with a relational database. As projects become more complex, I noticed that this model doesn’t always work well. Domain driven design So, what is domain driven design actually? Here, the logic lives outside of our Account-class. Now, obviously there’s much more to domain driven design then this, but the essence is the focus on language and making the implicit explicit. The problem with DDD and the typical N-layer architecture While applying DDD to a classic N layer architecture I ran into a few issues and I came to the conclusion to DDD is nearly impossible in such an architecture. The first reason that I feel true DDD is impossible, is that all your descriptive domain language gets obfuscated by handling the persistence. Is there a better solution? CQRS stands for “Command Query Responsibility Segregation”.

Your solid tool for event sourcing - EventStore examples In this part I will show you basic operations on the Event Store. Creating events curl -i -d @/Users/tomek/test.txt " -H "Content-Type:application/json" -H "ES-EventType:HelloCreated" -H "ES-EventId: 8f5ff3e6-0e26-4510-96c4-7e61a270e6f6” HTTP/1.1 201 Created Access-Control-Allow-Methods: POST, DELETE, GET, OPTIONS Access-Control-Allow-Headers: Content-Type, X-Requested-With, X-PINGOTHER, Authorization, ES-LongPoll, ES-ExpectedVersion, ES-EventId, ES-EventType, ES-RequiresMaster, ES-HardDelete, ES-ResolveLinkTo, ES-ExpectedVersion Access-Control-Allow-Origin: * Access-Control-Expose-Headers: Location, ES-Position Location: Content-Type: text/plain; charset=utf-8 Server: Mono-HTTPAPI/1.0 Date: Wed, 11 Mar 2015 10:51:51 GMT Content-Length: 0 Keep-Alive: timeout=15,max=100 I sent simple event to a new stream called helloworld. You don’t have to create a new stream separately. Reading streams Using projections

Related: