# doremichen/dotnet_exercise architecture

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

- Interactive diagram: https://gitdiagram.com/doremichen/dotnet_exercise
- Repository: https://github.com/doremichen/dotnet_exercise

## Overview

##### Project Type and Purpose
- This repository is a collection of homework/sample apps demonstrating:
- Cross-platform .NET MAUI applications (MyFirstApp, NoteApp, NoteApp_MVVM)
- MVVM architecture (NoteApp_MVVM, WpfApp_DataBinding)
- WPF data-binding and converters (WpfApp_DataBinding)
- No backend services or databases are included—these are purely UI/UX and client-side logic demos.

##### File Structure
- Top-level solutions:
- MyFirstApp/MyFirstApp.sln
- NoteApp/NoteApp.sln
- NoteApp_MVVM/Notes.sln
- WpfApp_DataBinding/WpfApp_DataBinding.sln
- Each MAUI project has:
- A shared “.csproj” with XAML views (AppShell, MainPage, etc.)
- A “Platforms” folder with OS-specific project stubs (Android, iOS, MacCatalyst, Tizen, Windows)
- Resources (Fonts, Images, Styles, Raw assets)
- NoteApp_MVVM adds:
- Models/, ViewModels/, Views/ directories implementing full MVVM
- WpfApp_DataBinding has:
- App.xaml + MainWindow.xaml
- ViewModels/ with converters and collection demos
- No server or external service integrations—focus is on client architecture.

##### README
- Minimal description: “dotnet_exercise – Home work,” confirming this is purely sample code.

