Controlling Data Streams
Learn how to create a centralized service that will serve as a switch between application modes, including work mode and view mode.
We'll cover the following...
Work/view mode use case
In this lesson, we will go through a very common scenario when building web applications. Suppose that you are building a SPA web application- a web-based image editor similar to Photoshop that will work in two modes: work Mode and view Mode. It will have several components that must communicate with each other by exchanging keyboard and mouse events, HTTP requests, etc.
When in work mode, every kind of communication between components must take place (with every keyboard and mouse event handled accordingly), and the appropriate action should be triggered.
When in view mode, the event handlers should be disabled so that no action is ...