Search code examples
.netrefactoringcode-reusedto

Best approach to separate and re-factor a large number of dependent classes


I have a v-large number of hierarchical structures (or DTO's) that are shared across different business logic, application tiers, web service and WCF contracts. I want to refactor all of my code to split the structures into discreet business domain areas.

Two questions:

  1. Are there any tools that can help me do this (given that I want class A, list all of the dependencies)?

  2. Is there a case for duplicating DTO's in different application domains to allow them to evolve independently? The idea of a fixed Canonical Business Model is pure fiction!


Solution

  • Regarding number 2: sure, bounded context: http://dddcommunity.org/discussion/messageboardarchive/BoundedContext.html check this post to understand it better: http://devlicio.us/blogs/casey/archive/2009/02/11/ddd-bounded-contexts.aspx

    For number 1 Resharper :)