|
|||||||||||||||||||||||||||||||||||
|
23 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
63 of 66 people found the following review helpful:
5.0 out of 5 stars
Unlocking Cocoa Programming,
By
Amazon Verified Purchase(What's this?)
This review is from: Cocoa Design Patterns (Paperback)
This superb book has finally unlocked Cocoa programming! Let me explain.
In most subjects we learn by acquiring a little bit of knowledge and, once that bit has been understood, we move on to the next little bit, until the bigger topic is understood. First we learn A then we learn B. Unfortunately, this method of learning does not work well with application frameworks such as Cocoa. These frameworks usually consist of a number of complex idea that are strongly interrelated. You cannot learn A then B, since A requires B and B requires A. Instead you must learn topics A..Z all at the same time! Cocoa is especially difficult for most programmers since it is based on using Objective C, and Objective C is based on Smalltalk. Smalltalk is an extremely dynamic language whose principles are significantly different than those of current popular languages. Thus, most programmers must learn zilllions of elements of the Cocoa framework and also the unusual ideas behind Objective C (Smalltalk). These are essential since Cocoa works differently than other popular frameworks and cannot be understood without understanding Objective C's dynamic approach to programming. Up until now we have had Objective C books which help learning Objective C, and the excellent Hillegass book (Cocoa Programming for Mac OS X) which is a tutorial on Cocoa. The Hillegass book does help the reader understand many principals behind Cocoa, but it stops short of giving in depth knowledge of the design patterns that Cocoa uses. Thus when the user tries to go beyond the Hillegass book he/she is frustrated because they were not taught the full idea behind each element of Cocoa and their connections to other elements. There is not enough information for the reader to branch out to develop their own programs. Cocoa Design Patters, on the other hand, presents, in a very professional manner, the most important Cocoa patterns, in depth, and how they are all inter-related. Furthermore, it presents details how how to use the patterns, examples of where they are used in Cocoa, and includes extremely valuable and unbiased information on the pro's and con's and pitfalls of using each pattern. Although this is certainly not tutorial/beginner information, the book is extremely well written and enjoyable to read (especially for those of us who loved Smalltalk and other dynamic languages). It is one of the best written highly technical books I have ever read (and I have been programming since 1970). In my opinion this book will save the prospective Cocoa programmer many, many, many hours of frustration. I only wish it had been available several years ago when I first tried to learn Cocoa (I did not succeed then, but I am succeeding now). One final note. The authors could do the Mac Developer Community, and the wider developer community, an enormous favor. In this book they demonstrate an impressive depth of knowledge about Cocoa, Objective C, the Mac development world, and the XCode tools. It would be fabulous if they were to develop a professional unbiased critique and comparison of the pro's and con's of the Objective-C/Cocoa approach to development with other framework/development environments (e.g. Microsoft's). I think this is especially important since the dynamic language approach to programming has fallen out of favor, yet I think it has many benefits that are seriously under appreciated. This document would: Clearly show programmers the benefits of the dynamic language / Cocoa approach to programming. Perhaps it would reawaken interest in dynamic languages! Point out the areas where Objective C/Cocoa/XCode has weakness and should be improved. This may inspire Apple to improve their development tools at a brisker pace.' The development world has had few breakthrough improvements over the last decade or two. I think that much can be learned from Cocoa/Objective C, and I hope That Cocoa Design Patters is just the beginning of a renewal of interest in this too-long-neglected approach to software development.
24 of 24 people found the following review helpful:
5.0 out of 5 stars
Develops a good foundational understanding,
Amazon Verified Purchase(What's this?)
This review is from: Cocoa Design Patterns (Paperback)
This book is not for beginners to Cocoa. I would only recommend it folks that have a reasonable amount of experience with Cocoa / Objective-C. Don't take this the wrong way; I'm only defining the target audience. This book details the patterns at work in Cocoa's architecture. While this text may confuse those new to Obj-C or Cocoa, it provides valuable insight into Cocoa usage patterns.
Cocoa Design Patterns explains techniques commonly used throughout the Cocoa architecture (Model-View-Controller, Release/Retain Counting, Delegates, etc.), and provides concrete implementation examples in the frameworks. For each pattern it also describes the scenario that you may use it in, and the consequences, good and bad, to using the pattern. I would recommend this book to anyone after they've cut their teeth on Cocoa, after writing their first couple simple applications. This book shines light on some of the design decisions Apple made with Cocoa, and helps the reader understand how to best leverage the patterns utilized in the Cocoa frameworks.
31 of 35 people found the following review helpful:
5.0 out of 5 stars
If Cocoa is Your Thing, This Book is Essential,
This review is from: Cocoa Design Patterns (Paperback)
It was the iPhone that finally brought me into the world of Cocoa programming. I quickly fell in love with the Cocoa & Cocoa Touch frameworks, finding them to be elegant, consistent and truly useful. I've read several books on Cocoa, Objective-C and Mac / iPhone development, but this one stands alone in its quest to fill the gaps, to cement a deep and thorough understanding of one of the best frameworks ever written.
Simply stated, this book is a joy to read. It answered many questions that I had about the "why" behind the evolution of Cocoa and has left me feeling better able to make the most of its power. Cocoa Design Patterns is written in a style that is extremely accessible. It is almost like a detective novel as each chapter unravels the secrets of Cocoa. The most fun I've had reading a technical book in a long while.
8 of 8 people found the following review helpful:
4.0 out of 5 stars
Very good, with only a few issues,
By
This review is from: Cocoa Design Patterns (Paperback)
Overall, I thought the book was expertly written. It covers a lot of important and interesting aspects of Cocoa, and all its major patterns. The only reasons I'm not giving it 5 stars are:
- there are several errors in the code samples. Occasional bugs are inevitable, but non-compiling code is inexcusable and a major disappointment, for a book of this nature; - its coverage of the Singleton pattern is incomplete, considering that it doesn't discuss Apple's own recommendations on how to implement a singleton; - no discussion of patterns related to thread safety; - the discussion of HOMs (higher order messages) is interesting, but it strikes me as something rarely used; I'd have preferred if the author had used the space spent on HOMs to discuss something more practical. For instance, a common application of the Proxy pattern is the asynchronous loading of images off the web. I think that would have been more useful; - later chapters are very repetitive, and much less concrete in actual usage, than earlier ones. For instance, chapters 28 (Managers), 29 (Controllers), and 32 (Bindings and Controllers) have a lot in common, and that commonality is repeated in all 3 chapters. Chapter 31 (Application Kit Views) is a repetition of material covered in several previous chapters and adds nothing new. I'm a great fan of Design Patterns and think that the Gang of Four book (Design Patterns: Elements of Reusable Object-Oriented Software) is still the best book on the subject. However, it's focused on C++ and not on Objective-C and Cocoa. This book, despite its faults, is a worthy partner to the Gang of Four book and is a great addition to any Cocoa programmer's library.
4 of 4 people found the following review helpful:
5.0 out of 5 stars
Not just for Mac programmers,
By Kocsonya (Sydney, Australia) - See all my reviews
Amazon Verified Purchase(What's this?)
This review is from: Cocoa Design Patterns (Paperback)
This book has Cocoa in the title, and indeed it is about Cocoa and the Mac. Many reviews emphasises how it helps you to tap into the power of Cocoa and allows you to develop better code for the Mac. I'd like to approach it from a different angle.
The book is worth reading even if you do not (exclusively) program for the Mac. The 'design patterns' in the title are more than just a 'higher-level coding standard' for the Mac. They are actually design philosophies, ways of structuring your code. Yes, they heavily utilise the dynamic nature of Objective-C but it does not mean that their relevance is restricted to that environment. Objective-C is a fairly thin layer and a small runtime on top of C, after all. Each design pattern described in the book is a solution methodology for a software engineering problem. The authors present a problem, usually through a small example. Then they explain the 'design pattern', the solution chosen by the Cocoa developers. They then show you why that particular way of approaching the problem makes the result more robust, more flexible and easier to modify. Software reusability and maintainability are central tenets of the book. They demonstrate that while a quick-and-dirty solution might be shorter, using the given design pattern, or, if you like, adhering to a particular software development principle will save you development and maintenance time in the long run, especially for large projects. Many of the design patterns revolve around the factoring your problem into preferably orthogonal subproblems, decompose your software into units mapped to the subproblems and the design of the interactions between those units. The book is all about minimising inter-dependencies, by keeping your interfaces clean and your units being self-contained. The design patterns are methods to achieve that goal. Whether you rely on the objects and the dynamic features of Objective-C or you achieve the same result by explicit bits of procedural code is beside the point. You have to know at least some Objective-C and introductory level of Cocoa to be able to read the book, as all examples use those. However, what you learn from the book you can use in any software project, regardless of language and environment. If you know enough Mac-speak so that you can read the book, I recommend it, even if you are not doing any serious Mac development. The style of the book is pleasant, the explanations are concise but they are clear and thorough. The examples are also good, they are large enough to show the practical benefit of the design pattern they demonstrate but are small enough to the reader actually reading the code and not just glazing over the listings.
4 of 4 people found the following review helpful:
4.0 out of 5 stars
An Easy Read, Though Errors Noted,
By
Amazon Verified Purchase(What's this?)
This review is from: Cocoa Design Patterns (Paperback)
This has been a very interesting and easy read. This book covers Cocoa design patterns for Mac OS X 10.5, Leopard, as you can see on page xxiv. However, learning the design patterns of Cocoa for Leopard will greatly help your understanding of Snow Leopard and later iterations of Mac OS X. Though it would have been interesting to know of any changes to these design patterns in Snow Leopard, something you might have expected in a 2010 copyright book.
That being said, this book is very easy to read and understand, if you really want to learn Cocoa. Though the learning curve for Cocoa is steep, this book greatly simplifies that process. However, not all the code seems to have been carefully checked for errors. For example, the terminal colon on a method name taking a parameter was often missing, as you can see on page 212: [someControl setAction:NSSelectorFromString(@"copy")]; The method "copy:" is very different from "copy". "copy:" takes a parameter while "copy" takes none. A colon in an Objective-C method is part of that method name and indicates a parameter to be inserted after it when invoking the method. A method that takes no parameters has no colons in its name. A method name with any number of parameters has a colon for each parameter and always ends with a colon for the last parameter. The error of leaving out the terminal colon for method names taking a parameter was common in the code in the book. Another error I found was on page 104 where this method was shown: - (id) performSelector:(SEL)aSelector { IMP methodImplementation = [self methodForSelector:aSelector]; return (*IMP)(self, aSelector); } IMP is a function pointer type defined on page 103 as: typedef id (*IMP)(id self, SEL _cmd, ...); The error is that the return statement above should be this: return (*methodImplementation)(self, aSelector); This error was also from not carefully reviewing the code. It may have been better to test the code before putting it in the book to make sure it compiles and works. If I were to write a book, I think I would copy the code to an IDE first, test it, and then copy it back into the software I would be using to write the book. However, generally the code is correct, and the code errors are not that unusual for computer books. Also, the book has the right mixture of code and text, and the examples are well thought out. At one point I thought I saw an error, but it was correct. On page 332 in the method + (MYGameHighScoreManager *)sharedInstance I did not see where the static variable myInstance was declared. Then I noticed that it is declared at the top of the code listing on page 331 outside of the @implementation block. Referring to page 154, I found a similar method with the same declaration at the beginning of the method: static MyGameHighScoreManager *myInstance = nil; In fact, except for that line the two methods on pages 154 and 332 are identical. The difference is that the method in page 154 declares it within the method statically while the code in page 331 shows the same static declaration made outside both the @implementation and the @interface code blocks, which is the correct way to do it, given the intermixing of C and Objective-C code. Hence, learning Cocoa requires expertise in both Objective-C and C, one reason for the steep learning curve. These languages may be simple to learn, but require a lifetime to master. Due the code errors I found and for not covering Snow Leopard, I give this book 4 stars, but for the content and the explanations I would give this book 5 stars for the author makes it very easy to read and follow. Overall, I would recommend anyone who wants to learn Cocoa or improve their understanding of it to get this book, and I am glad I bought it. It has increased my understanding and filled many holes in my knowledge of Cocoa, for there really are not many books on the subject. However, I see on Amazon that newer books are coming out on the subject soon. But I still recommend giving this book a read just to learn the design patterns and to understand how Cocoa works and the proper way to program in it. Whether you are expert at Cocoa or a beginner, you will get a lot out of this book.
3 of 3 people found the following review helpful:
5.0 out of 5 stars
Excellent,
By
Amazon Verified Purchase(What's this?)
This review is from: Cocoa Design Patterns (Developer's Library) (Kindle Edition)
An excellent book, well written and substantive. Read this before starting on that next big project (and before you find yourself in a morass of spaghetti code). Kindle version is fine, although as with other programming books, the code examples are treated like figures, and are therefore difficult to read unless viewed on a large screen.
3 of 3 people found the following review helpful:
5.0 out of 5 stars
My absolute favorite cocoa book,
By Donald Ducken "Donald" (Atlanta, GA, USA) - See all my reviews
This review is from: Cocoa Design Patterns (Paperback)
This is the first review I've written on amazon, even though I have bought tons of stuff here, both great and awful. I decided to get on and write on for this book because it's one of the best purchases I've made with respect to nonfiction programmer references, if not the best. It's a near-perfect example of the way a programming book should be written, in my opinion, and I reference this book all the time. It is the most "reusable" book on cocoa development that I own, by that I mean - I can reference it over and over for various projects and goals, always finding something of use in the book. Because the author takes a more conceptual approach (design patterns) it results in a deeper understanding (at least for me) of these patterns and how to implement them in my own work.
Thus, I wanted to make sure everyone who is looking for a book that covers these topics (and it should be everyone who is learning cocoa - the patterns are extremely ubiquitous, and they are absolutely, absolutely concepts every good cocoa programmer should be very familiar with). It's written incredibly well, in an easy-to-follow and easy-to-understand manner - I can quickly get through a chapter, or reference one when I need to brush up, extremely quickly and without having to spend a bunch of time going through filler material like I sometimes have to do with other programming reference books I own. I'm very cautious about buying programming references because you truly never know what you're going to get, or if it really ends up applying to you, as they vary so much in the way they are written and the skill level for which they are written. I found this book, though, to be accessible but not written in a way that doesn't assume the reader is both a novice and dumb (something I seem to find way too often). Great book, great book. Mine is worn out from all the use it has gotten, I have notes scribbled throughout, and I find myself sticking it in my backpack and carrying it everywhere; I think if you want to write good code, clean code, *reusable code*, and want/need a good model of the best route to take, get this book. Even if you understand conceptually how a lot of these things are done (I did, for the most part, when I bought the book), it really helps to have it in this format (and in the way the author took writing the book) because he does an incredible job of getting to the core of _what you need and why you need it_ - so you both never forget a key item in a certain implementation goal, and you take the best route to get what you want from the design pattern. It gives me a great deal of reassurance as I write my code with the goal of reusability and writing great code, that I'm doing so in the best possible way. A 5 star book if there ever was one.
3 of 3 people found the following review helpful:
5.0 out of 5 stars
Should be shipped with the dev tools,
This review is from: Cocoa Design Patterns (Paperback)
Documenting sophisticated frameworks has always been a challenge, and even more so with ones such as Cocoa written in dynamic languages such as Objective-C. The reason is that what is there is not really the most important part. Instead it is the intangible lines that go between ("ma") and the structures that repeat themselves with slight variations that really constitute the framework.
"Cocoa Design Patterns" uses this insight to reduce the (by now) massive bulk that is Cocoa to a much more manageable collection of patterns without reducing technical depth. In fact, by focusing on these patterns, the authors are able to provide both a big-picture view and technical depth that goes beyond that found in the documentation or other books on the subject. In short, instead of just information, it provides insight. If you have been interested in programming Cocoa or Cocoa Touch but have found the frameworks intimidating, both by their sheer bulk and by everything being somewhat different: read this book, it will all start to make sense.
2 of 2 people found the following review helpful:
5.0 out of 5 stars
A book that can turn a hacker into a pro...a real eye opener,
By
Amazon Verified Purchase(What's this?)
This review is from: Cocoa Design Patterns (Paperback)
While there are design pattern books available which are not based on Cocoa/Objective C, I believe this book would be valuable to readers no matter what your language of choice.
Cocoa and objective-c are simply the foundation from which examples are created. Surely there is more benefit if you're new to Cocoa and intend to use it. Quite simply, this book is an eye opener for a hackers like myself who've fumbled along writing large programs without an architectural toolbox (other than basic data structures). And those who read and implement the architectural strategies will almost undoubtedly improve their work's quality. You are required to know C and have a rudimentary object-oriented programming or you might find yourself overwhelmed. If you're like me and know C++ and OOP, and you hack your way to a finished product, you'll benefit quickly. You may struggle a little in the beginning but it'll get better, I could almost guarantee it. |
|
Most Helpful First | Newest First
|
|
Cocoa Design Patterns by Erik M. Buck (Paperback - September 11, 2009)
$54.99 $31.22
In Stock | ||