Re: DRY and cross domain logic
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
Hm, maybe calculateAge() is a bad example to discuss cross domain communication. Why? Well, we are talking about a few lines of code needed to implement a function which rather belongs to the area of common sense then to a specific business domain. A static (ugh) function in a shared (ugh) helper class would nicely do the trick. On the other hand we are entering the field of modeling time. Unsurprisingly Greg was the first to add the missing argument. > Its Jan 30. Are you 18 and able to consent on your own. Calculating the age a person by its date of birth and DateTime.Now is a design flaw in most of the situations I can think of. Thomas