You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
God View means one big view covering the union of all the different fields and layouts needed for the different steps of the submission process, with arcane 'attrs' rules switching fields on and off (see also "parallel ifs" below - this is a specific case of that). There is also a God Object issue but I'm not sure if that will be as easy to fix - we should look and see if it is though, but aggressively applying the Strategy pattern might resolve this.
"Parallel ifs" means we're switching on the same field in multiple methods, and/or have multiple dispatch tables on the same thing.
Replace the parallel ifs with Strategy pattern. Also use that to get rid of all the horrible switching on view name.
Replace the God View with a separate XML view per step (possibly with common stuff inherited from a base one) and switch between them in fields_view_get from the Strategies introduced when removing the parallel ifs.
The text was updated successfully, but these errors were encountered:
Nick-OpusVL
changed the title
[account_mtd*] Antipatterns abound
[account_mtd*] Get rid of parallel ifs and God View
Jun 19, 2019
Nick-OpusVL
changed the title
[account_mtd*] Get rid of parallel ifs and God View
[account_mtd_vat] Get rid of parallel ifs and God View
Jun 19, 2019
God View, and parallel ifs.
God View means one big view covering the union of all the different fields and layouts needed for the different steps of the submission process, with arcane 'attrs' rules switching fields on and off (see also "parallel ifs" below - this is a specific case of that). There is also a God Object issue but I'm not sure if that will be as easy to fix - we should look and see if it is though, but aggressively applying the Strategy pattern might resolve this.
"Parallel ifs" means we're switching on the same field in multiple methods, and/or have multiple dispatch tables on the same thing.
Replace the parallel ifs with Strategy pattern. Also use that to get rid of all the horrible switching on view name.
Replace the God View with a separate XML view per step (possibly with common stuff inherited from a base one) and switch between them in fields_view_get from the Strategies introduced when removing the parallel ifs.
The text was updated successfully, but these errors were encountered: