Vertical Feature Slices Not Layers Derek Comartin codeopinion
- Slides: 60
Vertical Feature Slices Not Layers Derek Comartin @codeopinion. com
Context
Tech Clients & Server
Authorization
Authorization Data Access
Validation Authorization Data Access
Authorization Validation Data Access Business Logic
Too Many Mixed Responsibilities (aka Turd Pile) Authorization Validation Data Access Business Logic
Layer All The Things ASP. NET Auth BLL DAL Database
Layer All The Things ASP. NET Auth BLL DAL Database
Server HTTP Only Clients ASP. NET Clients Database
Scheduled / Reoccurring Non HTTP Requests
Minimize Coupling to a Framework
Common Interface to Invoke Functionality
Layered Technical Concerns Why organize by technical concerns?
Simple Changes Layered DAL/Product. Model. cs DAL/Product. Repository. cs BLL/Product. Manager. cs MVC/Controllers/Product. Controller. cs MVC/Views/Products/View. cshtml
Layered MVC Auth BLL DAL Database
Request-Response Controller Uniform API Database
CQRS Request Controller Auth BLL DAL Database
Mediator Pattern Define an object that encapsulates how a set of objects interact
Mediator Pattern Object A Object B
Mediator Pattern Object A Mediator Object B
Mediat. R https: //github. com/jbogard/Mediat. R
Mediator Pattern Request encapsulates all information required to perform action
Mediat. R ASP. NET Request Mediat. R Request Handler
Mediat. R Request Caller Request Mediat. R Handler
Mediat. R Request
Mediat. R Request Handler Caller Mediat. R Request Handler
Mediat. R Behaviors Request Pipelines Caller Request Mediat. R Pre Process Handler Post Process Handler
Mediat. R Behaviors Request Pipelines ASP. NET Core MVC Request Mediat. R Handler Add to Cart Logger
Mediat. R Notifications Publish + Subscribe Caller Notification Handler Mediat. R Handler
Organize By Layer Controllers/Shopping. Cart. Controller. cs View. Models/Shopping. Cart. View. Model. cs Models/Shopping. Cart. cs Views/Shoping. Cart/Index. cshtml
Organize By Features Shopping. Cart Add. To. Cart. cs Remove. From. Cart. cs View. Cart. cshtml Models Shopping. Cart. cs Album. cs Cart. Item. cs
Organize By Layer ASP. NET MVC Authorization Validation Data Access Model Database
Organize By Feature Model Database Feature
Single Feature Controller Authorization Validation Execution Model Database
Single Feature ASP. NET MVC Authorization Fluent Validation Entity Framework Model Database
Single Feature Nancy Authorization Validation Dapper Model Database
Success! Segregate our code from I/O Mediat. R between integration boundaries Feature Slices not Layers
Trade-Offs & Notes Runtime Exceptions Tests Analyzer DI Container & Registrations Tests
Enabler Async, Task Queues, Pub/Sub Multiple Data Model/Stores Dependencies per Command/Query
That’s it… Thanks! Derek Comartin @codeopinion. com
- Derek comartin
- Derek comartin
- Vertical “cuts” or “slices” through a structure *
- Feature dataset vs feature class
- Isolated feature combined feature effects
- English 9 vocabulary unit 1
- Method of slices
- Market forms of shellfish pictures
- Ordinary method of slices example
- Bishop method of slices
- Numeracy skills framework
- Rondelle cut definition
- An ingredient that can permanently bind unlike ingredients
- A vertical sequence of soil layers
- Sampling techniques in qualitative research
- Which of the following feature is not a keyword in java?
- Vertical shrink
- Kennedy krieger high school
- Derek hoiem
- Derek england
- Derek paiz
- Enzyme poem
- Derek jeter life story
- Fay moston
- Derek karssenberg
- Ma trận ie
- Derek de beurs
- Xiv derek walcott meaning
- Derek bassett
- Derek farnsworth
- Derek donahue
- Magnitude net force formula
- Derek wasnock
- Japan boat takoyaki franchise
- Ift3355
- Derek cheader
- Everyone should bring ___ mother to the picnic.
- Derek grooms
- Derek brewin
- South sound sailing society
- Derek hoiem
- Advanced ops idaho
- Derek jeter diet
- Derek jan fikkers
- Dr. derek jones
- Derek munn
- Qfrost
- Derek harter
- Dr derek lovell psychiatrist
- Derek haas ut austin
- Derek schatz
- Derek hoiem
- Derek bruening
- Dr derek lee
- Derek taylor husch blackwell
- Derek li group
- Derek donegan md
- Derek burgess
- Derek martin nude
- Derek booth hockey
- Whales are sea living mammals