Tuesday, November 24, 2015

REST vs RPC

This is taken from: http://apihandyman.io/do-you-really-know-why-you-prefer-rest-over-rpc/
And the author has done a simple and fair evaluation of the two.

Conclusion:

ITEMWHO WINS?
BeautyDraw
DesignabilityDraw
API definition languageDraw
Predictability and semanticREST
HypermediabilityDraw
CachabilityDraw
UsabilityDraw

Do REST really wins?

REST wins thanks to the predictability and semantic item.
So, is the resource approach better than the operation one?
No.
RPC and REST are only different approaches with pros and cons and both are valueabledepending on the context. You can even mix these two approaches in a single API.
The context, that’s the key. There are no panacea solution, don’t follow fashion blindly, you always have to think within a context and must be pragmatic when choosing a solution.
At least, I know now why I like the resource approach: its predictability and the frame given by the full use of HTTP protocol. What about you?
One last word to leave you with food for thought: in this time of advent of functionnal programming, having operation request style could make sense…

Idempotent Methods - PUT, DELETE, and safe request methods

Idempotent Methods and understanding their behavior is critical to getting REST right and nothing explains it better than reading the spec about what it means.

4.2.2. Idempotent Methods
   A request method is considered "idempotent" if the intended effect on
   the server of multiple identical requests with that method is the
   same as the effect for a single such request.  Of the request methods
   defined by this specification, PUT, DELETE, and safe request methods
   are idempotent.


http://tools.ietf.org/html/rfc7231#section-4.2.2

Wednesday, September 30, 2015

A quick list of Hypermedia for REST Articles

Hyper-Media APIs by @jvelilla on @scoopit
http://sco.lt/8OlOwT

Will try and bring in the articles curated by @jvelilla here.

Sunday, September 27, 2015

When is Your API NOT RESTful?

Five Clues That Your API isn't RESTful

  • It has a single endpoint

  • All requests are POSTs
  • Response metadata is in the body, not header
  • There are verbs in the URL
  • The URL includes method names
  • Do We Care About RESTfulness?

Saturday, September 26, 2015

What does REST really mean?

https://standardout.wordpress.com/2012/04/14/what-does-rest-really-mean/

ReSTful web services have been popular for some time, yet still today there is confusion about what it means.  Some will say it is a web service that doesn’t use SOAP standards, others will argue it has to do with using HTTP’s PUT and DELETE methods along with their more popular siblings GET and POST, and still others will argue it has to do with an even more confusing acronym HATEOAS.  Everyone seems to have an opinion on what it means, and the only thing that is clear is that they are talking about different things.  Which is fairly ironic considering the term is an acronym for a pretty clear idea and its spelled out fairly clearly in Roy Fielding’s paper.

Wednesday, September 23, 2015

HOW TO DESIGN GREAT APIS WITH API-FIRST DESIGN AND RAML



With the spread of open source, we are witnessing the building of an API economy that is based on the principle of developer-first--putting your target developers’ interests ahead of all other considerations when setting out to design a great API. By building on top of APIs that are designed with the developers’ interests at heart, you are able to save you and your developers a lot of work while laying down the building blocks for others to build on top of.

Friday, July 31, 2015

RESTful can be considered harmful?


[the] internet is running in debug mode source
"I don’t like RESTful principles and APIs. In recent years it is seen as universal protocol for inter-process communication, especially in distributed systems. However I see many deficiencies of REST and there are alternatives that work well for certain use cases. Obviously there is no one size fits all, I just want to emphasize that REST architecture is flawed in a number of ways."
...


Monday, June 15, 2015

API Security in the real world


ANATOMY OF A REAL WORLD API SECURITY BREACH





API security “is fundamental to the security of the entire Internet,” and, thus, the connected lives we lead. This piece works to tell the story of how one business dealt with its API security being compromised and what they’ve learned since.