cs445 - Spring 2022

Project - Questions And Answers


Acknowledgements

Many thanks to the following students who have contributed questions for this section and or have helped collect and document the questions and answers:

  • Horohito Tomida

Q: Do we need to develop the REST client?

A: No, you only need to implement the back-end.

Q: How do we handle access control for various actors?

A: You'll only have to implement a very rudimentary access control mechanism that checks the uid on each request against a map of users with special privileges (CSR actors): if the user is a CSR, then invoke the use case object and specify that the user has special privileges.

Q: Our project requires us to perform unit testing. This is expected for the base classes, but is it possible to perform unit testing for the REST controller?

A: If you keep your REST controller *very light*, then you don't need to do unit testing on it.

Q: The project Functional Testing says that we need to deploy the resulting .war file to a Tomcat server. I want to use the open source framework DropWizard that allows to deploy the RESTful service as a standalone jar application without using a Tomcat server. Will that be ok?

A: Yes. Matter of fact we encourage you to use a framework such as DropWizard since that will greatly simplify the work you need to do around implementing the delivery mechanism (REST end points) and allow you to focus on implementing the core functionality for the project.

Q: For the json responses you want them to be exactly like the API documentation and the Postman script right? It is because I have different names and styles for my json responses (Ex: I use a UUID generator for ids) but if you want them to be exact for the sake of simplicity when testing I can do that.

A: If your code passes the test suite then you don't have to worry. All the IDs in the API are strings, you can easily pass a UUID around as a string if you want to.