DogFoodCon Session on DDD with ASP.NET MVC

Date Published: 30 September 2014

DogFoodCon Session on DDD with ASP.NET MVC

Yesterday I presented atDogFoodCon, giving a slightly modified version of a talk I gave a week earlier atFalafelCONin San Francisco. The session provides those with little knowledge of Domain-Driven Design with a rapid overview of some key concepts and patterns used in DDD, and wraps up with a brief demo of a simple Guestbook application that begins as a monolithic everything-in-the-controller MVC application but is improved using some DDD-based techniques. The slides are available on Slideshare and embedded here:

Add Some DDD to Your ASP.NET MVC, OK? from Steven Smith

Both times I gave the talk, I ran out of time to show everything I wanted in the demo (sorry, it’s a big topic). One key area that I mention that you may want to follow up on is how to break the dependency between the UI/Web project and the Infrastructure project so that at compile time there are no direct references to implementation details in the UI layer. I recently covered how to use types from an assembly without referencing it in another article.

Of course, if you want to learn more about DDD at a much more reasonable pace than in this 60-minute overview, I recommend checking out the Domain-Driven Design Fundamentals course that Julie Lerman and I published with Pluralsight.

Finally, if you’d like to check out the source for the Guestbook sample I showed, it’s available on my Bitbucket account. The latest version wires up domain events to SignalR to show toast notifications whenever certain events occur in the domain. It’s still just proof-of-concept and would work better if the main button used an AJAX call rather than posting the full browser page, but it demonstrates the idea. There’s a better, more real-world demonstration of this same technique in the demo we build in the DDD Fundamentals course.

Steve Smith

About Ardalis

Software Engineer

Steve is an experienced software architect and trainer, focusing currently on ASP.NET Core and Domain-Driven Design.

Ardalis

Copyright © 2020