background preloader

Best Practices for Designing a Pragmatic RESTful API

Your data model has started to stabilize and you're in a position to create a public API for your web app. You realize it's hard to make significant changes to your API once it's released and want to get as much right as possible up front. Now, the internet has no shortage on opinions on API design. But, since there's no one widely adopted standard that works in all cases, you're left with a bunch of choices: What formats should you accept? How should you authenticate? In designing an API for Enchant (a Zendesk Alternative), I've tried to come up with pragmatic answers to these questions. ... or just skip to the bottom and signup for updates Latest from the Enchant blog How to make your app lovable A decent app helps you get the job done. ... and those apps, the ones that make things feel effortless, are the ones we love the most. But what makes an app feel effortless? Key requirements for the API Use RESTful URLs and actions But what can I make a resource? SSL everywhere - all the time Related:  ++ theory

mrdoob : position: absolute; left:... RESTful Web Services: A Tutorial More than a decade after its introduction, REST has become one of the most important technologies for Web applications. Its importance is likely to continue growing quickly as all technologies move towards an API orientation. Every major development language now includes frameworks for building RESTful Web services. As such, it is important for Web developers and architects to have a clear understanding of REST and RESTful services. This tutorial explains REST architecturally, then dives into the details of using it for common API-based tasks. While REST stands for Representational State Transfer, which is an architectural style for networked hypermedia applications, it is primarily used to build Web services that are lightweight, maintainable, and scalable. Features of a RESTful Services Every system uses resources. Representations Messages URIs Uniform interface Stateless Links between resources Caching Representations Listing One: JSON representation of a resource. Messages HTTP Request or

HATEOAS The HATEOAS constraint decouples client and server in a way that allows the server functionality to evolve independently. Details[edit] A REST client enters a REST application through a simple fixed URL. All future actions the client may take are discovered within resource representations returned from the server. The media types used for these representations, and the link relations they may contain, are standardized. The client transitions through application states by selecting from the links within a representation or by manipulating the representation in other ways afforded by its media type. For example [2] here is a GET request to fetch an Account resource, requesting details in an XML representation: GET /account/12345 HTTP/1.1 Host: somebank.org Accept: application/xml ... Here is the response: HTTP/1.1 200 OK Content-Type: application/xml Content-Length: ... <? Some time later the account information is retrieved again, but now the account is overdrawn: Origins[edit] See also[edit]

Iteratees in Big Data at Klout « Klout Engineering At Klout we calculate social influence of users across several social networks and we must be able to collect and aggregate data from these networks scalably and within a meaningful amount of time. We then deliver these metrics to our users visually. Our users and clients expect data to be up to date and accurate and it has been a significant technical challenge to reliably meet these goals. In this blog post we describe the usage of Play! Iteratees in a Nutshell In a sentence, Iteratees are the functional way to model producers and consumers of streams of data. Enumerator (produce data) → Enumeratee (map data) → Iteratee (consume data) Other compositions are also possible with the Play! Legacy Data Collection Our legacy collection framework was written in Java and built on the java.util.concurrent library. 1. These three stages are necessarily sequential, but individually they are highly paralelizable, and more importantly may be executed asynchronously. New Collection Paging Enumerator

CSS Length Explained When styling a web site with CSS you might have realised that an inch on a screen is not an actual inch, and a pixel is not necessarily an actual pixel. Have you ever figured out how to represent the speed of light in CSS pixels? In this post, we will explore the definition of CSS length units starting by understanding some of the physical units with the same name, in the style of C.G.P. Grey. The industrial inch (in) People who live in places where the inch is a common measure are already familiar with the physical unit. The device pixel Computer screens display things in pixels. Display pixel density, dots per inch (DPI), or pixels per inch (ppi) The physical dimension of a device pixel on a specific device can be derived from the display pixel density given by the device manufacturer, usually in dots per inch (DPI), or pixels per inch (PPI). The MacBook Air (2011) I am currently using comes with a 125 DPI display, so The CSS pixel (px) The viewing distance CSS inch (in) CSS point (pt)

Latency Compensating Methods in Client/Server In-game Protocol Design and Optimization Overview Designing first-person action games for Internet play is a challenging process. Having robust on-line gameplay in your action title, however, is becoming essential to the success and longevity of the title. In addition, the PC space is well known for requiring developers to support a wide variety of customer setups. Often, customers are running on less than state-of-the-art hardware. While broadband has been held out as a panacea for all of the current woes of on-line gaming, broadband is not a simple solution allowing developers to ignore the implications of latency and other network factors in game designs. Your game must behave well in this world. Basic Architecture of a Client / Server Game Most action games played on the net today are modified client / server games. With this in mind, the typical client / server game engine architecture generally looks like this: The server has a somewhat similar loop: Contents of the User Input messages Client Side Prediction Lag Compensation

REST API | SupportFu Developers Introduction SupportFu is a fully hosted solution to manage email and twitter based customer support. We provide a REST API built on pragmatic RESTful design principles. Our API uses resource-oriented URLs that leverage built in features of HTTP, like authentication, verbs and response codes. All request and response bodies are JSON encoded, including error responses. We believe an API is a user interface for a developer - accordingly, we've made sure our API can be easily explored from the browser! Changes This is a versionless API. Sign up for the SupportFu Developer mailing list Recent Changes Sept 13, 2013: new required field direction added to Twitter & Email reply messages . Coming Soon... Token based authentication Authentication This API is authenticated using HTTP Basic Auth over HTTPS. A user's email address and password can be provided as auth credentials: $ curl -u email:password Requests JSON Bodies HTTP Verbs Limited HTTP Clients Responses Errors

- The RESTful cookbook Comment suivre un internaute sans cookie ni javascript ? Vous vous croyez protégé de toute forme de tracking car vous avez désactivé ou filtré le JavaScript, flash, les cookies...etc. ? Eh bien détrompez-vous, car même si vous avez mis en place ce plugin qui permet de brouiller les pistes face à des méthodes de tracking non traditionnelles comme Panopticlik, il est toujours possible de vous suivre. Comment ? Et bien tout simplement en détournant l'utilisation des ETag. Pour ceux qui ne seraient pas familiers avec ce concept, ETag est une fonctionnalité propre aux serveurs web type Apache, qui permet simplement d'identifier de manière unique un fichier (page web, image, CSS...Etc.). Lorsque vous-vous rendez sur une page web, votre navigateur envoie au serveur Apache, l'ETag du fichier qu'il s'apprête à lui demander (et qu'il possède dans son cache). HTTP/1.1 200 OKDate: Mon, 26 Aug 2013 15:35:26 GMTLast-Modified: Fri, 22 Aug 2013 15:21:41 GMTEtag: "b44a244a-dba-d2a52130" Alors, comment déjouer cette méthode de tracking ?

Related: