# bangoc/it3120 architecture

> Architecture diagram of the GitHub repository bangoc/it3120, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bangoc/it3120
- Repository: https://github.com/bangoc/it3120

## Overview

- Case Studies: The “CaseStudy” directory (with files such as “PattersonSuperstore_vi.pdf” and supporting resources) illustrates real-world examples of system design application.
- Demo Applications: Under the “demo” folder you have multiple sample projects arranged by their design patterns or languages:
- Java-based examples (e.g., “spring-cardb”, “mvc-clock/java”, “model2clock”)
- C++ examples (e.g., “guess-number-cpp”, “guess-number-mv-cpp”, “guess-number-observer-cpp”)
- Separate modules for various concerns, such as Data Access (customers in “dam” and “dao”) and UI components.
- Auxiliary / Legacy Materials: Folders like “qb” and “old” offer past resources and additional exercises, which can be seen as supplementary layers.

##### Relationships and interactions between components
- Within Demo Applications: Identify layers typical of a full-stack design when applicable. For instance:
- In “spring-cardb”, separate the Presentation (controllers, views), Business logic, and Data Access layers (repositories).
- In the various guess-number implementations (DAM, MVC, Observer), illustrate how the Controller, Model, and View components interact and how patterns such as Observer are implemented.
- Legacy and initial drafts (“first-cut”, “old”) can be represented as earlier iterations feeding into mature designs present in the demos and documentation.

##### Architectural patterns and design principles
- Modularity: The separation between demonstration code and academic/research documentation underscores layered design principles.

##### Relevant technologies and frameworks
- For Java demos (spring-cardb, model2clock, mvc-clock): note the use of Maven/Gradle, Spring Framework, and typical Java web artifacts (web.xml, JSP files, etc.).
- For C++ demos: include clues from CMakeLists.txt, and note reliance on simple graphical resources (bitmaps) and custom event loops in games.
- For UML and design documents: refer to modeling tools (e.g., Modelio given the .mdj files) and standard UML conventions.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Documentation & Design Resources
    subgraph "Documentation & Design Resources"
        Docs["Theoretical Documents"]:::doc
        UML["UML Diagrams"]:::doc
        FirstCut["Early Design Drafts"]:::doc
        Legacy["Legacy Docs"]:::doc
    end

    %% Case Studies
    subgraph "Case Studies"
        CaseStudy1["PattersonSuperstore Example"]:::case
        CaseStudyRes["CaseStudy Resources"]:::case
    end

    %% Demo Applications
    subgraph "Demo Applications"
        subgraph "Java Demos"
            Spring["Spring-Cardb"]:::java
            MVCJava["MVC-Clock (Java)"]:::java
            Model2["Model2Clock"]:::java
        end
        subgraph "C++ Demos"
            GuessCPP["Guess-Number (C++)"]:::cpp
            GuessMVC["Guess-Number MV (C++)"]:::cpp
            GuessObserver["Guess-Number Observer (C++)"]:::cpp
            MVCCpp["MVC-Clock (C++)"]:::cpp
        end
    end

    %% Auxiliary / Legacy Materials
    subgraph "Auxiliary / Legacy Materials"
        QB["QB Materials"]:::aux
    end

    %% MVC-Clock (Java) detailed MVC components
    MVCJava -->|"contains"| MVCJavaController["MVC Clock (Java): Controller"]:::mvc
    MVCJava -->|"contains"| MVCJavaModel["MVC Clock (Java): Model"]:::mvc
    MVCJava -->|"contains"| MVCJavaView["MVC Clock (Java): View"]:::mvc
    MVCJavaController -->|"updates"| MVCJavaModel:::mvc
    MVCJavaModel -->|"notifies"| MVCJavaView:::mvc
    MVCJavaView -->|"triggers"| MVCJavaController:::mvc

    %% Observer pattern elements for Guess-Number Observer (C++)
    GuessObserver -->|"contains"| ObserverSubject["Observer Pattern: Subject"]:::observer
    GuessObserver -->|"contains"| ObserverObserver["Observer Pattern: Observer"]:::observer
    ObserverSubject -->|"notifies"| ObserverObserver:::observer

    %% Relationships from Documentation & Design Resources to Demo Applications
    Docs -->|"informs"| Spring
    Docs -->|"informs"| MVCJava
    Docs -->|"informs"| Model2
    Docs -->|"informs"| GuessCPP
    Docs -->|"informs"| GuessMVC
    Docs -->|"informs"| GuessObserver
    Docs -->|"informs"| MVCCpp

    UML -->|"informs"| Spring
    UML -->|"informs"| MVCJava
    UML -->|"informs"| Model2
    UML -->|"informs"| GuessCPP
    UML -->|"informs"| GuessMVC
    UML -->|"informs"| GuessObserver
    UML -->|"informs"| MVCCpp

    %% Relationships from Case Studies to Demo Applications
    CaseStudy1 -->|"informs"| Spring
    CaseStudy1 -->|"informs"| MVCJava
    CaseStudy1 -->|"informs"| Model2
    CaseStudy1 -->|"informs"| GuessCPP
    CaseStudy1 -->|"informs"| GuessMVC
    CaseStudy1 -->|"informs"| GuessObserver
    CaseStudy1 -->|"informs"| MVCCpp

    %% Iterative influences from Early Drafts and Legacy Docs to selected demos
    FirstCut -->|"iterates"| GuessObserver
    Legacy -->|"iterates"| GuessMVC

    %% Click Events
    click Docs "https://github.com/bangoc/it3120/blob/master/04-Uoc luong chi phi thuc hien du an theo UCP.pdf"
    click UML "https://github.com/bangoc/it3120/blob/master/UML/examples.mdj"
    click FirstCut "https://github.com/bangoc/it3120/tree/master/first-cut"
    click Legacy "https://github.com/bangoc/it3120/tree/master/old"
    click CaseStudy1 "https://github.com/bangoc/it3120/blob/master/CaseStudy/PattersonSuperstore_vi.pdf"
    click CaseStudyRes "https://github.com/bangoc/it3120/tree/master/CaseStudy/all-external-resources"
    click Spring "https://github.com/bangoc/it3120/tree/master/demo/spring-cardb"
    click MVCJava "https://github.com/bangoc/it3120/tree/master/demo/mvc-clock/java"
    click Model2 "https://github.com/bangoc/it3120/tree/master/demo/model2clock"
    click GuessCPP "https://github.com/bangoc/it3120/tree/master/demo/guess-number-cpp"
    click GuessMVC "https://github.com/bangoc/it3120/tree/master/demo/guess-number-mv-cpp"
    click GuessObserver "https://github.com/bangoc/it3120/tree/master/demo/guess-number-observer-cpp"
    click MVCCpp "https://github.com/bangoc/it3120/tree/master/demo/mvc-clock/cpp"
    click QB "https://github.com/bangoc/it3120/tree/master/qb"

    %% Styles
    classDef doc fill:#AED6F1,stroke:#2980B9,stroke-width:2px;
    classDef case fill:#A9DFBF,stroke:#27AE60,stroke-width:2px;
    classDef java fill:#F9E79F,stroke:#F1C40F,stroke-width:2px;
    classDef cpp fill:#F5CBA7,stroke:#E67E22,stroke-width:2px;
    classDef aux fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
    classDef mvc fill:#82E0AA,stroke:#27AE60,stroke-width:2px;
    classDef observer fill:#C39BD3,stroke:#8E44AD,stroke-width:2px;
```
