Course Description
What is this course about?
This course presents the fundamentals of developing in the Objective-C language. In order to create increasingly powerful and sophisticated software, programmers need to delve into the framework and architecture of Objective-C. Throughout this course, you learn the fundamental programming concepts of Objective-C and the Foundation Framework used to develop code for the Mac OS X and iOS iPhone/iPad platforms.
What is Objective-C?
Objective-C is an extension of ANSI C that enables powerful object-oriented programming. It is the primary development language for all Apple products, including the Mac, iPhone and iPad. This course provides the fundamental principals of programming in Objective-C.
What is Xcode?
Xcode is the standard development environment used in the production of Objective-C applications. In this course, you gain familiarity working with many aspects of Xcode, including the Interface Builder.
What is Cocoa and is it covered in this course?
Cocoa is analogous to the .NET Framework or Java Foundation Classes; it is a library of reusable classes that form the basis of many applications (not only classes such as collections, but also those that deal with graphical user interfaces). The majority of this course deals with the Foundation Framework and the Cocoa framework.
What is the Foundation Framework and is it covered in this course?
The Foundation Framework is the core basis of the most basic classes such as NSString, NSArray, etc. Cocoa is an addition that builds on the Foundation Framework. The majority of this course deals with the Foundation Framework and the Cocoa framework.
What is Cocoa Touch and is it covered in this course?
Cocoa Touch is a variant of Cocoa for iOS on mobile devices. During the course, you spend approximately 1.5 hours using Cocoa Touch to build a simple graphical user interface app for the iPhone/iPad.
I am not interested in developing Mac applications; I only want to develop apps for the iPhone/iPad. Is this course for me?
Yes! It is important to have a good understanding of Objective-C to write applications for the Mac, iPhone or iPad. While there is one chapter in the course specific to writing Mac applications, everything else is applicable to apps for the iPhone/iPad.
Will I program an application in this course?
Yes, you program GUI applications for the Mac in this course. You also learn how to create a simple application for the iPhone/iPad. Throughout this course, you learn how to maximize the framework and architecture of Objective-C to create software for the Mac. You learn the foundational details of the language and how to create simple apps.
How much time is spent on each topic?
Content Hours
Introduction to the Objective-C Language 3.5
Developing Classes in Objective-C 2.0
Reusing Classes Through Aggregation 2.5
Structuring Object-Oriented Class Hierarchies 4.0
Building GUIs 5.5
Interacting with the Operating System 3.0
Packaging Code for Reuse with Libraries and Frameworks 1.5
Times, including the workshops, are estimates; exact times may vary according to the needs of each class.
What are the class workshops?
Throughout this course, you gain experience programming with Objective-C. Exercises include:
- Writing and compiling Objective-C programs using Xcode
- Managing objects with Foundation Framework collection classes
- Extending classes with inheritance
- Enhancing classes with categories when inheritance is inappropriate
- Writing loosely coupled applications with protocols
- Building GUIs apps for the Mac with the Cocoa framework
- Creating a simple app for the iPhone and iPad with the Cocoa Touch framework
I'm attending this course from work using AnyWare - Learning Tree's web-based remote attendance platform. How will that impact what I learn?
You will participate fully in the course and acquire the same knowledge and skills as your classmates who participate in the classroom. You will have the same course materials, be able to easily communicate back and forth and ask questions of your instructors and peers, and you will control an in-classroom workstation dedicated entirely to you. Your instructor will be able to see exactly what you're doing and can interactively offer concrete help.
Agenda
Introduction to the Objective-C Language
Language and tools
- Evolution of Objective-C
- Xcode development environment
Objective-C fundamentals
- Syntax and semantics
- Pointers, structs, functions
- Decisions, loops and logic
Developing Classes in Objective-C
Defining classes
- Declaring the class interface with @interface
- Programming the class using @implementation
- Encapsulating attributes with methods and properties
Creating and using classes
- Importing the interface
- Writing constructors
- Instantiating the classes and invoking methods
Reusing Classes Through Aggregation
Building groups of complex classes
- Defining relationships between classes
- Incorporating the Has-A relationship in class design
Employing Foundation Framework classes
- Simplifying application development with class libraries
- Working with collection classes including NSArray, NSDictionary, NSSet
- Iterating collections with enumerators
Structuring OO Class Hierarchies
Exposing interfaces with protocols
- Defining optional and required contracts
- Designing to an interface rather than an implementation
Inheritance and polymorphism
- Identifying the Is-A relationship
- Defining constructors in subclasses
- Leveraging dynamic binding through polymorphism
Categories and extensions
- Creating categories to extend classes without inheritance
- Redeclaring access rights with extensions
- Hiding private methods
Building GUIs
Exploiting the Cocoa framework
- Designing Mac GUIs using Interface Builder
- Communicating between objects with targets
- Implementing the delegate pattern with @selector
Leveraging Cocoa patterns
- Developing an application with MVC
- Registering bindings to observe changing data
- Responding to mouse and keyboard events
- Enhancing user interfaces with views and controls
Creating apps with Cocoa Touch
- Designing GUIs for the iPhone and iPad
- Choosing appropriate controls for the limited screen space of mobile devices
Interacting with the Operating System
Comparing memory management techniques
- Manual reference counting (MRC)
- Automatic reference counting (ARC)
Accessing the file system
- Storing and retrieving data with NSFileManager
- Obtaining directory and file information
Archiving classes
- Conforming to the NSCodingProtocol
- Working with NSData, NSKeyedArchiver and NSKeyed Unarchiver
Packaging Code for Reuse with Libraries and Frameworks
- Comparing dynamic and static libraries
- Wrapping code for public or private reuse
- Developing shared code
Audience
Who will benefit from this course?
This course is designed for programmers, application developers and anyone interested in writing applications for Apple platforms. Systems architects considering porting to Apple hardware will also benefits. Typical participants include application developers who plan to use Objective-C to build Mac desktop applications and mobile applications developers who want to build mobile apps for the iPhone and iPad.