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

8. Extract Action Logic to Controllers #81

Open
6 tasks
agilare opened this issue Sep 29, 2024 · 0 comments
Open
6 tasks

8. Extract Action Logic to Controllers #81

agilare opened this issue Sep 29, 2024 · 0 comments
Labels

Comments

@agilare
Copy link
Owner

agilare commented Sep 29, 2024

Separate dependency logic (use app settings to create objects) from action logic (use previously created objects) to perform page actions

Process (from MLAP, p. 144) :

  • Find a page script where action logic is still mixed in with the rest of the code.
  • In that page script, rearrange the code so that all action logic is in its own central block. Spot check the rearranged code to make sure it still works properly.
  • Extract the central block of action logic to a new Controller class, and modify the page script to use the new Controller. Spot check the page script with the Controller in place.
  • Write a unit test for the new Controller class and spot check again.
  • Commit the new code and tests, push them to the common repository, and notify QA.
  • Find another page script with embedded action logic and start again; when all page scripts use Controller objects, we are done.
@agilare agilare converted this from a draft issue Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant