/klafim

Primary LanguageClojure

Workshop:From OOP to DOP

Objective

Get into the FP and DOP mindset.

Learn best practices.

Build a project following FP and DOP principles.

Leverage the REPL for an efficient development workflow.

Outline

Day 1: Just use maps

  • Represent data with maps
  • Manipulate data as sequences
  • Lazy sequences
  • The REPL
  • Project: Represent a library and implement advanced catalog search

Day 2: Immutable data structures

  • Treat data as a value
  • Calculation vs. mutation
  • State management
  • Project: Add new entries to a catalog (books, authors, book copies)

Day 3: Data validation

  • Clojure records
  • Malli
  • Advanced data manipulation
  • Project: Validate catalog data before committing a mutation