19 Aug 16:43
Maps in Public Interfaces Considered Harmful
From: Ted Epstein <Ted.Epstein <at> MorganStanley.com>
Subject: Maps in Public Interfaces Considered Harmful
Newsgroups: gmane.comp.programming.domain-driven-design
Date: 2008-08-19 14:46:44 GMT
Subject: Maps in Public Interfaces Considered Harmful
Newsgroups: gmane.comp.programming.domain-driven-design
Date: 2008-08-19 14:46:44 GMT
Hi, I'm new to this group, and don't mean to start a flame war with this somewhat provocative subject line. But I've been working on a complex domain model that will be available as part of a runtime framework. Some of the developers working on this have prototyped public interfaces that return maps, or dictionaries. I've instinctively avoided using maps in public APIs, and have recently had to examine my reasons for this more closely, for discussion within the team. In thinking through this, I'm increasingly of the opinion that maps shouldn't be regarded as first-class modeling abstractions, and in most cases shouldn't be exposed through public APIs. Before I get to the reasons for this, I'm looking for some pointers from the DDD community to past discussions, blog entries, references, etc. I did a cursory search of this mail group and a a few google searches, but didn't come up with much. Is this something that has been discussed or addressed in DDD, modeling or API design literature? Any background information would be much appreciated. Thanks and Best Regards, - Ted Epstein ------------------------------------
RSS Feed