How jhoannpv/calculadora-de-interes works
Main Components
• Flutter UI Layer: Represent the user interface which lives mostly in the lib/ui directory. This includes pages (like home and operations), widgets, and app configuration (lib/ui/app.dart).
• Domain/Business Logic Layer: Include the business logic in the lib/domain directory. This is where the controllers, calculations (e.g., calculate_simple_interest, calculate_gradients, etc.), and data management reside.
• Platform-Specific Layers: Showcase separate modules for Android, iOS, and other supported platforms like web, Linux, macOS, and Windows. This delineates how Flutter acts as a single codebase deployed across multiple platforms with platform-specific configurations.
Relationships and Interactions
• Data Flow: Illustrate how user commands from the UI trigger function calls to the business logic components (controllers in lib/domain) and how these compute the results which are then sent back to the UI for display.
• UI components invoke calculation functions in the domain layer.
• The domain layer maintains separation from platform-specific code but all layers interact through Flutter’s framework.
• The interface between the Flutter framework and platform-specific runtime (Android/iOS, etc.) should be noted.
Architectural Patterns and Design Principles
• Separation of Concerns: Emphasize the clear distinction between UI (presentation layer) and business logic (domain layer).
• Multi-platform approach: Point out that the project is designed to be deployed on multiple operating systems with a single unified codebase.
• Modular Design: The file structure (separating domain, UI, and platform-specific directories) shows a modular approach to building the application.
Relevant Technologies, Frameworks, or Libraries
• Flutter (UI toolkit and framework) for creating the application interface.
• Dart (language) for writing business logic.
• Platform-specific build tools: Gradle for Android, Xcode for iOS, and respective tools for desktop and web.
Implementation Advice for the Principal Software Engineer
• Detail the internal workings of the domain layer by listing the individual calculation modules (like “calculate_simple_interest”, “calculate_annuities”, etc.) and how they interact.