Practice WOD: ModalDialog

It seems a shame to have a module that doesn’t have any programming in it, so let’s finish this one off with a simple programming WOD followed by pushing your enhancement to the cloud.

Currently, the “delete” action for surfers doesn’t request confirmation. Let’s fix that by adding a Twitter Bootstrap modal dialog that is triggered when the “delete” link is clicked:

You should quickly review the Twitter Bootstrap modal dialog documentation before starting this WOD. Unlike the first two WODs in this module, try this one on your own before looking at my solution.

Instructions

Create a revised version of your Digits application in which you use the @select Scala template from the play-example-form system to implement a drop-down list indicating the type of phone.

  1. Start your timer.
  2. Create a branch of your Surferpedia system called “delete-dialog-1″.
  3. Add a small change to a file, then push this commit to GitHub with the message “Starting delete dialog WOD”.
  4. In this branch, implement a modal dialog as illustrated above to request confirmation when the user tries to delete a surfer.
  5. When finished, deploy your Surferpedia system to CloudBees.
  6. When you have verified that it’s working on CloudBees, push your enhanced code to your branch on GitHub with the message “Finished delete dialog WOD”. The difference between the timestamps associated with the two commits represent your WOD time, and the code diffs represent your implementation.

When finished, stop your timer, and record how many minutes it took you to complete the WOD.

Rx: <5 min Av: 5-10 min Sd: 10-15 min DNF: 15+ min

Demonstration

Once you’ve finished doing the WOD a single time, watch me do it:

Standard WOD Caveats

You’ll learn significantly less from watching me solve the WOD if you haven’t attempted the WOD yourself first.

While it’s an achievement to finish the WOD no matter how long it takes, you might experience “diminishing returns” if you work longer than the DNF time. Thus, it might be strategic to stop working at the DNF time and watch my solution.

After watching my solution, I recommend that you repeat the WOD if you have not achieved at least Av performance. If so, be sure to:

Feel free to keep trying until you make Rx if that’s of interest to you.