Muutke küpsiste eelistusi

E-raamat: Cocoa Design Patterns

  • Formaat: 456 pages
  • Sari: Developer's Library
  • Ilmumisaeg: 01-Sep-2009
  • Kirjastus: Addison-Wesley Educational Publishers Inc
  • Keel: eng
  • ISBN-13: 9780321591203
  • Formaat - EPUB+DRM
  • Hind: 23,88 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 456 pages
  • Sari: Developer's Library
  • Ilmumisaeg: 01-Sep-2009
  • Kirjastus: Addison-Wesley Educational Publishers Inc
  • Keel: eng
  • ISBN-13: 9780321591203

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Next time some kid shows up at my door asking for a code review, this is the book that I am going to throw at him.

 

Aaron Hillegass, founder of Big Nerd Ranch, Inc., and author of Cocoa Programming for Mac OS X

 

Unlocking the Secrets of Cocoa and Its Object-Oriented Frameworks

 

Mac and iPhone developers are often overwhelmed by the breadth and sophistication of the Cocoa frameworks. Although Cocoa is indeed huge, once you understand the object-oriented patterns it uses, youll find it remarkably elegant, consistent, and simple.

 

Cocoa Design Patterns begins with the mother of all patterns: the Model-View-Controller (MVC) pattern, which is central to all Mac and iPhone development. Encouraged, and in some cases enforced by Apples tools, its important to have a firm grasp of MVC right from the start.

 

The books midsection is a catalog of the essential design patterns youll encounter in Cocoa, including





Fundamental patterns, such as enumerators, accessors, and two-stage creation

Patterns that empower, such as singleton, delegates, and the responder chain

Patterns that hide complexity, including bundles, class clusters, proxies and forwarding, and controllers

And thats not all of them! Cocoa Design Patterns painstakingly isolates 28 design patterns, accompanied with real-world examples and sample code you can apply to your applications today. The book wraps up with coverage of Core Data models, AppKit views, and a chapter on Bindings and Controllers.

 

Cocoa Design Patterns clearly defines the problems each pattern solves with a foundation in Objective-C and the Cocoa frameworks and can be used by any Mac or iPhone developer.

Arvustused

Praise for CocoaDesign Patterns

 

This long-needed book is a great resource for Cocoa newcomers and veterans who want to get the why behind the what. The list of patterns gives historical perspective and answers many developer questions and the last three chapterscovering Core Data, AppKit, and Bindingsare a must-read; they reveal insights that might otherwise require hours of discussion with Apple engineers or access to source code.

Tim Burks, Software Developer and Creator of the Nu Programming Language, www.programming.nu

 

This book is a comprehensive and authoritative treatment of design patterns and their practical applications in Cocoa projects. I recommend this book to anyone who wants to advance from intermediate to expert proficiency as a Macintosh developer.

John C. Randolph, Vice President Engineering, Stealth Imaging, Inc.

 

Cocoa Design Patterns is a fantastic book that will show you the ins and outs of software design patterns, how Cocoa makes use of them, and how to apply them to your own applications for better, more robust, and more maintainable software.

August Trometer, Owner of FoggyNoggin Software

 

Cocoa Design Patterns is superb! It is highly readable, thoroughly enjoyable, and filled to the brim with wisdom that will make you a more efficient and effective programmer. The authors utilize a consistent and self-contained approach to each chapter, making it easy to return to use as a reference. However, the material is so interesting and vital to Cocoa programmers that youll want to read it from cover to cover.

David Mandell, Independent Developer

 

Erik and Donalds book really helped me out with the conceptual side of programming. It caused me to realize where I was going wrong in my code and helped me sort out my design issues.

Eoin Houlihan

 

This book is recommended for any programmer interested in a deeper understanding of Cocoa. Reading it might have helped me become a better software engineer in any object-oriented language. Ill keep it handy as a constant reference and look forward to reading it again more carefully.

Daryl Spitzer

Muu info

Much of the technology embodied by Apple's Cocoa software development frameworks have been in commercial use since 1988, and in spite of many years of use, the Cocoa frameworks are still revolutionary. Cocoa technology has been marketed with a variety of names including NeXTstep, OpenStep*, Rhapsody, and Yellow Box. In recent years, Apple has expanded the frameworks dramatically and added new tools to raise the bar for Cocoa programmer productivity beyond its already famously high levels.

