05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

428<br />

CHAPTER 24 MAC <strong>OS</strong> X DEVELOPMENT: THE APPLICATION FRAMEWORKS<br />

Unfortunately, like much that is old, QuickTime had long been a holdout against the paradigm<br />

shift offered by Cocoa. This isn’t a technical problem, as Cocoa programmers are able to<br />

access other frameworks, just as non-Cocoa programmers are able to access Cocoa.<br />

However, having to leave the comfort of Cocoa for the dark recesses of old-fashioned procedural<br />

API is so much trouble, even for otherwise brilliant resources like QuickTime. Tiger<br />

finally corrected this with a brand new Cocoa interface to QuickTime, known by the euphonious<br />

nickname QTKit.<br />

Here are some of the features of QTKit:<br />

• Access to raw media data from local, remote, and streaming sources<br />

• Object-oriented representations of media, tracks, and time ranges<br />

• View subclass for displaying and controlling media<br />

• Interface Builder object, which makes adding a full-featured media player to your<br />

applications a zero-code drag-and-drop operation<br />

In addition, <strong>Leopard</strong> introduces QTCapture, which adds similar functionality to recording<br />

media. This includes the ability to control recording devices, such as the iSight camera now built<br />

into most <strong>Mac</strong>s. For anyone interested in tapping the power of the iSight, I can attest firsthand:<br />

QTCapture will save you thousands of lines of code.<br />

NOTE For more information on QuickTime, check out Chapter 14.<br />

Integration<br />

Much of what makes the <strong>Mac</strong> such a compelling experience can be summed up in one word:<br />

iLife. This suite of full-featured applications, included free with every new <strong>Mac</strong> (and the subject<br />

of Chapter 16) is not simply the sum of its parts. Rather, it’s the integration between those parts.<br />

Make some music in GarageBand. Use it as a soundtrack in iMovie. Burn your movie to disc<br />

with iDVD. Then, tell the world with iWeb. This kind of integration, which is a concept from the<br />

very core of UNIX, extends throughout the operating system.<br />

Your own applications can and should take advantage of this. Not only does this provide an<br />

excellent “<strong>Mac</strong>-like” experience to your customers, it saves you the time and trouble of implementing<br />

features that are already served quite well by existing applications.<br />

In order to help you leverage these applications, Apple provides a great number frameworks,<br />

including several new to <strong>Leopard</strong>. Here is a quick tour of some of the most useful.<br />

Address Book<br />

As strange as it might seem to those of us who spend all our time with machines, many of our<br />

users maintain a network of an entirely different sort: friends, family, coworkers, and businesses.<br />

To manage this pantheon of people, Apple provides an application called Address Book.<br />

Rather than maintain separate lists for the people you get and receive mail from, call or text<br />

via your iPhone, and communicate with via iChat, everything is simply kept in Address Book.<br />

Your applications can participate via the framework known, appropriate enough, as Address<br />

Book.<br />

In addition to being able to access the contact information stored in Address Book, the<br />

framework provides the ability to search, edit, and add contacts. For any social aspects of your<br />

application requiring human interaction, the work is already done for you. <strong>Leopard</strong> provides a<br />

prebuilt People Picker, as shown in Figure 24-6.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!