Python Programming from First Principles: Learn to Code, Think Computationally, and Solve Real-World Problems
PDFEPUB
BOOK 000 · CHAPTER 7 · Component Diagram

Component Diagram

A component diagram shows software parts and their dependencies. A component is drawn as a labeled box with a component symbol. A dashed arrow points from the component using a service to the component providing it.

Entry pointmain.pyControllercontroller.pyModelmodels.pyViewviews.pyinvokescalls domainoperationsformats response

The entry point invokes the Controller. The Controller uses the Model for domain operations and the View for formatting. These responsibilities can begin in one file before you split them into modules.

A dependency arrow does not implement authentication or guarantee independence. Add storage, authentication or recommendation components only when you implement and test those features.

The next section brings these responsibilities together in a small Model–View–Controller example.