’m moving on to thinking about the “Screen Activation Lifecycle” section of my book and getting ready for my VAN presentation this week. I’m defining “Screen Activation Lifecycle” as the process of, wait for it, activating and deactivating screens within an application shell for applications with multiple screens. As I’m starting this subject I have my own laundry list of topics and patterns to discuss, but I’d really love to hear from you what would be helpful to you. This topic is not very well documented anywhere except a bare handful of blog posts, but it has to come up on a lot of applications. Moreover, there is very little framework support. Caliburn has some support for a “Screen Activation Lifecycle,” but as of the latest code drop, Prism v1 doesn’t address this concern at all.
Here then is what I am planning to discuss:
- View First vs. Presenter/ViewModel First navigation
- Modularity. How can I structure the application to make it easier to add all new screens?
- Starting screens
- Connecting Presenter/ViewModel to the View
- Locating the proper view
- How to activate a screen
- How menus and other screens can start a new screen
- Tracking the open screens
- Closing screens
- Cleaning up resources
- Doing the nagging screens for “But wait, you have unsaved changes!”
- “Can Close” mechanics
- Tabbed MDI layouts
- How to know whether to activate a hidden screen or create a new one
- Switching between tabs
- Closing tabs, Close All, Close all but this
- Web-style navigation / Wizard workflow
- Remembering history and being able to go back or forward
- Validating page transitions and disallowing navigation based on validation
- “Dashboard” layout. I don’t have much more here than a placeholder for “go learn about how people do dashboard layouts.” This does seem to be what Prism is built for though
- Synchronizing Menu state when screens are activated or deactivated
- Adding peripheral controls to the shell to support a screen. I.e., when you activate a screen in the main content area it wants to put other controls in the explorer pane on the left or right.
- Dynamic menus
- “Plugging in” custom shortcuts
- Enabling / disabling menus while a screen is running
- Wiring with an IoC tool
Again, this is what *I* have thought about to include in the book. I really want to know what you would want to see. What is difficult for your team? Got an interesting solution? I’d love to hear about it or get more suggestions for other content. Thank you in advance.
Patterns I’m Using
All these pattern names are preliminary – i.e., until I or someone else comes up with a better name
- Application Shell
- Application Controller
- Screen Collection
- Screen Conductor
- Screen Factory
- Screen Subject
- Shell Service
- Menu State
- Registry