Great article.
Some comments on formatting:
- Move large code blocks under spoiler to improve readability using
button. - There are a lot of empty lines in code blocks, they can be safely removed.
On the article itself my only issue is you create 5 methods per class:
- GET /class
- POST /class
- GET /class/object
- PUT /class/object
- DELETE /class/object
That's a lot of code even for 4 classes, but what about a case where there are 10 classes? 50? 100? Generally I would recommend writing 5 methods which would process objects of any allowed class (see RESTForms2).
- Log in to post comments
.png)
.png)
.png)
.png)