Monday, November 26, 2007

When to Extract/Merge Modules

Extract some part of the code into it's own module/library from Application Code when :

  • Another Application needs it.
  • You need to encapsulate it's complexity from the rest of the code such as in the case of cut-and-pasted , boiler plate, legacy code.
Merge the library back into Application code when :
  • You don't feel the cost of it's maintenance as a separate library is justified.
  • You want to make more aggressive optimization.
  • The library is getting specialized and hacked to fit to the Application code until it seems natural to just let it be a direct "member" of the Application code.

No comments: