Wednesday, November 21, 2012

Why having an API matters: testing

Why having an API matters: testing:
You know when they tell you exposing an HTTP API for your application (usually a REST-like one) is positive for reuse and accessing it in unforeseen ways? That's whay just happened to me last week while trying to put together some functional tests.

When REST isn't good enough

When REST isn't good enough:
At Braintree, we receive nearly 1.5 million API calls per day from thousands of our customers. Instead of a public REST API, we provide client libraries in seven languages to ease integration with our gateway. This covers almost every modern web application language. Using our Java library, we can also reach other JVM languages like Clojure and Scala. As you can imagine, these libraries are built on top of a REST API. Occasionally we are asked why we don't document and expose the REST API, and this inevitably sparks a discussion on our team about the tradeoffs. During these discussions there are three topics that often come up: Security, Platform Support, and Backwards Compatibility. These three topics have kept us in favor of providing client libraries instead of direct access to the low level API.

Saturday, November 17, 2012

Spring HATEOAS - Library to support implementing representations for hyper-text driven REST web services.

Spring HATEOAS - Library to support implementing representations for hyper-text driven REST web services.:
This project provides some APIs to ease creating REST representations that follow the HATEOAS principle when working with Spring and especially Spring MVC. The core problem it tries to address is link creation and representation assembly.

Cross domain REST calls using CORS

Cross domain REST calls using CORS:
To fight XSS attacks, the web browser imposes the same origin policy for HTTP requests made by JavaScript code. However, this behaviour is often desirable. Traditionally, server-side proxy or JSONP has been used but now there is a W3C Working Draft called CORS: Cross-Origin Resource Sharing. This post describes how it works.

All webservices should be RESTful - why aren't they?

restful webservices:
All webservices should be RESTful - why aren't they?

Thursday, November 8, 2012