How arcanik78/appasistencia works
File structure
• Top-level:
• App.xaml & App.xaml.cs: application entry point (startup, resources)
• MainWindow.xaml & MainWindow.xaml.cs: main user interface
• toastMessage.xaml & toastMessage.xaml.cs: a reusable notification/toast component
• model/Horario.cs: domain model representing a work schedule
• api/ApiServices.cs & api/ApiHorarioTrabajo.cs: service layer for HTTP calls to external APIs
• AssemblyInfo.cs, .gitignore, .gitattributes, solution and project files
• Architectural patterns:
• A layered approach (UI → domain model → service/API layer)
• Implicit MVVM/MVC flavor—Views in XAML, code-behind bridges to model and services
README for additional insights
• README only lists the project name. No further architectural notes are provided, so we infer from file organization.
a. Main components:
1. UI Layer
• App.xaml / App.xaml.cs
• MainWindow.xaml / MainWindow.xaml.cs
• toastMessage.*
2. Domain Model Layer
• model/Horario.cs
3. Service/API Layer
• api/ApiServices.cs (HTTP client configuration, generic request/response handling)
• api/ApiHorarioTrabajo.cs (endpoints for schedule retrieval)
4. External Backend API
• A remote RESTful service that provides schedule data (e.g., /horario endpoint)
b. Relationships and interactions:
• UI Layer invokes methods in ApiHorarioTrabajo to fetch/update Horario data.
• ApiHorarioTrabajo delegates to ApiServices for HTTP communication (GET/POST).
• ApiServices sends requests over the network to the External Backend API and returns deserialized Horario objects.
• UI Layer binds or pushes returned Horario objects into the view (MainWindow) and triggers toastMessage notifications on certain events (e.g., fetch success/failure).
c. Architectural patterns/design principles:
• Separation of concerns:
• Views (XAML) focus on layout
• Code-behind mediates user actions → service calls
• Model classes represent data contracts
• Services handle external communication
• Potential to evolve into MVVM by introducing a ViewModel layer between MainWindow and the Model/Service.
d. Key technologies/frameworks:
• .NET Framework or .NET Core (WPF)
• C#, XAML
• HTTP client libraries (HttpClient in ApiServices)
Final advice
• Be as granular as the file structure allows—each class can be its own element if needed.
• Data flow and dependency directions.
• Important design notes (e.g., “potential MVVM extension point between View and Model/Service layers”).