Tag Archives: DDD

My TechEd Europe Schedule

 

TEEU_2014_I’m speaking_1I’m so very excited to be heading to Barcelona shortly for TechEd Europe. You may or may not be aware of my dashed hopes last year when I was scheduled to speak at TechEd Europe in Madrid. But when I found myself stuck in the Chicago O’Hare airport on my 2nd day of travel, only to be told I wouldn’t get to Madrid until Thursday afternoon (after 4 days of travel) it was time to turn around and go home. I also had scheduled a post event side trip to Barcelona – this too, I canceled.

I was a little surprised that TechEd was willing to try again considering my bad history but I will be speaking at the 2014 version of the event.

Not only am I looking forward to my first ever trip to Spain and the amazing city of Barcelona, but it will be my first opportunity to meet so many developers that I’ve never met before.

My Session

My talk is on Friday, Oct 31 at 12-1:15pm. Yes, on Halloween!

Entity Framework Model Partitioning in Domain-Driven Design Bounded Contexts
Bounded Context is one of the most critical patterns in Domain-Driven Design (DDD). While you shouldn’t have to worry about your data persistence while you are modeling your domain, it is still worrisome to follow DDD patterns not knowing how you’ll get your ORM to fall in line when it’s time to implement the data layer. Entity Framework sample solutions have a long history of creating one huge model to map to one huge database to satisfy all of the needs of your application. In this session we look at patterns using Entity Framework that will support not only multiple bounded contexts in your software but even those areas that are satisfied with pure CRUD logic. You also see patterns to bridge the divides between those bounded contexts when implementing the data persistence with Entity Framework.

Getting the Most Out of My Session

Dino Esposito will be doing a relevant talk on Tuesday that will be useful if you are new to Domain-Driven Design.

DEV-B211 Architecting and Implementing Domain-Driven Design Patterns with Microsoft .NET  Tuesday, October 28 1:30 PM – 2:45 PM Room: Hall 8.1 Room G

I’d also recommend watching the Domain-Driven Design Fundamentals course that Steve Smith and I created for Pluralsight. It’s about 4 hours long and is a great first look as well as a refresher on some of the key concepts of DDD. You’ll definitely get a lot more out of my talk if you’ve seen this in advance. If you don’t have a subscription to Pluralsight, send me a note and I can get you a 30 day trial code.

Where to Find Me

Here is my current schedule. This does not list talks I plan to attend, but the opportunities I will have to meet people and geek out! Smile

image

So much bling, I just can’t choose!

TEEU_2014_I’m speaking_4TEEU_2014_I’m speaking_1TEEU_2014_I’m speaking_3

DDD Fundamentals Course is Making a Difference

Steve Smith and I are so happy to be getting this kind of feedback about our Domain-Driven Fundamentals course on Pluralsight. We wanted to give developers help understanding the basics so that they can dig in to more indepth resources like Eric Evans’ or Vaughn Vernon’s books.

Here are some recent tweets we’ve seen.


Ryan Moseley @bahamaboy85

Completed the DDD Fundamentals course from @pluralsight by @ardalis @julielerman http://pluralsight.com/courses/domain-driven-design-fundamentals …. This course makes DDD accessible.

It is tough to find DDD examples that don’t assume some level of knowledge. So this course is welcomed.


Tom Davis @photomoose · Sep 9

@julielerman Just watched your DDD course on @pluralsight. Probably the best intro to DDD I’ve seen; things make sense now!


Paul Hale @paulhale · Aug 29

@pluralsight @ardalis @julielerman cracking #DDD course + @ericevans0 book set me on right track. Ironically Im building a domain reg system


Félix-A. Bourbonnais @fbourbonnais · Aug 11

Good #DDDDesign course by @julielerman @ardalis. Key concepts of DDD are well explained. I recommend http://owl.li/AcX4q


Geoff Mazeroff @geoffmazeroff · Jul 30

My work project uses DDD, so I enjoyed hearing @ardalis and @julielerman present the fundamentals on their @Pluralsight course. Nice work!


Mike Sussman @mikesussman · Jul 25

Finished @pluralsight DDD Fundamentals course by @julielerman and @ardalis, makes a lot more sense now.

Domain-Driven Design Fundamentals Course on Pluralsight