Programmers are often overwhelmed by the breadth and sophistication of Cocoa when they first start using the frameworks. Cocoa is huge, but its also elegant in its consistency and simplicity which result from the application of patterns throughout its design. Understanding the patterns enables the most effective use of the frameworks and serves as a guide for writing your own applications.

This book explains the object-oriented design patterns found in Apples Cocoa frameworks. Design patterns aren't unique to Cocoa; they're recognized in most reusable software libraries and available in any software development environment. Design patterns simply identify recurring software problems and best practices for solving them. The primary goal of this book is to supply insight into the design and rationale of Cocoa, but with that insight, you'll be able to effectively re-use the tried and true patterns in your own software - even if you aren't using Cocoa.
I: One Pattern to Rule Them All
1(27)
Model View Controller
2(15)
MVC in Cocoa
4(11)
Core Data Support for Model Subsystems
5(1)
Application Kit Support for View Subsystems
6(2)
Application Kit Support for Controller Subsystems
8(1)
Cocoa's Text Architecture
9(1)
Cocoa's Document Architecture
10(3)
Cocoa Scriptability
13(1)
Cocoa's Preference Pane Architecture
14(1)
Quartz Composer's Architecture
15(1)
The QTKit Architecture
15(1)
Summary
15(2)
MVC Analyzed and Applled
17(11)
Non-MVC Design
17(5)
Analysis of the Non-MVC Pay Calculator Design
21(1)
MVC Design
22(5)
Analysis of the MVC Pay Calculator Design
26(1)
Summary
27(1)
II: Fundamental Patterns
28(119)
Two-Stage Creation
29(14)
Motivation
29(2)
Solution
31(7)
Zones
31(1)
Initializing Allocated Memory
32(1)
Implementing the Designated Initializer
33(2)
Using Zones in Initializers
35(2)
Creating Temporary Instances
37(1)
Examples in Cocoa
38(4)
Consequences
42(1)
Template Method
43(10)
Motivation
43(1)
Solution
44(3)
Default Template Methods
45(1)
Designing with Template Methods
46(1)
Examples in Cocoa
47(4)
Using the -drawRect: Template Method
47(1)
Other Cocoa Template Methods
47(4)
Consequences
51(2)
Dynamic Creation
53(10)
Motivation
53(1)
Solution
53(8)
Using Dynamic Creation
54(6)
Dynamic Creation to Implement Plug-In Architectures
60(1)
Examples in Cocoa
61(1)
Consequences
62(1)
Category
63(14)
Motivation
63(1)
Solution
64(6)
Informal Protocols
67(1)
The Anonymous Category
68(1)
Code Organization
69(1)
When to Use Categories Versus Subclassing
69(1)
Examples in Cocoa
70(4)
Using Categories for Organization
70(1)
Using Categories for Informal Protocols
71(3)
Using Categories for Framework Division
74(1)
Consequences
74(3)
The Clash of Methods
74(1)
Replacing Methods
75(1)
Software Maintenance
76(1)
Anonymous Type and Heterogeneous Contalners
77(8)
Motivation
77(1)
Solution
77(7)
The Anonymous Type
78(3)
Assignment
81(2)
Heterogeneous Containers
83(1)
Examples in Cocoa
84(1)
Consequences
84(1)
Enumerators
85(14)
Motivation
85(1)
Solution
85(12)
Using Enumerator Objects
86(1)
Using Fast Enumeration
87(1)
Creating Custom Enumerators
87(5)
Implementing Fast Enumeration
92(4)
Internal Enumeration
96(1)
Examples in Cocoa
97(1)
Consequences
97(2)
Perform Selector and Delayed Perform
99(8)
Motivation
100(1)
Solution
100(4)
Delayed Perform
102(1)
The Implementation of Objective-C Message Sending
102(2)
Examples in Cocoa
104(2)
Consequences
106(1)
Accessors
107(16)
Motivation
108(1)
Solution
108(11)
Reference Counted Memory Management
110(1)
Accessors That Manage Retain Counts
111(3)
Confining Memory Management to Accessors
114(1)
Mutability
115(2)
NSKey Value Coding
117(1)
Interface Builder Outlets
118(1)
Objective-C 2.0 Properties
118(1)
Examples in Cocoa
119(3)
Consequences
122(1)
Archiving and Unarchiving
123(12)
Motivation
123(1)
Solution
124(3)
Conditional Encoding
125(2)
Examples in Cocoa
127(7)
Implementing the NSCoding Protocol
128(3)
Encoding and Decoding Nonobject Types
131(2)
Object Substitution
133(1)
Nib Awaking
133(1)
Consequences
134(1)
Copying
135(12)
Motivation
135(3)
Solution
138(1)
Examples in Cocoa
139(7)
Implementing NSCopying
140(1)
Implementing Deep Copying
141(1)
Implementing NSMutable Copying
142(1)
Required Copying
143(1)
Copying Objective-C 2.0 Properties
144(2)
Avoid NSCopyObject ()
146(1)
Consequences
146(1)
III: Patterns That Primarily Empower by Decoupling
147(127)
Singleton
148(11)
Motivation
148(1)
Solution
148(9)
Encapsulating a Shared Resource
149(1)
Creating and Accessing a Shared Instance
150(3)
Controlling Instantiation
153(2)
Deallocation
155(1)
Determining if the Singleton Has Been Created
155(1)
Thread Safety
156(1)
Working with Interface Builder
156(1)
Examples in Cocoa
157(1)
Consequences
158(1)
Notifications
159(16)
Motivation
160(1)
Solution
160(8)
MYNotification
160(2)
MYNotificationCenter
162(5)
Associative Storage
167(1)
Examples in Cocoa
168(4)
Global Notification Names
168(1)
``Will'' and ``Did'' Notifications
169(1)
Synchronous Versus Asynchronous Notifications
169(2)
Distributed Notifications
171(1)
Consequences
172(3)
Delegates
175(16)
Motivation
175(4)
Solution
179(10)
Implementing Delegate Support
180(6)
Implementing a Delegate
186(2)
Data Sources
188(1)
Examples in Cocoa
189(1)
Consequences
189(2)
Hierarchies
191(15)
Motivation
191(1)
Solution
191(14)
Implementing a Hierarchy
192(3)
The Cocoa View Hierarchy
195(2)
Coordinate Systems in the View Hierarchy
197(1)
Browsing the View Hierarchy
197(8)
Examples in Cocoa
205(1)
Consequences
205(1)
Outlets, Targets, and Actions
206(14)
Motivation
207(1)
Solution
207(8)
Outlets
211(1)
Targets
211(1)
Actions
212(1)
Actions and Responder Chains
213(2)
Examples in Cocoa
215(3)
Consequences
218(2)
Responder Chain
220(12)
Motivation
220(1)
Solution
220(10)
Terminology
221(1)
The Responder Chain
221(2)
The Extended Responder Chain
223(2)
Walking Through the Extended Responder Chain
225(2)
Inserting Objects into the Responder Chain
227(1)
Leveraging the Responder Chain
228(2)
Examples in Cocoa
230(1)
Consequences
231(1)
Associative Storage
232(10)
Motivation
232(1)
Solution
232(4)
Simulating Instance Variables
233(3)
Examples in Cocoa
236(4)
Reference Counted Memory Management
237(2)
Key Value Coding
239(1)
Consequences
240(2)
Invocations
242(13)
Motivation
242(1)
Solution
242(12)
Method Signatures
243(1)
Using NSInvocation Objects
244(4)
Using Timers
248(5)
Delayed Messaging
253(1)
Examples in Cocoa
254(1)
Consequences
254(1)
Prototype
255(8)
Motivation
255(1)
Solution
255(2)
Examples in Cocoa
257(5)
Using MYLabeledBarCell Instances as Prototypes
258(2)
Using MYColorLabeledBarCell Instances as Prototypes
260(2)
Consequences
262(1)
Flyweight
263(5)
Motivation
263(1)
Solution
263(1)
Examples in Cocoa
264(3)
Encapsulating Nonobject Values
264(1)
Reducing Storage Requirements
265(1)
Standing in for Other Objects
266(1)
Consequences
267(1)
Decorators
268(6)
Motivation
268(2)
Solution
270(1)
Examples in Cocoa
271(2)
Accessory Views
272(1)
Consequences
273(1)
IV: Patterns That Primarily Hide Complexity
274(90)
Bundles
275(7)
Motivation
275(1)
Solution
276(2)
Examples in Cocoa
278(3)
Dynamically Loading Executable Code
279(2)
Consequences
281(1)
Class Clusters
282(20)
Motivation
283(1)
Solution
283(5)
Creating a Class Cluster
285(3)
Examples in Cocoa
288(12)
Subclassing a Class Cluster's Public Interface Class
288(1)
The MYShortString Subclass of NSString
289(11)
Lessons from MYShorString
300(1)
Consequences
300(2)
Facade
302(10)
Motivation
303(1)
Solution
303(4)
Examples in Cocoa
307(4)
The Text Facade
307(1)
The Image Facade
308(1)
The Persistent Storage Facade
309(1)
User Interaction Facades
309(2)
Consequences
311(1)
Proxies and Forwarding
312(16)
Motivation
312(1)
Solution
312(15)
Implementing Forwarding
313(1)
Proxies
314(7)
Higher Order Messages
321(6)
Examples in Cocoa
327(1)
Consequences
327(1)
Managers
328(9)
Motivation
328(1)
Solution
328(7)
Extending the Singleton Pattern
330(3)
Adding Other Manager Features
333(2)
Example in Cocoa
335(1)
Consequences
336(1)
Controllers
337(27)
Motivation
338(1)
Solution
338(22)
MYShapeDraw Model Subsystem
339(1)
MYShapeDraw View Subsystem
340(2)
MYShapeEditor Controller Subsystem
342(11)
Extending the MYShapeDraw View Subsystem for Editing
353(2)
Redesigning and Generalizing the Solution
355(5)
Examples in Cocoa
360(2)
Controllers and Bindings
361(1)
Consequences
362(2)
V: Practical Tools for Pattern Application
364(40)
Core Data Models
365(14)
The Role of the Model Subsystem
366(1)
Core Data Terminology
366(2)
Entity
367(1)
Attributes
367(1)
Relationships
367(1)
Properties
368(1)
Collaboration of Patterns Within Core Data
368(9)
NSManagedObject and NSEntityDescription
369(6)
Designing Core Data Models
375(1)
NSManagedObject Context
375(1)
NSPersistentStore Coordinator and NSPersistent Store
376(1)
Core Data Limitations and Benefits
377(2)
Application Kit Views
379(14)
The Role of the View Subsystem
379(1)
Collaboration of Patterns Within Application Kit
380(12)
NSApplication, Events, and the Run Loop
381(1)
Responders
381(1)
The Responder Chain
382(1)
NSWindow Overview
383(2)
NSView Overview
385(2)
Targets and Actions
387(1)
Archived Objects and Nibs
388(3)
Undo and Redo
391(1)
Managers
391(1)
Application Kit Limitations and Benefits
392(1)
Bindings and Controllers
393(11)
Role of Bindings and Controllers
393(4)
Bindings Avoid Coupling
395(1)
The Importance of Using Controllers with Bindings
396(1)
Collaboration of Patterns Within Bindings and Controllers
397(5)
What Happens in -bind:toObject:withKeyPath:options:?
399(1)
How Does Key Value Observing Detect Changes to Observed Properties so That Observing Objects Can Be Notified?
399(1)
What Message Is Sent to Notify Registered Observers When an Observed Property's Value is Changed?
400(2)
Bindings and Controllers Limitations and Benefits
402(2)
Resources
404(3)
Apple Documentation
404(1)
Books
405(1)
Mailing Lists
405(1)
User Groups
406(1)
Online Groups
406(1)
Conferences/Training
406(1)
Index 407
Erik M. Buck founded EMB & Associates, Inc. in 1993 and built the company into a leader in the aerospace and entertainment software industries by leveraging the NeXT/Apple software technology that would later become Apples Cocoa frameworks. Mr. Buck has also worked in construction, taught science to 8th graders, exhibited oil on canvas portraits, and developed alternative fuel vehicles. Mr. Buck sold his company in 2002 and currently holds the title of Senior Staff at Northrop Grumman Corporation. Mr. Buck received a B.S. degree in computer science from the University of Dayton in 1991 and is a frequent contributor to Cocoa mailing lists and technical forums.

 

Donald A. Yacktman has been using Cocoa and its predecessor technologies, OpenStep and NextStep, professionally since 1991. He coauthored the book Cocoa Programming and has contributed to the Stepwise website as both author and editor. He has worked for Verio/iServer and illumineX in the past. At present he works as an independent consultant assisting in the design and implementation of Cocoa and iPhone applications. Mr.Yacktman received B.S. and M.S. degrees in electrical and computer engineering from Brigham Young University in 1991 and 1994, respectively.