Chapter 10 – Reactive Programming Patterns and Techniques

  1. What is a stream?

A sequence of events is called a stream. A stream can emit three things: a value, an error, and a signal for completion.

  1. What are reactive properties?

Reactive properties are binding properties that react when an event triggers.

  1. What is a reactive system?

On the basis of the Reactive Manifesto, we can conclude that reactive systems are as follows:

    • Responsive: Reactive systems are event-based design systems because of this design approach; these systems are quick to respond to any request in a short time.
    • Scalable: Reactive systems are reactive in nature. These systems can react to change the scalability rate by expanding or reducing the allocated resources.
    • Resilient: A resilient system is one that would not stop, even if there is any failure/exception. Reactive systems are designed in such a way that, despite any exception or failure, the system will never die; it remains working.
    • Message-based: Any data of an item represents a message and can be sent to a specific destination. When a message or data has arrived at a given state, an event that is a signal is emitted to notify that the message has been received. Reactive systems rely on this message-passing.
  1. What is meant by merging two reactive streams?

Merging two reactive steams is actually combining elements of two similar or different reactive streams into a new reactive stream. For example, if you have stream1, and stream2 then stream3 = stream1.merge(stream2), but the sequence of stream3 would not be in order.

  1. What is the MVVM pattern?

 Model-View-ViewModel (MVVM) is one of the variations of Model-View-Controller (MVC) to meet the modern UI development approach, where UI development is the core responsibility of designer/UI-developers, rather than application developers. In this approach of development, a designer who is more of a graphical enthusiast and is focused on making the user interface more attractive may or may not bother about the development part of the application. Generally, designers (UI persons) use various tools to make the user interface more attractive. The MVVM is defined as follows:

    • Model: This is also called as a domain object and it holds data only; there is no business logic, validations, and so on.
    • View: This is a representation of data for the end user.
    • View Model: This separates View and Model; its main responsibility is to serve end users better stuff.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.229.113