Understanding the counterarguments of using sub-modules

You are advised to avoid this pattern under the following conditions:

  • When the existing code base is not large enough, splitting into sub-modules too early hinders the speed of development. We should avoid doing this prematurely.
  • When there is a high coupling in the source code, it can be difficult to split the code. In that case, try to refactor the code to reduce coupling and then reconsider splitting code into sub-modules later. 

The idea of creating sub-modules does force the programmer to think about code dependencies. It is a necessary step when the application eventually grows bigger.

Next, we will discuss the keyword definition pattern, which allows us to construct objects with more readable code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.183.1