Tim McCarthy Tim McCarthy McCarthy Information Systems - - PowerPoint PPT Presentation

tim mccarthy tim mccarthy mccarthy information systems
SMART_READER_LITE
LIVE PREVIEW

Tim McCarthy Tim McCarthy McCarthy Information Systems - - PowerPoint PPT Presentation

Tim McCarthy Tim McCarthy McCarthy Information Systems tmccart1@san.rr.com Agenda Pros/Cons of application frameworks Refactoring to DDD patterns getting rid of the persistence/plumbing code from the Domain Model My own DDD


slide-1
SLIDE 1

Tim McCarthy Tim McCarthy McCarthy Information Systems tmccart1@san.rr.com

slide-2
SLIDE 2

Agenda

Pros/Cons of application frameworks Refactoring to DDD patterns – getting rid of the

persistence/plumbing code from the Domain Model

My own DDD rules for dealing with Repositories and My own DDD rules for dealing with Repositories and

Unit of Work

Show lots of code!!!

slide-3
SLIDE 3

Pros & Cons of Frameworks

Pros

You can get a lot for free Can save you a lot of time Usually pretty well tested Usually pretty well tested

Cons

Can allow developers to easily fall into traps Sometimes mixes up the logic with the plumbing Can be very difficult to maintain and reuse logic

slide-4
SLIDE 4

Taking a look at building ASP.NET web applications with wizards / Introducing a SharePoint-based application for sending legal notices

slide-5
SLIDE 5

Refactoring to DDD Patterns

Writing good tests to validate the requirements Building a Domain Model Refactoring infrastructure/plumbing code out of the

Domain Model Domain Model

slide-6
SLIDE 6

Looking at the progress of the legal notice application code over the versions…

slide-7
SLIDE 7

My Rules for Repositories

All Repositories must implement some type of

Repository interface, i.e. ICustodianRepository

All Repositories are created via a Factory which uses

Configuration and Reflection Configuration and Reflection

Domain Model classes can use Repositories, but they

can only be coupled to their interface, NOT their implementation!

slide-8
SLIDE 8

Unit of Work and Repositories

The Unit of Work does not actually talk to the data

source!

Repositories and Unit Of Work instances talk via

interfaces and double-dispatch interfaces and double-dispatch

Repositories can work with or without a Unit of Work,

and vice-versa

slide-9
SLIDE 9

Looking at how the code of the legal notice application is now

  • rganized using DDD principles
slide-10
SLIDE 10

Resources

[Evans]: Domain-Driven Design: Tackling Complexity

in the Heart of Software, Evans, Addison-Wesley (2003)

[Fowler]: Patterns of Enterprise Application [Fowler]: Patterns of Enterprise Application

Architecture, Fowler, Addison-Wesley (2003)

[Nilsson]: Applying Domain Driven Design and

Patterns: using .NET, Addison Wesley 2006

slide-11
SLIDE 11

Contact Info

Code: www.codeplex.com/ncipna My Email: tmccart1@san.rr.com