EF + DDD = true?

leathermumpsimusΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 9 μήνες)

89 εμφανίσεις

EF + DDD = true?

by Jimmy Nilsson

About Jimmy Nilsson


Primarily a developer and architect,

but also a trainer and author



Blog: JimmyNilsson.com/blog/


Twitter: twitter.com/JimmyNilsson



Author of ”
Applying Domain
-
Driven
Design and Patterns
” and ”
.NET

Enterprise Design




Co
-
founder and CEO of factor10

Relational database?

O/RM or ”manual”?

EF or NHibernate?

EF 3.5, how to

prepare for 4?

DDD

and

TDD!

?

Relational database?

O/RM or ”manual”?

EF or NHibernate?

EF 3.5, how to

prepare for 4?

DDD

and

TDD!

:
-
)

Why TDD?

TDD isn’t about testing...

...it’s about programming!


To write simpler, clearer and more robust
and maintainable code!

Why DDD?

Accidental complexity is bad


”Programming is understanding”

(Kristen Nygaard)


”DDD == OO done right”


Context is king


Semantics over technology


...

But also with TDD and DDD we
m
ost
often need to persist data

It’s just not the main focus...


Assu
m
e that we might use a relational database


EF?


EF3.5


DB
-
first (generate metadata and classes)


IPoco


EF4


DB
-
first (generate metadata and classes)


Model
-
first (”paint” metadata, generate DB and classes)


Code
-
first

(”generate” metadata in runtime, generate DB)


Disclaimer


Not a review! No production
experience... No analysis...

Our story can begin...

Domain expert: Lotta

Who needs a new app...

TimeReport!

Developer: Jimmy

Time
report


-

Show me the code!”


Recommendation

Frameworks come and go,

good design lasts! So...


Focus on DDD and TDD!

References


[DDD] Eric Evans: Domain
-
Driven
Design


[ADDDP] Jimmy Nilsson: Applying
Domain
-
Driven Design and Patterns