Thursday, June 18, 2020

劃分 software components 的指導原則 -- From Clojure Applied

We separate our code into components for several reasons:

  1. reuse of generic components within an application
  2. dividing development within a team
  3. dividing development within a structure that allows us to think about only part of the problem at a time 

Guidelines to group code together to separate software components:

  1. the functions work on the same kind of data
  2. the data has a common scope or lifetime
  3. the likelihood of change from external requirements is similar
  4. the resources needed are similar