On 2008-10-15, at 21:59, Craig D. wrote:
Since class A is coupled to class B, the specs for A are also
coupled to class B through class A. Thus, I wouldn’t worry about the
coupling. Why does a method of class A directly access a constant of
class B? Does the constant belong in class A? Does the method belong
in class B? If you can and want to be more specific with your code
and specs, I’m sure that we can all write some specs together.
Hi Craig. Here’re some code snippets:
- Create a [Google] map marker that represents a property instance.
- Add the marker to the map.
To perform #2, RentalMap::MAP_NAME must be accessed somehow, be it
directly, or through a method as Scott suggested.
RentalMap::MAP_NAME should definitely be part of the RentalMap model.
It should not be part of the Property model.
because it acts upon (IE: uses several attributes of) a Property