Assignment 4: Implementation · Server
Working on the Assignment
Server
In Lecture 4 we started to implement a new feature in TODOOSE: the ability to see items that were marked as completed, as opposed to just removing them from the list forever.
For this assignment you must complete the implementation of the server.
Watch the video of the lecture. Go through the Issue, its corresponding Pull Request, and the project board (look at Iteration 4). Go through the code base on the show-completed branch, which contains TODO comments you must fill in.
Here’s a video on how to work on TODOOSE and submit your assignment, now that we need to do more substantial changes to the code base:
Here’s checklist of what you need to do:
-
Check out the
show-completedbranch. -
Remove the
todoose.dbfile if you have one. We changed the database schema to include acompletedcolumn in theitemstable, and deleting the database is our poor excuse for a data migration plan. -
Rename the
update()method inItemsRepositorytoupdateDescription(). -
(Optional) Consider improving the
if/then/elsesituation on the controller. Can you unify the methodsmarkAsCompleted()andupdate()(which at this point you renamed toupdateDescription()) in theItemsRepository? The new unified method must update anItemregardless of what changed: eitherdescription, orcompleted, or both. -
Run the server, wait for it to start, then stop it. The
todoose.dbfile you deleted above is back, and it has the new schema including thecompletedcolumn on theitemstable. -
Open the database in IntelliJ like we did in lecture and add real fake data for testing locally. Include a screenshot (see example below). For now, the client part of the application is broken because we changed how the server works, so looking at the database in IntelliJ is the only reliable way to see the data. We’ll fix this in Lecture 5 when we talk about the client.

-
In Postman, if you still have the
TODOOSEcollection you imported in Assignment 0, delete it and import it again, because it changed. -
Update the Postman request “Mark items as done” and its corresponding example.
-
Add a new Postman request called “Mark items as incomplete” to the TODOOSE collection. It must include an example.
-
You can run requests manually in Postman hitting by the
Sendbutton. The server must be doing the right thing, including marking items as completed and marking them as incomplete when using the new “Mark items as incomplete” request you just added. You can see the new data, including thecompletedfield, but the Postman tests still won’t pass (we need to fix the tests—that’s the subject of the next lecture).
-
Export the Postman collection and replace
docs/TODOOSE.postman_collection.json. -
Commit and push to your student repository (see video above).
-
Deploy this new version to Heroku. Create a new Heroku application with an unpredictable name as explained in the video above; don’t reuse the Heroku application from Assignment 0.
Submission
⚠️ Your assignment is submitted only when you submit the form below.
If you run into problems, send an email to assignment-submission@jhu-oose.com. Include the information about the submission: your GitHub Identifier and the Commit Identifier. Don’t include any information about the feedback—it’s anonymous.