Steve Smith and I are excited to finally have our Domain-Driven Design Fundamentals course available on Pluralsight (http://juliel.me/PS-DDD ) . It was a long haul creating the course but we wanted it to be just right. And coordinating our schedules became tricky since we really wanted to collaborate completely on this, not just divide up the work and sew it together.

We were also grateful to have Eric Evan’s, the “father” of DDD, participate in the course by letting us interview him and use the resulting video clips where he provides thoughtful and insightful advice throughout the course.

The course has now been out for a few weeks and the reception has been great. Good ratings, great feedback in the discussions and on twitter are making us quite proud of our hard work. And it’s has been in Pluralsight’s Top 10 list (based on past 10 days viewing) in the entire library of some [I believe] 1500 courses since a few days after it was released.

If you don’t have a subscription (but really, they are only $29/month), there is a 10 day free trial on the website and I also have 30 day free trial cards I can share. Let us know what you think!

image

Some DDD+EF Resources

Could not fit this into a tweet in response to a request.

Here are some resources for how EF can be a partner to a Domain Driven Design world:

Update June 2015:

Microsoft Ignite, Chicago May 2015
Domain-Driven Design for the Database Driven Mind (90 minute presentation video on Channel 9)

Update: October 2014:

MSDN Mag Oct 2014 Issue:
Data Points: A Pattern for Sharing Data Across Domain-Driven Design Bounded Contexts
Julie Lerman explores a way to mirror data as one scenario for sharing data across DDD bounded contexts.

MSDN Mag Dec 2014 Issue:
Data Points: A Pattern for Sharing Data Across Domain-Driven Design Bounded Contexts : Part 2
(will provide link when available)

Video: Oredev, Fall 2013 (by me)
ENTITY FRAMEWORK IN CORE-BUSINESS APPLICATIONS THAT LEVERAGE DDD

Video: TechEd North America, May 2014 (Vaughn Vernon)
How You Can Implement Aggregates and Domain Entities Effectively in Domain Models, with .NET

Article Series:
MSDN Magazine Data Points Column (by me) Aug, Sept & Oct 2013
Coding for Domain-Driven Design: Tips for Data-Focused Devs, Part 1
Coding for Domain-Driven Design: Tips for Data-Focused Devs, Part 2
Coding for Domain-Driven Design: Tips for Data-Focused Devs, Part 3

Domain modeling with Entity Framework Scorecard (Jimmy Bogard)

Bonus for NHibernate Converts:
And for those who are looking for this by way of moving from DDD + NH, Jimmy Bogard did a great post (with pointers to related posts) on Migrating from NHibernate to EF.

DDD Fundamentals, SOON SOON

imageSteve Smith and I have been working for quite a while on a Domain-Driven Design Fundamentals course for Pluralsight. Our schedules and some interesting, unexpected but quite welcome, learning curves and most importantly, our “go big or go home” desire to refine, clarify and polish everything made this take longer to finish than either of us imagined.

In addition, the demo app that we show and evolve throughout the course – much of which is Steve’s genius – is totally kick-ass!

We are grateful that Eric Evans participated in this by chatting with us on Skype and capturing video to include throughout the course. We also are thankful for some guidance from another DDD guru, Vaughn Vernon.

The course is about 4.5 hours long, broken up into 7 modules.

The course has been done, reviewed, edited and absolutely final…ready to be published but unfortunately, so are many other new courses on Pluralsight. So the DDD Fundamentals is in the queue to get published soon.

Believe me, Steve & I will be tweeting up a storm when this thing finally goes live so watch our blogs or twitter (I’m twitter.com/julielerman, he’s twitter.com/ardalis).

First look at (beta of) EF 6.1 Designer

EF6.1 is closing in on release. Along with the new DLLs that you can get via Nuget, there is a new designer that you can install into Visual Studio 2012 or 2013 via an MSI install.

Before installing, I uninstalled the EF Power Tools, because I wasn’t sure if they were included. Post install of the 6.1 Beta EF Designer, there was no indication of the power tool features in my context menu where it would normally be.

image

So it looks like this iteration of the designer won’t have the power tool features wrapped in except for the BIG one, the replacement of the reverse engineer into code first.  (So don’t uninstall those power tools! You can still use the other features like this one: my favorite).

With the new designer, when you create a new model, you now get 4 options. Two are familiar, EF Model from Database and Empty Model. The new ones are Empty Code First Model and Code First from database.

image

I chose Code First from database and pointed to AdventureWorks2012 and selected everything in the Human Resources schema.

image

This resulted in all of my new classes being created in my project, not in a folder.

image

Also, it added references to EF.

But the classes felt a little messy. So for my next model, I began with a new project folder. (note that I am only experimenting. I do not recommend having two models in the same project.)

image

Then I added the new entity model to th efolder, not the outer project. This time I selected the Person schema.

image

and all the new classes landed in my new folder

image

I prefer that. In a real app I would then separate the domain classes into their own projects and I would also put each of the models in its own project.

Let’s take a look at the domain classes that this generated.

Notice that tehre are data annotations. This is different than the EF Power Tools which put everything in fluent API code.

image

But those are annotations that are reasonable in a class since they are not solely defining a database mapping strategy.. required and stringlength can also be used by EF’s and .NET’s validation APIs. For the latter , think MVC validation.

But that’s not how this tool decides to use data annotations. Check the BusinessEntityAddress type.

image

It has annotations that drive the composite key creation and also that note database generated mappings. I wouldn’t normally put those in my domain types.

The rule that is being used by default is: any mappings that can be described with a data annotation are done that way. Everything else is done with a fluent api. None of my tables triggered any fluent api mappings. There is some discussion (started by guess who? Smile) on codeplex about making it easier to force the designer to use all fluent mappings if you want.

I was curious what Empty Code First Model gives us. It sets up a shell DbContext class. Makes sense to me.

image

I have been asking for the ability to select individual tables/views for reverse engineering an existing database into Code First context ad classes since the first public CTP of the EF Power Tools. (Here’s proof!) So even with a few things I’d like to see done differently, I am thrilled with this new designer feature.

Why?

For people building new apps with legacy databases, it is a great first step towards setting up DbContexts that  you can align with Domain Driven Design Bounded Contexts.  It gives me a nice stake in the ground to thinking within boundaries and also forcing me to think about when a customer in one context should be designed differently than a customer type in another context because they are used differently.

Any-hoo…there’s a quick first look for you. There’s still time to provide feedback to the team on the codeplex site. Go to this workitem: https://entityframework.codeplex.com/workitem/407

Also, as Erik reminds me in the comments, there is a  Visual Studio extension that provides some more extensive reverse engineer features into code first dbcontext and classes. You can find the docs, a video and the download here:  EntityFramework Reverse POCO Generator