Skip to content
0:00 / 0:00

#ddd#refactoring#verticalslicearchitecture

Domain-Driven Refactoring - Jimmy Bogard - NDC Oslo 2020

NDC Conferences

230K subscribers • 110 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Jimmy Bogard, creator of MediatR

Intermediate. Assumes working knowledge.

57K views6 years ago2 recommendations

Software designDomain-driven designRefactoring and legacy codeDesign patterns

Jimmy Bogard explains how to refactor legacy, procedural code into a cohesive domain-driven design using standard patterns.

Don't forget to check out our links below! ndcoslo.com/ ndcconferences.com/ Books, workshops, storming and more, all build up an idealized domain model. All describe great techniques for domain-driven greenfield applications. But what about the code we have? How can we take what's already built, and move it towards a better, more cohesive design? In this session, we'll look at anemic, procedural, boring code and examine code smells that can point us in the right direction. We'll also look at standard design patterns for more complex behaviors and models, and how to recognize when (and when not) to apply them. Finally, we'll cover how to safely apply refactoring techniques to achieve our domain-driven model nirvana.

Why it's here

2 people recommend this

What people say. Recommended as an excellent practical guide on refactoring legacy codebases toward domain-driven design and vertical slice architecture.

u/pdevito3in r/dotnet • Recommends

On “Know a well-written Web Project that serves as a good reference?”

Eshop and some others here are good, but I’d recommend DDD and vertical slice architecture based solutions. - this will scaffold out boilerplate for you. Adding updates for .NET 6 and a bunch of other stuff in a release next week. - this is a pretty complex app as a good example - this is a ddd project by one of the main contributors to eshop Here’s a good talk I’d recommend on vertical slice architecture And this one on domain based refactoring

u/pdevito3in r/dotnet • Recommends

On “For web devs who prefer using a Vertical Slice Architecture, you can spin up a VSA web api in minutes using the new Wrapt release”

This is the video that initially piqued my interest and this refactoring example was really good as well

u/In8-codein r/dotnet • Recommends

On “Clean Architecture Example & Breakdown - Do I use it?”

Great video! Did clean for a while and when I found out about VSA I’ve never looked back. So much more maintainable and easy to work with! Would love to see a video on building out the domain logic to your entities as I don’t see much of that. This instructor example and jimmy bogards refactoring video are probably the only resources I’ve seen so far.

u/pdevito3in r/dotnet • Recommends

On “ASP Net Core Web API + React (Book Exchange Application)”

Cool! Thanks for posting. Always fun to see other projects, especially the elastic search part. Really well done, especially for an intern! A couple pieces of feedback if you’re looking for it: - love the CQRS, but I’d recommend pushing logic from your commands/queries into your domain wherever possible. this is a great video on refactoring to your domain. Also this video on vertical slice architecture will probably give you some good ideas. - Check out React Query for server state on the react side. Will simplify a lot of what you’re doing and add a lot to your feature set. Regardless, thanks again and well done 👏🏼

u/pdevito3in r/dotnet • Recommends

On “# Choosing Between using Clean/Onion or Vertical Slice Architecture for Enterprise Apps in .NET”

> feels wrong not to properly separate things like UI from the logic behind I don’t think this is what VSA is encouraging. All the business logic is still on the backend in each feature (and hopefully abstracted out into the domain when able. See this video for a good demo of this). If you have a server app, you can tie UI to a feature but that isn’t always the case and isn’t even always possible, especially when you have a SPA and can’t do it (maybe with something like ineritiajs, but that’s not common in .NET).

u/pdevito3in r/dotnet • Recommends

On “For web devs who prefer using a Vertical Slice Architecture, you can spin up a VSA web api in minutes using the new Wrapt release”

> zero code re-use, and... not writing any shared classes or functions? > Literally this architecture implies that you should re-write the whole service top to bottom for every feature. I say get rid of functions entirely, every function is a dependency! 😂 This isn’t true at all. The point is that it doesn’t *force* layering and code reuse prematurely. A **key** aspect of VSA is refactoring as you build and moving logic into your domain layer. Jimmy Bogard has a good talk on it here and a good refactoring example here