Re: UML and Cocoa (again...)
Re: UML and Cocoa (again...)
- Subject: Re: UML and Cocoa (again...)
- From: Jeff LaMarche <email@hidden>
- Date: Tue, 1 Oct 2002 14:56:54 -0700 (PDT)
On Tuesday, Oct 01, 2002, at 02:05PM, Mikael Arctaedius <email@hidden> wrote:
>
I've browsed the archives and found that there have been
>
some discussions on visualizing Cocoa in UML. But I did
>
not find any information on how categories are represented
>
in UML?
>
>
I guess interfaces would map to a UML class and formal
>
protocols map to UML interface. But what about categories?
Well, since Categories are not a part of the languages used by the vast majority of programmers, I don't know that there's an "official" answer to this. The first thing that jumped to my mind would be to use something like a class object labeled with a "category" protocol. I'm not sure if the object should be a box with two or three sections. Three would be safer, and just leave the objects area blank.. something like (forgive the crude ascii art):
----------------------------
| <<category>> |
| JDLMyCategoryName |
|----------------------------|
| |
|----------------------------|
| +myMethodOne |
| +myMethodTwo |
|____________________________|
I think the more difficult question is how do you represent class v. instance methods, since the plus and minus symbols have a different meaning in Cocoa (public v. private). If everyone using the diagram is a Cocoa programmer, go ahead and use the plus and minus symbols for their correct (i.e. Cocoa usage), but if you have Java and C++ programmers that need to read it and make sense of it, you'll confuse the hell out of them if you use plus and minus that way. =)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.