High-Level Infrastructure

In this module, you’ll learn how to create high-level Nullable infrastructure wrappers that make application code easier to write and test. You’ll build Rot13Client, an infrastructure wrapper for a ROT-13 microservice.

Concepts

Download the slides and transcript here.

Direct links to patterns discussed in this module:

Primers

You may wish to familiarize yourself with these primers before starting on the exercises:

Exercise Setup

Start with the Pre-Course Setup. Then:

1. Check out the code

  1. Check out the exercise branch:
    • JavaScript: git checkout high-level-infrastructure-js
    • TypeScript: git checkout high-level-infrastructure-ts
  2. Create a custom branch for your changes:
    • git checkout -b my-high-level-infrastructure

2. Prepare to start working

  1. Open the exercise files:
    • src/www/infrastructure/_rot13_client_test.js (or .ts)
    • src/www/infrastructure/rot13_client.js (or .ts)
  2. Run the build watcher from the root of the repository:
    • Windows: .\watch.cmd quick
    • Mac/Linux: ./watch.sh quick
  3. Confirm that the build runs and ends with BUILD OK.

Exercises

The course is designed to have more exercises than you can finish in a single session, so don’t worry about finishing everything. Instead, work at your own pace and focus on understanding the material. If you get to the end of challenge #5, you’ll have covered the most important information.

  1. Challenge #1: Fake It Once You Make It
  2. Challenge #2: Signature Shielding
  3. Challenge #3: Parsing Responses
  4. Challenge #4: Request Tracking
  5. Challenge #5: Nullability
  6. Challenge #6: Configurable Responses
  7. Challenge #7: Unexpected Status
  8. Challenge #8: Simulating Errors
  9. Challenge #9: Refactoring
  10. Challenge #10: Edge Cases
  11. Challenge #11: Design Changes
  12. Bonus Challenges

Start with Challenge #1

Return to course overview