- Give every “thing” an ID
- Link things together
- Use standard methods
- Resources with multiple representations
- Communicate statelessly
Special mention to the Beauty of REST article for using the word "grok" in the second to last paragraph. Stranger in a Strange Land reference anyone?
Anyway, I am working on a project called iHacky. It involves retrieving data from the Hackystat sensorbase, saving it to the iHacky database, then sending information based on that data to Facebook to be viewed.
The Hackystat sensorbase obeys REST principles. Looking at the Hackystat sensorbase REST api, it can be seen that there are resources that can be retrieved and links properties together as well as uses the GET, POST, PUT, DELETE, and HEAD methods. One part of Hackystat that I'm unsure of with regards to following REST principles is its project viewer. It has a URI, but I see nothing about it that leads to obeying REST principles.
The Facebook api on the other hand is only REST-like. Facebook provides a REST client library for its api written in PHP. The api can only make GET and POST requests so I suppose it's why Facebook considers their interface REST-like.
With regards to iHacky, I do not think a REST interface should be provided. I consider all the data that will be stored in the database to be confidential. The user must provide their Hackystat login and password in order for iHacky to retrieve their Hackystat data. If a user wants to retrieve their Hackystat data, they can go to Hackystat, if they want to retrieve our interpretation of their data, then all they need to do is look at it through Facebook. If a user wants to view another user's data, then they must go on Facebook and add iHacky to their list of applications and only view data that the other users' wish to provide. There are unforeseeable situations so I'm not closed to the idea of making a REST interface.