Those guys started with common practice : draw object diagram. And the diagram seems logical and correct to me. Then they started implementing unit tests. They wrote tests one by one, but objects that they drew didn't appear in code. The final solution greatly differs from object diagram and contains only two classes. Despite this it looks simple and each class contains single responsibility.
The conclusion is not that object diagram are useless. But all diagrams should be proved by code, and you should not follow them strictly.
I really recommend this artcile for reading. It's a clean example of TDD, and dialogs are rather funny:-)
Комментариев нет:
Отправить комментарий