The fallacy of the always-valid entity

Posted by: Jeffrey Palermo, on 14 May 2009 | View original | Bookmarked: 0 time(s)

I use domain-driven design, and one of the core patterns in DDD is the entity.  I wont go into a description of aggregates or aggregate roots, but the entity is a central pattern when implementing domain-driven design. I often encounter the desire by some developers to create an entity that guards itself against ever becoming invalid Lets consider the following example of a UserProfile class: public class UserProfile{ public string Name { get; set; } public Gender? Gender { get;...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Refactor | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 979 | Hits: 32

Similar Posts

  • Gaia Ajax 3.6 Alpha released: Ajax GridView and Adaptive Rendering ++ more
  • EF4 New Properties for Entity Properties? more
  • Think first, 'doing' is for later more
  • Checking out one of the new stored procedure features in EF4 more
  • Whats New In Silverlight 3 - Validation more
  • When Do I Use Interfaces? more
  • Protecting against XML Entity Expansion attacks more
  • Customizing EDM Code Gen in EF4 more
  • The Technology Post for May 14th more
  • Validation - Part 3 - Server-Side more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD