Skip to content

Refactor Architecture #446

Description

@LBeghini

As the software grew and at speed, the architecture of the code started to degrade. Updates needs to be made to fill the most recent needs of the software.

Definition

The proposed architecture is designed with modularity and separation of concerns in mind. It consists of the view, that contains elements, components, and windows, each serving a distinct purpose. Additionally, controllers facilitate communication between windows, the domain handles logic and domain classes, and the store manages shared information across components.

  1. view
    The View package encapsulates the graphical user interface components and their organization.

    • elements
      Elements are minimal, basic components with common behavior. They are the building blocks of the UI and do not require extensive testing. Examples include buttons, labels, and input fields. Elements are the atomic units that form the foundation of the UI.

    • components
      Components encapsulate logic and contain elements. They act as higher-level UI constructs and may involve more complex interactions. Components are responsible for managing the behavior of elements and coordinating their actions. These should be thoroughly tested to ensure their functionality.

    • windows
      Windows serve as the outermost layer, wrapping everything together. They represent distinct sections of the application UI. Each window contains one or more components and is responsible for displaying them. Windows provide a cohesive user experience by organizing components in a meaningful way.

  2. controllers
    Controllers facilitate communication between windows. They manage the flow of information and user interactions. Controllers act as intermediaries, handling events and updating the UI accordingly. They play a crucial role in ensuring proper navigation and coordination between different windows.

  3. domain
    The domain is the core of the application, housing logic and domain classes. It handles business rules, computations, and other non-UI related functionalities. Separating the domain from the UI ensures a clean and maintainable architecture, allowing for easier testing and future updates. It is important to emphasize that the domain has absolutely no knowledge about Qt.

  4. store
    The store is a centralized repository for information necessary across components. It stores shared state and data that multiple components may need to access. This ensures consistency and avoids redundancy in data management across the application.

Steps

  • Create components and elements
  • Replace components at windows
  • Migrate logical code blocks from controllers to domain
  • Eliminate the use of dictionaries, replacing them by classes
  • Organize the store

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
⚙ In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions