§6.5.

Exercises

Exercise: Spell checking

Examine the chapter06_spellcheck example code in the workbook’s git repository.

  1. Run the project on your computer

  2. How does the code work? You might experiment in an interactive node session in your operating system’s terminal or read API documentation:

  3. How would you categorize the lines of code into layers?

  4. Can you separate the spell checker code into three layers?

Keep refining your solution until you are happy with it!

Reflection: Layering
  • What did you notice during the process of adding layering to the spell check?

  • Are there parts of the spell-checking code that other people might have categorized differently?

  • Does layering improve the application? Do you feel that the additional complexity is warranted?