2 Anatomy of a modular application
This chapter covers
- Laying out a modular application’s source code
- Creating module declarations
- Compiling modules
- Running a modular application
This chapter introduces you to the overall workflow of creating modular applications, but it doesn’t explain these topics in all detail. Chapters 3, 4, and 5 do that—they explore these subjects in depth. But with a topic as encompassing as the module system, it can be easy to miss the forest for the trees. That’s why this chapter shows you the big picture. It gives you an impression of how the different pieces of the puzzle fit together by presenting a simple modular application, how its modules are defined and compiled, and how the application is executed.
That means I make you jump into the deep end: not everything that follows may be immediately obvious. But don’t worry if something’s unclear—it will be thoroughly explained soon. When you’re done with part 1 of this book, everything in the example will make perfect sense. So dog-ear these pages, because you may want to refer back to them.