Software development principles:
1, the closure: function code block that has been achieved should not be modified.
2, open: open extension to existing features.
Because this content heavy practice, it is difficult textual representation, relevant content consult the following links: