- Java EE 8 and Angular
- Prashant Padmanabhan
- 185字
- 2021-07-02 19:22:38
Follow domain-driven design
Focus on the responsibility that the microservice is trying to meet. The scope of the service is more important than the lines of code used to build it. Teams would usually sit together and build an understanding of the domain from the domain experts. Once the domain is understood, then it is modeled as domain objects, which can be further grouped as sub-domains. In a monolith, the entire domain model is within a single application, but the microservice architecture would lead your domains to be used within different business contexts.
Bounded Contexts is a term used in DDD, which maps the domain entities within the context of its usage. A payment microservice might require a domain entity such as User, to be used for billing purposes, and thus the User entity may need to have payment details associated with it. But if the same domain entity is used in a notification service, then the payment information is an additional detail, which shouldn't get leaked into this service.
The idea of a bounded context is further explained in the section on Single Responsibility.
- HTML5+CSS3王者歸來(lái)
- Google Flutter Mobile Development Quick Start Guide
- Mobile Application Development:JavaScript Frameworks
- Java面向?qū)ο筌浖_(kāi)發(fā)
- PaaS程序設(shè)計(jì)
- C# Programming Cookbook
- Python爬蟲(chóng)開(kāi)發(fā):從入門(mén)到實(shí)戰(zhàn)(微課版)
- Magento 2 Theme Design(Second Edition)
- 基于免疫進(jìn)化的算法及應(yīng)用研究
- CKA/CKAD應(yīng)試教程:從Docker到Kubernetes完全攻略
- 零基礎(chǔ)學(xué)單片機(jī)C語(yǔ)言程序設(shè)計(jì)
- Hadoop大數(shù)據(jù)分析技術(shù)
- Learning Splunk Web Framework
- JQuery風(fēng)暴:完美用戶體驗(yàn)
- Visual C++從入門(mén)到精通(第2版)