In our engineering organization we are formulating best practices. One goes in the direction of how to keep sanity to workshop modules (don’t deny it, you have all been there with 500+ variables ). So we are thinking through how to organize an application by embedding sub modules in a more structured way. I am seeking your opinion on two approaches (or if you have other ideas, please also share!)
See belows screenshot that describes two different scenarios. Both have in common that they have one main module acting as the landing page. In both scenarios the main module also has individual pages, however, they differ on how these sub-pages use sub-modules and how the general navigation is done.
The fist approach (screenshot → page 2

Works and is easy, but I dislike two things:
- we always have to spare real estate for the back to landing button
- In most cases we also use the left section with sub-page navigator (tabs) and have specific filter list just for that page. So in this approach the main module actually needs to hold these sub-page navigators and OTs just to show the different filter-list (which also need to be passed in as Interface variable)
(I hope you can follow so far)
The second approach (Screenshot → page 1) is to embedd the submodule on main - page 1 at full screen. So once you go from main to page 1, you will actually only see the content of the sub-module. This has the benefit, that we can really limit the OTs, etc. to what is necessary on sub module page 1.
Now the question with approach 2 is: how do you I best do the navigation back the main landing page? From the sub-module, I can’t trigger the switch page event at (parent) main module nor is there a “close self” event at the sub-module.
What is possible is to use variable-backed paging on the main module. The variable backing this is passed into the sub-module of page 1 as Interface. By clicking “back to landing” in the sub-module, we set the variable to the static page-id “landing” that switches the main module back to landing
What is not working is: When using the switch page event from main - landing to main - page 1 it will actually not automatically update the current-page variable to “page 1”. Since the current-page variable is still set to “landing”, clicking on the “back to landing” button in sub-module 1 will not trigger anything since there is no change in that variable.
Although I like this approach more, the only way to get this working, would be to always and exclusively use set variable to change the current_page variable instead of actual switch page events - also when i.e. just going from main - landing to main - page 1.
Long post, I hope you were able to follow, happy to hear your thoughts!