Cocoa with ObjectiveC - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Cocoa with ObjectiveC

Description:

Apple Computer acquires NeXT on December 20, 1996, and bases their new OS and ... iPhone and iPod Touch. Bibliography. Kochan, Stephen. Programming in Objective-C. ... – PowerPoint PPT presentation

Number of Views:1240
Avg rating:3.0/5.0
Slides: 17
Provided by: letu
Category:
Tags: objectivec | cocoa | ipod | touch

less

Transcript and Presenter's Notes

Title: Cocoa with ObjectiveC


1
Cocoa with Objective-C
  • Peter Kendall
  • COSC 4153-1
  • Spring 2008
  • Assignment 11

2
Overview
  • Brief History
  • Methodologies
  • Syntax and Grammar
  • Example Source Code
  • Use of the Language in Industry
  • What is not Cocoa?
  • Advantages and Disadvantages
  • Likes and Dislikes
  • Example - Man Viewer
  • Conclusion

3
Brief History
  • Designed by Brad J. Cox.
  • NeXT Software licensed ObjC in 1988 and
    incorporated into NeXTSTEP.
  • Open sourced in 1994.
  • Apple Computer acquires NeXT on December 20,
    1996, and bases their new OS and application
    development on NeXTSTEP.

4
Methodologies
  • Based on SmallTalk-80.
  • Layered on top of C.
  • Foundation and Application Kit frameworks.
  • Objects are put onto the heap.
  • Manual memory management.
  • Reference counting.

5
Methodologies
  • Dynamic typing and binding and everything in
    between.
  • All objects are of type id.
  • isa method.
  • Messages (methods) and the objects are united at
    runtime.
  • Load and linking.
  • Very nice for debugging.

6
Objective-C 2.0
  • Garbage Collection.
  • Properties
  • Automatic setters and getters.
  • Dot notation.
  • Fast Enumeration.

7
Syntax and Grammar
  • Types
  • id - An object (a pointer to its data structure).
  • Class - A class object (a pointer to the class
    data structure).
  • SEL - A selector, a compiler-assigned code that
    identifies a method name.
  • IMP - A pointer to a method implementation that
    returns an id.
  • BOOL - A Boolean value, either YES or NO.

8
Syntax and Grammar
  • instance-method-definition
  • method-type method-selector
    declaration-list compound-statement
  • category-interface
  • _at_interface class-name ( category-name )
  • protocol-reference-list
  • interface-declaration-list
  • _at_end
  • category-implementation
  • _at_implementation class-name ( category-name )
  • implementation-definition-list
  • _at_end

9
Example Source Code
Demo...
10
Use of the Language in Industry
11
What is not Cocoa?
12
Advantages and Disadvantages
  • Advantages
  • Dynamic
  • Develop professional applications in less time.
  • Disadvantages
  • Dynamic
  • Easier to do some wacky things.

13
Likes and Dislikes
  • Likes
  • Relatively easy to develop elegant applications.
  • Dislikes
  • Crazy amounts of brackets.

14
Example - Man Viewer
Demo...
15
Conclusion
  • Name of the game Dynamic.
  • Most Mac OS X applications are being made with
    Cocoa with Objective-C.
  • Fully plan to create more applications.
  • Continue to make improved versions of Man Viewer,
    and UT3 Mod Installer.
  • Many more ideas in the brain.
  • iPhone and iPod Touch.

16
Bibliography
  • Kochan, Stephen. Programming in Objective-C.
  • Hillegass, Aaron. Cocoa Programming for Mac OS
    X.
  • Cocoa Fundamentals Guide. http//developer.apple.
    com/documentation/Cocoa/Conceptual/CocoaFundamenta
    ls/index.html
  • The Objective-C 2.0 Programming Language.
    http//developer.apple.com/documentation/Cocoa/Con
    ceptual/ObjectiveC/ObjC.pdf
Write a Comment
User Comments (0)
About PowerShow.com