Upgrade to Pro — share decks privately, control downloads, hide ads and more …

.NET Day 19 - Finding Your Service Boundaries -...

.NET Day 19 - Finding Your Service Boundaries - A Practical Guide by Adam Ralph

We know it's useful to split up complex systems. We've seen the benefits of modular deployment of microservices. Dealing with only one piece of code at a time eases our cognitive load. But how do we know where to draw the service boundaries? In complex business domains, it's often difficult to know where to start. When we get our boundaries wrong, the clocks starts ticking. Before long, we hear ourselves say "it would be easier to re-write it".
Join Adam for practical advice on discovering the hidden boundaries in your systems. Help tease out the natural separation of concerns in a sample business domain. During 20 years of developing complex systems, Adam has had plenty of time to get things wrong. Learn to avoid the common pitfalls that can lead us down the path to "the big re-write".

dotnetday

May 28, 2019
Tweet

More Decks by dotnetday

Other Decks in Technology

Transcript

  1. @adamralph Adam Ralph Im Mediapark 7 50670 Köln Germany Shipping

    Shipping Finance Finance Sales Sales WORKFLOW MESSAGES
  2. @adamralph WHAT A SERVICE IS NOT - A service that

    has only functionality is a function not a service: Like calculation, validation, etc. - A service that has only data is a database not a service: Like [create, read, update, delete] entity - HTTP/WSDL doesn’t change logical responsibility
  3. @adamralph WHAT IS A SERVICE? A service is the technical

    authority for a specific business capability - All data & business rules reside within the service (bounded context?) - Nothing is “left over” after identifying services. Everything must be in some service
  4. @adamralph DECOMPOSING A DOMAIN public class Customer { FirstName LastName

    Status // etc } public class Product { Name Description Price // etc } • Customer status • Product price • Customer’s first name • Customer’s last name • Product name • Product description RED GREEN YELLOW
  5. @adamralph Home insurance Travel insurance Car insurance Policy Service Home

    insurance Travel insurance Car insurance Claims Service Insured vehicle Coverage PolicyId ClaimId Car Insurance Home owner Coverage PolicyId ClaimId Home Insurance Insured persons Coverage PolicyId ClaimId Travel Insurance INSURANCE