-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example contradicts with previous chapters #87
Comments
Hi, I'll look again at the example. Using toy examples has a disadvantage that they are stripped of the entire context in which they might make sense. As I understand, the question is: is this the right level of abstraction? As always, it depends. Here, it depends on the domain and what meaning do words such as "special forces" and "task forces" have. Is "special force" something generic or not - this mostly depends on the domain. As for the second example (again, it's a toy example):
This is an example of aggregating variable pattern. I couldn't find it on the network, but I saw it named like this somewhere. The point is that whenever you need to aggregate something from several objects into a list, you can pass a single object (in simplest form - a collection) to all of those instances and each instance is free to add whatever it needs to the object. An instance can either add one name, or not add anything, or add several names. As for the comparison between |
This snippet from 230_Designing_for_composabiity_protocols.md kind of contradicts with the rules you have described before.
If I have understood previous chapters correctly, you should use something more general here, like
taskForce.NotifyWith(Priority.High)
and make pass the instance ofSpecialForces
class that implementstaskForce
interface.EDIT: I will put the second issue from the same chapter here to avoid creating multiple issues.
This might not be an issue or I don't understand it correctly, but this solution just surprised me.
In other place, and different example, when speaking of 'ProductName', you said that methods like
ToStringForScreen()
andToStringForReport()
make theProductName
know too much about how it is used.Doesn't
AddPrimaryUserNameTo
make theRadio
object know how it is used?The text was updated successfully, but these errors were encountered: