Grade me hard Help

Level 3: Component Diagram

The Component Diagram zooms into an individual container to show its internal building blocks, which are called "components." This diagram reveals the major structural components within a container and their interactions.

What is a "Component"?

A "component" is a logical grouping of related code that realizes a specific set of responsibilities. It is not a separately deployable unit itself; instead, it exists within a container.

Common examples of components include:

  • Service Layer Objects: A collection of classes grouped behind a facade or interface (e.g., InvoiceService, PaymentGateway).

  • Data Access Objects (DAO/Repository): Components responsible for communicating with a database (e.g., UserRepository).

  • MVC Components: In a Model-View-Controller architecture, these would be the models, views, and controllers (e.g., UserController, UserView).

  • Modules or Packages: A logical grouping of code within a larger codebase.

  • Domain-Driven Design (DDD) Aggregates: A cluster of domain objects that can be treated as a single unit.

Purpose and Scope

  • Audience: Primarily software developers and architects who need to understand the internal design of a specific container.

  • Goal: To show how a container is built by breaking it down into its key structural blocks. It helps developers understand the codebase, identify areas of responsibility, and see how components collaborate to fulfill the container's purpose.

  • Key Message: "Inside this container, here are the key components and how they work together."

PlantUML Example

This example zooms into the "API Application" container from the Container diagram.

API Application[container]Sign In Controller[Spring MVC Rest Controller] Allows users to sign in to theinternet banking system.Accounts SummaryController[Spring MVC Rest Controller] Provides customers with asummary of their bankaccounts.Security Component[Spring Bean] Provides functionalityrelated to authentication,authorization and sessions.Mainframe BankingSystem Facade[Spring Bean] A facade that providesaccess to the mainframebanking system.API Application[Java, Spring Boot] Provides internet bankingfunctionality via aJSON/HTTPS API.Database[Oracle Database Schema] Stores user credentials,access logs, etc.Mainframe BankingSystem Stores all of the corebanking information aboutcustomers, accounts,transactions, etc.UsesUsesUsesReads from andwrites to[JDBC]Uses[XML/HTTPS]Legend personsystemcontainercomponentexternal personexternal systemexternal containerexternal component
Last modified: 08 September 2025