- Spring 5.0 Microservices(Second Edition)
- Rajesh R V
- 151字
- 2021-07-02 19:44:49
Single responsibility per service
The single responsibility principle is one of the principles defined as part of the SOLID design pattern. It states that a unit should only have one responsibility.
Read more about the SOLID design pattern at http://c2.com/cgi/wiki?PrinciplesOfObjectOrientedDesign.
It implies that a unit, either a class, a function, or a service, should have only one responsibility. At no point do two units share one responsibility, or one unit perform more than one responsibility. A unit with more than one responsibility indicates tight coupling:

As shown in the preceding diagram, Customer, Product, and Order are different functions of an e-commerce application. Rather than building all of them into one application, it is better to have three different services, each responsible for exactly one business function, so that changes to one responsibility will not impair the others. In the preceding scenario, Customer, Product, and Order were treated as three independent microservices.
- C語言程序設計教程
- Objective-C Memory Management Essentials
- Visual Basic 6.0程序設計計算機組裝與維修
- JMeter 性能測試實戰(第2版)
- Visual C++數字圖像模式識別技術詳解
- MongoDB for Java Developers
- 從0到1:HTML+CSS快速上手
- Vue.js 3.0源碼解析(微課視頻版)
- 深入理解Android:Wi-Fi、NFC和GPS卷
- Kotlin從基礎到實戰
- Apache Spark 2.x for Java Developers
- Building Machine Learning Systems with Python(Second Edition)
- Natural Language Processing with Java and LingPipe Cookbook
- 快速入門與進階:Creo 4·0全實例精講
- 計算機應用技能實訓教程