WTAT 1

Website of Prof. Dr. Barne Kleinen, Professor for Media Informatics (Bachelor/Master) at HTW Berlin

Sprint 04 & 05 - CRUD Part 1 and 2

     <prev next>

Unit 4 - Building a User Model - is a rather long unit, thus we will take two sprints to work through it. The technical topics are:

  • CRUD - Create, Read, Update, Delete actions on Models in the Rest architectural style
  • Validations
  • Model Associations

It discusses CRUD by creating CRUD functionality via model, views, controller and routes for the User model.

You will need a user model for authentication in addition to your individual models. You can just copy and adapt the model from the example application, and adapt it such that it fits to your application domain.

If you’ve already created a user model as your first model, also add another model such that you have at least two models in your application.

Find one or more stories to implement at least one of each:

  • validation
  • model association
  • index
  • create
  • read
  • update
  • delete

You will find that not all models are in need of all crud actions, and that not all actions need a dedicated view.

You can spread the stories and tasks over the 2 weeks & sprints as you like, but it’s probably easier if you do it in the order of the book (as listed above).

Write at least one test for each story. Don’t forget to update your seeds.

Backlog and Report

  • make sure to define your stories and connect them to the appropriate technical topic in the Backlog - this is the first sprint where this becomes really important, as your applications grow and there is a wider range of technical topics
  • write a summary of what worked, what didn’t work and what you’ve learned as your report and upload it in the moodle area.

Example application

don’t overlook chapter 17.2., Testing models in REPL - testing parts of your application interactively can save you lots of time!