Tiven Wang
chevron_rightPattern chevron_rightReactive

Reactive Design Patterns - Simple Component Pattern

Igor Miske
Wang Tiven October 16, 2017
425 favorite favorites
bookmark bookmark
share share

The Single Responsibility Principle (SRP) is a computer programming principle that states that every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility. Robert C. Martin expresses the principle as, “A class should have only one reason to change.”[1]

分而治之 (Divide and Conquer)策略讲的是把大的问题分割成更小的问题,进而找到每个小问题的方位和责任。通过这种责任划分的过程你可以更轻松的解决看似很庞大的但具有层级结构的问题。这就涉及到划分到什么程度才是合适的,SRP给出的答案是每个task(e.g. modular, class)应该具有完整的不可分割的单独的责任,或者用 Robert C. Martin 的话说,”一个类应该只有一个改变的理由。”

Applying SRP in Reactive Application





Similar Posts

  • Reactive - Spring WebFlux framework .
  • Testing Reactive Applications How to verify that the Reactive applications you build are elastic, resilient, and responsive. Testing is covered first because of the importance of proving Reactive capabilities. Just as Test-Driven Design (TDD) allows you to ensure that you are writing logic that meets your requirements from the outset, you must focus on putting into place the infrastructure required to verify elasticity, resilience, and responsiveness.
  • Stream Processing Stream processing is a computer programming paradigm, equivalent to dataflow programming, event stream processing, and reactive programming, that allows some applications to more easily exploit a limited form of parallel processing. The stream processing paradigm simplifies parallel software and hardware by restricting the parallel computation that can be performed. Given a sequence of data (a stream), a series of operations (kernel functions) is applied to each element in the stream.
  • Reactive Design Patterns Reactive Design Patterns
  • Reactive Design Patterns - Spring Boot Messaging
  • Reactive Design Patterns - Analyzing Latency of Traditional Approach


Back to Top