- Modular Programming with JavaScript
- Sasan Seydnejad
- 212字
- 2021-07-14 10:56:44
Chapter 1. What Are Modules and Their Advantages?
In this very first chapter, I will provide you with an overview of the modular design approach in application development as it relates to JavaScript applications.
I will also mention parallels between the modular style of application architecture and the real-life examples of this conceptual design.
Hopefully, as you read along, you'll be able to relate to at least some aspects of the modular design approach and start to see why this style of organizing your code can be extremely beneficial.
The main objective of this chapter is to create a familiar context for you, and to get you started on thinking the modular way as you create and organize your code. Soon, you will see that this approach can organically grow into a well-defined application architecture methodology.
We will start the chapter with a brief discussion on how we can organize our code based on specialization. Then we will look at how we can define modules based on the functionality that they provide.
The topics that are covered in this chapter are:
- The simple rule to creating modules
- A real life example of modules
- A look at a non-modular example
- Re-factoring into a more modular approach
- Designing in a modular way