Pregunta

I've recently come across CRC cards and sequence diagrams at my university. Martin fowler has said that sequence diagrams are interchangeable with CRC cards when you're in the design phase of your development. I had a university project which was rather small where we just went from use case descriptions to sequence diagrams and it worked fine because the project was small. I've started my own project that has a lot more features (just because i want to make a feature rich application) but it seems a like with this rather big application it's going to be messy to go straight from use case descriptions directly to sequence diagrams without loosing the overview.

Do you write CRC cards based on each scenario or based on the whole project? Fx. say one team/person is working on CRC cards for one feature. This person would then write all classes needed to make the application work?

And should you do CRC cards, sequence diagrams and then class diagrams on larger project?

Hope the question(s) make sense for you :)

¿Fue útil?

Solución

You said:

Martin fowler has said that sequence diagrams are interchangeable with CRC cards when you're in the design phase of your development.

Which Wikipedia seems to support with:

Martin Fowler has described CRC cards as a viable alternative to UML sequence diagram to design the dynamics of object interaction and collaboration.

Class Responsibility Collaboration card

Which is supported with a reference to Martin Fowler, UML Distilled, chapter 4

In which Fowler doesn't say they're interchangeable at all. What Fowler says is this:

When to Use Sequence Diagrams

You should use sequence diagrams when you want to look at the behavior of several objects within a single use case. Sequence diagrams are good at showing collaborations among the objects; they are not so good at precise definition of the behavior.

If you want to look at the behavior of a single object across many use cases, use a state diagram (see Chapter 10). If you want to look at behavior across many use cases or many threads, consider an activity diagram (see Chapter 11).

If you want to explore multiple alternative interactions quickly, you may be better off with CRC cards, as that avoids a lot of drawing and erasing. It's often handy to have a CRC card session to explore design alternatives and then use sequence diagrams to capture any interactions that you want to refer to later.

Other useful forms of interaction diagrams are communication diagrams, for showing connections; and timing diagrams, for showing timing constraints.

Martin Fowler, UML Distilled, Third Edition, chapter 4 page 54

Which happens to beautifully answer the question you put in your title.

Now I can't prove Fowler hasn't said what you're saying he said but he didn't say it here. Here he very much disagrees with that idea. He isn't saying that Sequence and CRC are interchangeable. He's saying here's when you use one and here's when you use the other (and also this state diagram thingy, oh and...). This shows them to be about as interchangeable as a hammer and a wrench. I mean, you can try, but you're gonna ding up your wrench.

Licenciado bajo: CC-BY-SA con atribución
scroll top