views:

290

answers:

2

I was wondering if any analysts/architects have a solution for the hundreds of CRUD operations I would have to add to nearly every class in my UML diagram.

Do you let each class inherit from a base class that implements the CRUD operations?

Best practices and design patterns about this are very much appreciated!

+1  A: 

It is very simple. Don't add them to your diagrams. What value would they add? The value of UML diagrams should be in explaining complex situations. Important is to decide how much you can eliminate, not how much you can add.

Stephan Eggermont
Yeah you are right. I'm still thinking too strict as I've learned in school. There is no added value in the end... I just added a comment that each object will have crud and that'll be the end of it! Thanks!!
Peter
+2  A: 

I'd use a stereotype to mark the classes and, if and only if you are going to do code generation, I'd make them extend a base class at the "detailed conception" phase (just before the implementation). But if you're not going to generate code (i.e. if you're not doing MDA and I hope for you you are not), I wouldn't even bother adding the inheritance relation. As Stephan mentioned, the real question is: what are you going to do with this information? What value does it add?

Pascal Thivent