Search code examples
uml

CRC (Class responsibility collaborator) and UML


CRC helps to convert use cases into a set of classes and find their responsibilities and collaborators. Can we say CRC as an informal approach to UML modeling and it basically analyzes the system rather than focusing on design like UML does? I couldn't be sure after looking at different resources.


Solution

  • "Can we say CRC as an informal approach to UML modeling?"

    • NO. Martin Fowler has described CRC cards as a viable alternative to UML sequence diagram to design the dynamics of object interaction and collaboration. It is not less abstract than UML use cases for example. It is simply different.

    UML tries to divide structural and behavioral modelling from each other. CRC, on the contrary, considers class structure and its behaviour together. But of course, you can model using UML use cases/components diagrams, go to CRC and go on to UML class and sequence diagrams. Such translations will surely filter much of your misunderstandings and errors.

    "it basically analyzes the system rather than focusing on design like UML does?"

    • Sorry, also no. The main target of both tools is not the analysis (in sense "we are analyzing the system"). They are both done for modelling (also often named IT analysis). They help us to think, to imagine the system, to plan it, to check our thoughts about it.

    Also, you can't compare CRC and UML because they belong to different levels. It is the same as compare an elephant from one side and a beaver's leg from the other. CRC is a method that is much more simple than any one of the UML diagrams. And far less formal than any of them, too.

    UML has very strong tool on the Class diagram level and a good one on the Components diagram level, with no tools to move from the second to the first. And CRC can be very useful for closing that gap. And for supporting of sequence diagrams, too.

    So, if OMG (keepers of UML) would be more eager for looking for new tools, they could include CRC as one more UML method in future. But we can use it not waiting for the formal recognition.