How tadyuh76/oop---hrms works
Main Components
• User Interface (UI) / Presentation Layer:
• Forms/Windows – Representing the WinForms UI components like MainForm, Employee forms, Department forms, Attendance forms, Leave forms, and Payroll forms.
• Domain Layer (Core):
• Domain Models – Classes representing entities like Employee, Department, Attendance, Payroll, LeaveRequest, etc.
• Factories & Events – Modules (e.g., EmployeeFactory, EventArgs) that encapsulate creation logic and event handling.
• Custom Exceptions – For business rule violations.
• Service Layer (Business Logic):
• Services – Components handling operations such as AttendanceService, DepartmentService, EmployeeService, LeaveService, PayrollService, and RoleSelectionService.
• Storage Layer / Data Access:
• Repository Implementation – JSONFileStorage and FileManager handling file-based I/O and data serialization.
• Data files – JSON files (Employees.json, Departments.json, etc.) that act as the data source.
• Supporting Utilities:
• Core utilities like ColorPalette, Enums, etc., which support the overall functionality within the layers.
Relationships and Data Flow
• The UI (Forms) interacts with the Service Layer to process user commands.
• The Service Layer contains the business logic and calls the Domain Layer for operations on business entities.
• The Storage layer is accessed by the Service Layer (using repository-like patterns) to perform persistent data operations (read/write to JSON files).
Architectural Patterns
• Layered Architecture: Clearly separate the UI, service, and data layers.
• Use of Factories for object creation improves modularity.
• Employ repository/file storage for handling persistence.
• Implementation of event-driven communication (using Events/Delegates).
Details on Technologies and Tools
• WinForms for the UI.
• C# (.NET) for business and domain logic.
• JSON file handling via custom serialization.
• Visual Studio project structure (indicating .csproj, use of .NET 8.0) which supports the multi-layered architecture.