Overview
This tutorial does not go into the concepts of ReST and why you would want to use it. I assume you are here because you want to implement it with Railo.
I will start out with a brain dump of the things I have discovered during my development of a ReSTful API. I will then flesh out with examples.
HTML web sites are pretty much a sub set of ReST. Browsers only use two methods: GET and POST. A page is a HTML representation of some information - a Resource. I you have an option to save page as PDF, the representation is APPLICATION/pdf - the mime type. Images, StyleSheets and JavaScript are also example of resource. You will no doubt be familiar with the page not found - 404; is a status code. Other common codes are 200 - OK and 401 - Unauthorized. The HTTP protocol has a lot more to it than this, and ReST makes full use of it.
Check out the features page on Rest introduction in Railo 4 beta
Concepts (to be) covered
- URL
- Method
- Mime Type
- Status Code
- Hypermedia
- CORS
- Security
Topics
- Getting Started
- Building Blocks
- Locating the Resource - URL
- Doing somthing with the Resource - Method
- Communicating with the Resource - Mime Types
- Monitoring the Resource - Status Code
- Using the ReST API
Please leave comments for anything you would like covered or explained in detail.
Whilst there is no one right way to building a ReSTful API, there seems to plenty of wrong ways. I will simply delete any comments which I feel are non-constuctive, trolling or flame bait.