Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any standard design practices for RESTful architectures? [closed]

Tags:

rest

One of the downsides of being self-taught is that you're forever reinventing the wheel.

I'm working more and more on RESTful architectures and, as a result, need to define resources and how one can interact with them.

Are there any standard (and effective) design methods or templates that help enumerate the various HTTP verbs and potential responses for resources to help ensure that all of the permutations are covered?

Even something as basic as:

+----------------+---------------------------------------------+
| Resource Name: |                                             |
+----------------+---------------------------------------------+
|                      HTTP METHODS                            |
+------------+-------------------------------------------------+
| Method     |  Supported                                      |
+------------+-------------------------------------------------+
| GET        |     X                                           |
| PUT        |     X                                           |
| POST       |                                                 |
| DELETE     |                                                 |
+------------+-------------------------------------------------+
|                        RESPONSES                             |
+--------------------------------------------------------------+
| GET                                                          |
+--------------------------------------------------------------+
| Details of valid and necessary parameters for GETs and the   |
| possible responses...                                        |
| ...                                                          |
+--------------------------------------------------------------+

Sure... I could roll my own, but wondering if there are any broadly recognised methodologies out there that I could adopt.

like image 565
Dancrumb Avatar asked May 28 '11 16:05

Dancrumb


3 Answers

Since I posted this, I have recently discovered a number of API designers. One of these (Mulesoft's Anypoint Platform) uses a language called RAML (RESTful API Modelling Language).

like image 122
Dancrumb Avatar answered Nov 15 '22 22:11

Dancrumb


You might want to have a look at the Web Application Description Language. Some REST frameworks can even generate the description for you. I like Apache Jersey very much (if you can accept Java for implementation).

like image 32
Waldheinz Avatar answered Nov 15 '22 21:11

Waldheinz


RestMS.org contains a standard for designing Restful APIs.

It shouldn't be treated as gospel, but you will learn a lot by reading through the single page RestTL (Restful Transport Layer) definition.

http://www.restms.org/spec:1

like image 1
andyc Avatar answered Nov 15 '22 21:11

andyc