discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Project Center inspiration sshots


From: Björn Giesler
Subject: Re: Project Center inspiration sshots
Date: Mon, 3 Jan 2005 13:41:34 +0100

Hi,

Am 03.01.2005 um 13:19 schrieb Markus Hitter:
Do you have a link where you have this chart from?

I made it myself, based on the contents of the Smalltalk browser that Stefan posted. I guess I should have made that clearer in my mail. So what is shown is actually a couple of Smalltalk classes and categories, although the displayed method is in ObjC. There are a couple of things sorely lacking in the diagram (typed return values, typed arguments, etc.), which don't exist in Smalltalk. I understand how this would be confusing, but I assumed many people to be familiar with Smalltalk and to have seen the screenshots from Stefan's mail, and anyway it's only a quick mock-up.

The chart shows a UML class diagram with a couple modifications. The dashed rounded rects are class categories. (This is not in UML, IIRC.) One of them (Kernel) is open, the other ones are closed. So "Date & Time" is a class category containing classes for date and time handling. The square boxes are classes with class names, attributes and methods. Methods are grouped under arbitrary names ("copying", "printing"), like the Smalltalk browser does.

- The arrwos from "Class" and "Metaclass" ... looks like you have something like multiple inheritance in mind. This is discouraged in OpenStep/Cocoa.

It's not even possible in ObjC, and neither in Smalltalk :-) But you understand the arrows the wrong way around. In UML, an arrow like that points to the superclass, so Class and Metaclass both inherit from Behaviour.

- "Metaclass" = super class? There is no mention about something "meta" in the whole Cocoa documentation (as of Xcode 1.2).

As I said, this document does not show anything Cocoa-related. It's just an example about how I personally could envision OO development.

- All I know about OOP says, an object is an instance of a class. So, objects don't have methods.

But NSObject has methods. "Object" is just the superclass of everything, which would be "NSObject" in Smalltalk. Indeed I haven't put any class methods in there. Simply forgot them. Put an imaginary "-" in front of all the methods in the "copying" group.

Gruß,
Björn
--
Björn Giesler. UI Fascist, Mac Zealot, Gadget Freak.
Mail: bjoern@giesler.de - Web: http://giesler.de
Key: http://giesler.biz/bjoern/downloads/bg.asc
We must never take these words too seriously. Words are very important, but then if we take them too seriously, we destory everything.

Attachment: PGP.sig
Description: Signierter Teil der Nachricht


reply via email to

[Prev in Thread] Current Thread [Next in Thread]