How trantienvn/lichhocictu works
Main Components
• Android UI Layer: This includes Activities (e.g., LoginActivity, AboutActivity, WeekActivity, and StudentInfoActivity) and Fragments (such as AddScheduleFragment, TestScheduleFragment, etc.) found under the “views” directory. These components handle user interactions and display data.
• Data Layer:
– Data Sources: Under the “datas” directory you have various packages for handling data. This includes files for integration with external services (e.g., GoogleCalendar.kt, GoogleSignOut.kt), local data management using SQLite (SqLite.kt), and custom data parsing and DOM-based sources (domHTML and parseData packages).
– Models: The “models” directory encapsulates data structures (e.g., NotificationID, RawCalendarCollection, StudentCalendarCollection, TestScheduleCollection, etc.) that represent business objects.
• Service & Notification Layer: Services (FirebaseMessengerService, AppService, ServiceState) and notification handling (AppNotification) are responsible for background operations and alerting users.
• External Libraries/Integrations: Notice the inclusion of external JARs (such as “jxl-2.6.12.1.jar”), Google services (google-services.json), Firebase integration, and configuration files (AndroidManifest.xml) that help integrate the app with external systems.
Relationships and Interactions
• The UI components (Activities and Fragments) initiate requests and trigger processes that are handed off to the data layer services.
• Data components fetch and manage data (from local SQLite databases and/or remote resources using DOM HTML and Excel parsing logic) and then supply processed models back to the UI.
• Service components manage background tasks (e.g., Firebase cloud messaging for notifications) and data synchronization, often interacting with both the UI and data sources.
• External APIs or services are integrated via dedicated classes (GoogleCalendar, domHTML/DomLogin, etc.) that encapsulate the logic for communications with external systems.
Architectural Patterns and Key Principles
• The structure loosely follows a Model-View-Controller (MVC) or Model-View-Presenter (MVP) pattern seen in many Android projects:
• Views (activities and fragments) communicate with:
• Models (data classes) via
• Controllers/Services (data sources, notifications, and data handling services).
• Modularization: The separation of concerns is clear, with distinct packages for UI, data sources, models, and services.
• Use of external libraries and services (Firebase, Google APIs) is integrated in a way that segments external dependencies from core application logic.
Technology Stack and Frameworks
• Android (Java/Kotlin): The “src/main/java” structure suggests Kotlin/Java language usage.
• Gradle: Build configuration is managed via Gradle files (“build.gradle”, “settings.gradle”, etc.).
• Firebase: Noted by the presence of FirebaseMessengerService.
• SQLite: Local database management is handled via SqLite.kt.
• Apache POI or JXL: External library (jxl-2.6.12.1.jar) appears to be used for Excel file handling.
Final Elements
• Every major module has a clear label along with submodules as needed.
Happy diagramming!