In this chapter, you will begin implementing the actual user profile service. As a first step, we will design the RESTful API of the service and then continue by implementing the designed API endpoints.
Now it is time to get to the actual task that we want to implement in this chapter. In this chapter, you will develop a RESTful Web Service using the Slim framework and MongoDB to access and read user profiles. In short, one of the first steps that you should take when designing a REST Web Service is to think about the resources that you want to offer to your users.
Tip
Keeping RESTful
Be sure to design around resources whose state you modify with HTTP verbs such as POST
, PUT
, and DELETE
. I've often seen HTTP APIs being developed around procedures, not resources, that end up in URLs such as POST /users/create
or POST /users/update
that resemble more of an RPC-based API design.
The table that follows shows the resources and operations that we...