Building Battle-tested Front End Software: The art and science of building performant and robust front end applications by Dave Clayton

Building Battle-tested Front End Software: The art and science of building performant and robust front end applications by Dave Clayton

Author:Dave Clayton [Clayton, Dave]
Language: eng
Format: mobi, pdf
Publisher: Leanpub
Published: 2015-08-28T16:00:00+00:00


Cohesion and coupling

Your source code should be grouped into modules. Each module should have high cohesion – this means its code should carry out a small number of highly related functions, while avoiding coarsely grained data unrelated to that functionality. Modules should be loosely coupled, which means have as few dependencies on other modules as possible. A very easy measure of coupling is to look at the number of requires/imports at the top of a module’s source. If there are more than a handful (this number will of course vary by project and requirements), the module may be too tightly coupled. Fixing issues with cohesion and coupling generally involves refactoring. Refactor as early as possible to avoid accumulated technical debt, and knock-on effects of tightly coupled source modules.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.