1. Home
  2. Docs
  3. Mastering UML 2.5: A Use ...
  4. Module 3: The Skeleton – ...
  5. Practical 3: Structural Implementation

Practical 3: Structural Implementation

In this practical session, you’ll apply structural UML modeling to realize the domain and implementation architecture of our Library Management System. We’ll start with the domain model using a Class Diagram (generated via AI and refined manually), then build a simple Component Diagram manually, and finally create a Deployment Diagram that reuses components from the previous step.

By the end, you’ll see how use cases drive structural design: nouns from flows (Book, Member, Loan…) become classes; modules become components; and runtime nodes show deployment.

Generating a Class Diagram (Domain Model) with AI

Visual Paradigm’s AI can quickly draft a domain-focused class diagram from a description — perfect for bootstrapping from use cases.

  1. Select Tools > AI Diagram Generation from the main menu.

    To generate diagram with AI

  2. In the AI Diagram Generation window, select Class Diagram as the type. In the Topic field, enter a clear description, e.g.:
    “Domain model for a Library Management System: include key entities like Member, Book, Loan, Reservation, Librarian, Fine; show attributes, basic relationships (associations, multiplicities), and inheritance if applicable. Focus on conceptual domain, no operations yet.”
    Then click OK.

    Entered the prompt for generating a class diagram with AI

  3. The AI generates a class diagram based on your description. Review the classes, attributes, and relationships.

    A class diagram generated by AI

  4. Refine manually: rename classes/attributes for clarity, adjust multiplicities, add missing associations, or delete irrelevant elements. We’ll cover detailed editing next.

Drawing a Class Diagram Manually (Domain Model)

For full control or when refining the AI draft, create the class diagram manually. We’ll build the same Library Management domain model.

  1. Select Diagram > New from the main menu.

    To create a new diagram

  2. Choose Class Diagram and click Next.

    Select a class diagram to create with

  3. Select Blank and click Next.

    Create a blank class diagram

  4. Name the diagram (e.g., “Library Domain Model”) and click OK.

    To name the class diagram to be created

  5. Create the first class: From the toolbar (left), click Class, then click on the canvas. Name it Book. Double-click to open specification and add attributes (e.g., ISBN: String, title: String, author: String, copiesAvailable: int).

    Drag a class from the diagram palette onto the diagram

  6. Add more classes using the same method: Member, Loan, Librarian, Fine.

    A UML class diagram with classes (not yet have relationships)

  7. Create associations: Hover over Member, drag Resource Catalog icon → Loan class.

    To create a relationship among two classes using Resource Catalog

  8. Select Association.

    To create an association between classes

  9. Set multiplicity (Member 1 → Loan 0..*).

    Enter the multiplicities for and association

  10. Continue building relationships: Loan references Book (1 Loan → 1 Book), Member pays Fine (optional extend-like), Librarian manages Loan.
  11. Finalize and layout: Use auto-layout or drag to arrange. Your diagram should look like this (conceptual domain model):

    A UML class diagram is created

Drawing a Component Diagram Manually

Now model the modular implementation. We’ll keep it simple: major subsystems realizing the domain/use cases. Create manually for control.

  1. Create new diagram: Diagram > New.

    To create a new diagram again (Component Diagram this time)

  2. Choose Component Diagram and click Next.
  3. Select Blank and click Next.
  4. Name the diagram (e.g., “Library Components”) and click OK.
  5. From toolbar, click Component, draw on canvas, name it CatalogService (provides book search/browse).

    Drag and drop to create a component from the palette on the diagram

  6. Add more components: LoanService, MemberService, NotificationService.

    Components are created

  7. Add interfaces: Hover over CatalogService, drag Resource Catalog to the left.

    Try to create an interface from a component via the Resource Catalog

  8. Select Realization -> Interface.

    To create a Provided relationship from the Component to the Interface

  9. Name the interface SearchAPI.

    An interface SearchAPI is created

  10. Connect the interface from LoanService. First, move LoanService to the left of SearchAPI.

    Component LoanService is moved to the left of the interface

  11. Press on Resource Catalog and drag to the Interface ball.

    To create a required interface between a component and an interface

  12. Select Usage.

    To create a required interface by creating a Usage relationship

  13. Release the mouse button. A ball-and-socket joint is formed.

    A ball and socket joint of a component diagram

  14. Complete simple wiring: LoanService provides LoanStatusAPI (used by NotificationService for due reminders).

    UML deployment diagram with components, required and provided interfaces

Creating a Deployment Diagram (Reusing Components)

Finally, show runtime deployment. Reuse the components from above as artifacts deployed on nodes.

  1. Create new diagram: Diagram > New.
  2. Choose Deployment Diagram and click Next.
  3. Select Blank and click Next.
  4. Name the diagram (e.g., “Library Deployment”) and click OK.
  5. Add nodes: Toolbar → Node → draw Web Server, Application Server, Database Server.

    To create nodes in a deployment diagram

  6. Reuse components: From Model Explorer (left pane), drag CatalogService, LoanService, etc., onto appropriate nodes (e.g., LoanService and MemberService on Application Server).

    To reuse components created in a component in a deployment diagram

  7. Add artifacts if needed (e.g., <> LibraryDB on Database Server).

    To create an artifact inside a node in deployment diagram

  8. Show communication: Connect nodes with Association or Communication Path (e.g., Web Server → Application Server → Database Server).To connect nodes with an association
    Here is the final Deployment Diagram:

    Deployment diagram created

Well done! You’ve now modeled structure from domain (classes) to modules (components) to runtime (deployment) — all driven by the use cases from Module 2.