##### How to Represent the Architecture
a. Main Components
1. Shared Core Project (for each MAUI app):
– App entry point (MauiProgram.cs)
– UI layer (XAML Views)
– Business logic layer (ViewModels or code-behind)
– Models (POCO data classes)
– Resource catalogs (Styles, Fonts, Images)
2. Platform Projects (Android, iOS, MacCatalyst, Tizen, Windows):
– OS bootstrap (MainActivity, AppDelegate, Program.cs)
– Manifests and entitlements
3. WPF App (WpfApp_DataBinding):
– View (MainWindow + Demo windows)
– ViewModels/Converters
– Models
b. Relationships & Interactions
– Shared Core exposes UI → binds to ViewModels → manipulates Models
– Core calls platform abstractions (DependencyService or native bridges) via interfaces in the shared project
– Platform bootstrappers load the shared App class and register services
– Resources (XAML + assets) flow into Views at runtime
c. Architectural Patterns & Principles
– MVVM: separation of View, ViewModel, Model
– Cross-platform abstraction: a single shared codebase with thin platform layers
– XAML resource dictionaries for theming & styling
d. Key Technologies & Frameworks
– .NET MAUI (MauiProgram, AppShell, XAML)
– C# code-behind for quick demos (MyFirstApp) vs. ViewModels (NoteApp_MVVM)
– WPF data binding & IValueConverter (BoolToTextConverter)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% MyFirstApp Module
    subgraph "MyFirstApp"
        direction TB
        subgraph "Shared Core"
            direction TB
            MFCore["Shared Core"]:::core
            MFViews["Views\n(AppShell.xaml, MainPage.xaml)"]:::ui
            MFLogic["MauiProgram.cs\nApp.xaml.cs"]:::logic
            MFModel["PhonewordTranslator.cs"]:::model
            MFCore --> MFViews
            MFViews --> MFLogic
            MFLogic --> MFModel
        end
        MFPlatAndroid["Android Project"]:::platform
        MFPlatiOS["iOS Project"]:::platform
        MFPlatMac["MacCatalyst Project"]:::platform
        MFPlatTizen["Tizen Project"]:::platform
        MFPlatWin["Windows Project"]:::platform
        MFPlatAndroid --> MFCore
        MFPlatiOS --> MFCore
        MFPlatMac --> MFCore
        MFPlatTizen --> MFCore
        MFPlatWin --> MFCore
    end

    %% NoteApp Module
    subgraph "NoteApp"
        direction TB
        subgraph "Shared Core"
            direction TB
            NA_Core["Shared Core"]:::core
            NA_Views["Views\n(AboutPage, AllNotesPage, MainPage)"]:::ui
            NA_Logic["MauiProgram.cs\nAppShell.xaml.cs"]:::logic
            NA_Models["Models\n(Note.cs, AllNotes.cs, About.cs)"]:::model
            NA_Core --> NA_Views
            NA_Views --> NA_Logic
            NA_Logic --> NA_Models
        end
        NAPlatAndroid["Android Project"]:::platform
        NAPlatiOS["iOS Project"]:::platform
        NAPlatMac["MacCatalyst Project"]:::platform
        NAPlatTizen["Tizen Project"]:::platform
        NAPlatWin["Windows Project"]:::platform
        NAPlatAndroid --> NA_Core
        NAPlatiOS --> NA_Core
        NAPlatMac --> NA_Core
        NAPlatTizen --> NA_Core
        NAPlatWin --> NA_Core
    end

    %% NoteApp_MVVM Module
    subgraph "NoteApp_MVVM"
        direction TB
        subgraph "Shared Core"
            direction TB
            NMVVM_Core["Shared Core"]:::core
            NMVVM_Views["Views\n(AboutPage, AllNotesPage, NotePage)"]:::ui
            NMVVM_Logic["MauiProgram.cs\nAppShell.xaml.cs"]:::logic
            NMVVM_Models["Models\n(Note.cs)"]:::model
            NMVVM_ViewModels["ViewModels\n(AboutVM, NoteVM, NotesVM)"]:::logic
            NMVVM_Core --> NMVVM_Views
            NMVVM_Views --> NMVVM_ViewModels
            NMVVM_ViewModels --> NMVVM_Models
        end
        NMPlatAndroid["Android Project"]:::platform
        NMPlatiOS["iOS Project"]:::platform
        NMPlatMac["MacCatalyst Project"]:::platform
        NMPlatTizen["Tizen Project"]:::platform
        NMPlatWin["Windows Project"]:::platform
        NMPlatAndroid --> NMVVM_Core
        NMPlatiOS --> NMVVM_Core
        NMPlatMac --> NMVVM_Core
        NMPlatTizen --> NMVVM_Core
        NMPlatWin --> NMVVM_Core
    end

    %% WPF Demo Module
    subgraph "WpfApp_DataBinding"
        direction TB
        WPFCore["App Core"]:::core
        WPFViews["Views\n(MainWindow, DemoCollectionWindow, DemoConvertWindow)"]:::ui
        WPFViewModels["ViewModels\n(CollectionVM, ConvertVM)"]:::logic
        WPFModels["Models\n(Person.cs)"]:::model
        WPFConverters["Converters\n(BoolToTextConverter)"]:::logic
        WPFCore --> WPFViews
        WPFViews --> WPFViewModels
        WPFViewModels --> WPFModels
        WPFViews --> WPFConverters
    end

    %% Click Events
    click MFCore "https://github.com/doremichen/dotnet_exercise/tree/main/MyFirstApp/MyFirstApp"
    click MFPlatAndroid "https://github.com/doremichen/dotnet_exercise/tree/main/MyFirstApp/MyFirstApp/Platforms/Android"
    click MFPlatiOS "https://github.com/doremichen/dotnet_exercise/tree/main/MyFirstApp/MyFirstApp/Platforms/iOS"
    click MFPlatMac "https://github.com/doremichen/dotnet_exercise/tree/main/MyFirstApp/MyFirstApp/Platforms/MacCatalyst"
    click MFPlatTizen "https://github.com/doremichen/dotnet_exercise/tree/main/MyFirstApp/MyFirstApp/Platforms/Tizen"
    click MFPlatWin "https://github.com/doremichen/dotnet_exercise/tree/main/MyFirstApp/MyFirstApp/Platforms/Windows"

    click NA_Core "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp/NoteApp"
    click NA_Models "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp/NoteApp/Models"
    click NA_Views "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp/NoteApp/Views"
    click NAPlatAndroid "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp/NoteApp/Platforms/Android"
    click NAPlatiOS "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp/NoteApp/Platforms/iOS"
    click NAPlatMac "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp/NoteApp/Platforms/MacCatalyst"
    click NAPlatTizen "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp/NoteApp/Platforms/Tizen"
    click NAPlatWin "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp/NoteApp/Platforms/Windows"

    click NMVVM_Core "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp_MVVM"
    click NMVVM_Models "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp_MVVM/Models"
    click NMVVM_ViewModels "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp_MVVM/ViewModels"
    click NMVVM_Views "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp_MVVM/Views"
    click NMPlatAndroid "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp_MVVM/Platforms/Android"
    click NMPlatiOS "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp_MVVM/Platforms/iOS"
    click NMPlatMac "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp_MVVM/Platforms/MacCatalyst"
    click NMPlatTizen "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp_MVVM/Platforms/Tizen"
    click NMPlatWin "https://github.com/doremichen/dotnet_exercise/tree/main/NoteApp_MVVM/Platforms/Windows"

    click WPFCore "https://github.com/doremichen/dotnet_exercise/tree/main/WpfApp_DataBinding/WpfApp_DataBinding"
    click WPFModels "https://github.com/doremichen/dotnet_exercise/tree/main/WpfApp_DataBinding/WpfApp_DataBinding/Models"
    click WPFViewModels "https://github.com/doremichen/dotnet_exercise/tree/main/WpfApp_DataBinding/WpfApp_DataBinding/ViewModels"

    %% Styles
    classDef ui fill:#85C1E9,stroke:#333,stroke-width:1px
    classDef logic fill:#82E0AA,stroke:#333,stroke-width:1px
    classDef model fill:#F7DC6F,stroke:#333,stroke-width:1px
    classDef platform fill:#D5D8DC,stroke:#333,stroke-width:1px
    classDef core fill:#BB8FCE,stroke:#333,stroke-width:1px
```
