Subclass does not need to define function signature
Abstract class can be instantiated for no good reason
Minimum compile time check for function existence
No concept of interface enforcement, one needs to manually ensure functions exist to satisfy interface
You do not need to know type of object before sending it a message
Sending message to NIL is allowed, avoid NULL checking
Sending unsupported messages generate only warnings.
No overloading by parameters
Weakly type, strong support for introspection
No template for containers - all containers operate on objects
No static variable for class
No stack objects - everything allocated on the heap - Java like
No double click button - have to roll your own
Often no interface for delegate to derive
nil is a blank object, NULL is a blank pointer
Delegate does not need to implement interface
Cannot force parameter by eliminate default constructor init
No private methods
introspection
isMemberOfClass
isKindOfClass
idobject pointer
SELfunction pointer
@selector()address of function
retain = increase reference count
release = decrease reference count
MDI
NSDocumentController
NSDocument- multiple
NSWindowController- multiple
NSWindow
Key elements of application:
* main routine
int main(int, char *)
This routine instantiates UIApplicationMain which looks into -info.plist to find the nib file to load.
* main nib file
The nib file is loaded, the nib file instantiates File's Owner which is an instance of UIApplication. UIApplication's delegate is set to an application delegate in the nib, the class of which is provided by the code as a derived class. The UIApplicationDelegate derived class dictates much of the startup behaviors.
The UIApplicationDelegate has pointers to main UIWindow and maybe also a view controller. The main window is always a requirement because it is a host for the view.
Memory Management:
Release or autorelease objects created with alloc, new, or copy, or retain
CFRelease objects created with Create or Copy