Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP for the Quasi tab of the Inelastic Bayes Fitting interface #38004

Open
5 tasks
robertapplin opened this issue Sep 17, 2024 · 0 comments · May be fixed by #38454
Open
5 tasks

MVP for the Quasi tab of the Inelastic Bayes Fitting interface #38004

robertapplin opened this issue Sep 17, 2024 · 0 comments · May be fixed by #38454
Assignees
Labels
Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS Maintenance Unassigned issues to be addressed in the next maintenance period.
Milestone

Comments

@robertapplin
Copy link
Contributor

robertapplin commented Sep 17, 2024

Describe the outcome that is desired.
We want to refactor the Quasi tab in the Inelastic Bayes Fitting interface so that it utilizes the MVP design pattern. Using MVP has several benefits including:

Separation of Concerns: MVP enforces a clear separation of concerns within your application, making it easier to manage and maintain. It divides the application into three distinct components: Model, View, and Presenter, each with specific responsibilities.

Testability: MVP promotes testability by isolating the presentation logic in the Presenter. This separation allows you to write unit tests for the business logic without involving the user interface, making it easier to verify the correctness of your code.

Reusability: MVP can enhance code reusability, as the Presenter, which contains the application's logic, can often be reused with different views. This can be particularly useful in cases where you need to provide multiple user interfaces for the same application logic (e.g., web and mobile apps).

Maintainability: The separation of concerns in MVP makes it easier to maintain and extend your codebase. Changes to the user interface (View) do not require modifying the underlying logic (Presenter) and vice versa. This can reduce the risk of introducing new bugs when making updates.

Describe any solutions you are considering
Rather than having a single class, currently called Quasi, we want three classes:

QuasiView, QuasiModel and QuasiPresenter

Testing instructions
Testing instructions for this tab can be found on this page:
https://mantidproject.github.io/developer/Testing/Inelastic/BayesFittingTests.html

Acceptance Criteria
A few things to look out for (this is not an extensive list):

  • Qt is only used in the View
  • The Presenter does not have any Qt connections
  • The model contains the logic
  • The model and view are passed into the presenter constructor
  • The model and view do NOT communicate directly.
@robertapplin robertapplin added Indirect/Inelastic Issues and pull requests related to indirect or inelastic Maintenance Unassigned issues to be addressed in the next maintenance period. ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS labels Sep 17, 2024
@robertapplin robertapplin added this to the Release 6.12 milestone Nov 13, 2024
@robertapplin robertapplin self-assigned this Nov 13, 2024
@robertapplin robertapplin moved this to In Progress in ISIS Spectroscopy Nov 19, 2024
@robertapplin robertapplin linked a pull request Nov 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS Maintenance Unassigned issues to be addressed in the next maintenance period.
Projects
Status: In Progress
Status: Backlog
Development

Successfully merging a pull request may close this issue.

1 participant