Let's Build an API Together - Part 28

Last Update: 05.02.2018. By Jens in API Series | APIs | Newsletter

Our API works now. We can register a new user, log in via the API, authenticate via token in a header and can work with the kanban board. So, we are done for now.

However, there is room for improvement even outside we didn’t test code because it is a sample application. While implementing the last steps, I noticed that the endpoint could be better for the use cases.

  • Removing the board id or ref in the tasks could make the handling a bit better and also reduces the payload.
  • Assigning a task to a board could be done once when creating a task. We could move the board id into the path and remove the payload overhead to the board.
  • Like discussed before, it might also be more convenient to remove the JPA relation from board to task to make querying simpler. However, we had to clean up manually when we ever remove a user.

Using RAML as it is now was a mistake. Had the test support really worked with their latest spec version, it would be a great helper. Using an old spec just for the tools, however, calls for refactoring trouble later. I could live without the generator; my experience with generators was mostly bad anyways.

The series will end here. I am not sure if and how it will continue with it. Writing short daily email and code at the same time didn’t work out for me with my time constraints. It took more time than I assumed and I couldn’t go deeper into certain topics. I am not sure if it is the right format at all.

What do you think?