eXtensions


Book Reviews: For Writers of Web-pages and OSX Applications


By Graham K. Rogers

Beam, Michael and James Duncan Davidson. Cocoa in a Nutshell: a Desktop Quick Reference. O'Reilly; Sebastopol, CA. 2003. $39.95US. ISBN 0-596-00462-1
Dubinko, Micah. XForms Essentials: Gathering and Managing XML Information. O'Reilly; Sebastopol, CA. 2003. $29.95US. ISBN 0-596-00369-2
Goodman, Danny. JavaScript and DHTML Cookbook: Solutions and Examples for Web Programmers. O'Reilly; Sebastopol, CA. 2003. $39.95US. ISBN 0-596-00467-2
Sierra, Kathy and Bert Bates. Head First Java O'Reilly; Sebastopol, CA. 2003. $39.95US. ISBN 0-596-00465-6


One of the claims made about Macs (and particularly OSX) has always been that there is no software. As I have found in the last couple of years this is not so; and the number of new applications being written specifically for OSX increases day by day. A look at download sites will show this.

Cocoa in a NutshellHowever, writing programs for OSX is not the same as writing for other platforms. As a user, I particularly like the uniformity that developer software lends to the Mac. OSX is, of course, a leap forward (with a nod backwards to Unix) and many of the fundamentals of writing applications were laid down with the development of the neXt platform. The .nib files, for example, that some people have problems with, were first used here. I presume that the "n" in the Interface Builder stands for neXt. The authors of Cocoa in a Nutshell refer to these files as "one of the crown jewels of the Cocoa development environment."

Apple users are familiar with Classic, Carbon and Cocoa and it is the last of these that will take precedence. The others will fade in time. The language is C, or rather Objective-C and a comment on its power is made early on, in the preface: "You don't remember Cocoa; you look it up."

Herein lies the strength of this book, which is going to be an essential possession of anyone with the intent to write applications for OSX. While the first 150 pages or so explain the ways to write the applications, the major part of this work -- the next 355 pages -- are for reference. There are few illustrations.

The reference section is broken into four short segments -- Foundation types and constants; Foundation functions; Application kit types and constants; Application kit functions -- and then three larger segments.

These are: Foundation classes plus Foundation protocols; Application kit classes plus Application kit protocols; and finally, a Method Index.

At the end, before the excellent index, is an Appendix that includes further resources for developers: books and online references.

The clearly written first section makes the whole understandable -- even readable -- although the subtitle claims that this is a reference book. The authors, along with O'Reilly (this is another in its excellent "Nutshell" series) have done good service here. I did spot this one locally in the Apple shop in Siam Discovery Centre.


I also saw the Goodman book, JavaScript and DHTML Cookbook in the same shop. The metaphor of cookbook is a good one when it comes to programming.

JavaScript and DHTMLWhen I reviewed OSX Hacks in June, I noted that the authors then had used this same approach. As in a recipe, a problem is stated, the ingredients listed, then the method written.

Danny Goodman does this to good effect in what is, for some, a fairly complex subject. Normally, when I want JavaScript I use software to write it. He takes a task and deals with it in three parts: problem, solution and discussion. The problem is often straightforward, and the solution reasonably clear; but it is in the Discussion that the clarity of ideas are examined.

In some cases, Goodman almost seems to be mulling over ideas in print -- dangling the pros and cons of alternative approaches before a reader. Someone with reasonable skills will grasp the ideas; someone with higher level skills will be able to examine Goodman's thoughts and benefit from their analysis.

Each of the problems has, as part of the rubric, information as to which browsers the scripts will work with. Goodman is also clear when there are differences between the operations of Macs and PCs. There are several illustrations here: all show examples using Inernet Explorer.

This is no starter's book, although someone with web-writing knowledge will clearly improve their trade by working through this work. Any IT department or computer school would do well to get hold of a copy of this too.


XForms EssentialsAnother book that will be useful for those developing websites, especially those that collect customer information and data, is the brief but worthy XForms Essentials.

The book takes a careful look at the valuable nature of forms to those who write web sites, particularly for commercial purposes. In the same way that HTML evolved into XHTML (the de facto inclusion of extensible markup language to the original), so forms are now morphing into XForms, and Dubinko explains the history. He also explains that the reality now is HTML and that XForms are unlikely to become universal for quite a while. Time to prepare.

The book explains the possibilities of the forms and includes several coding examples as well as diagrams. As any work of this type should do, it starts simply and works its way up to more complex situations with illustrations of what the finished coding should look like when viewed via a browser. The clarity of the text made me want to start writing forms immediately.

There are two Appendices: "Examining Microsoft InfoPath" -- the MS hijack of another standard; and, in a subtle juxtaposition, "The GNU Free Documentation License" in which Dubinko explains that published editions of the book are being released under this license. O'Reilly are to be lauded for printing a book sections of which are also available online.


Head First Java proves the adage, "You can't tell a book by looking at its cover". It appears to be something out of the "Dummies" series, but "Java for Dummies" it is not; and it makes this very clear in the opening pages. In between all the old black and white photographs with caption balloons, the cartoon drawings, and the scribbled comments, is some serious teaching of how to write Java.

Head First java

Like a good teaching approach, it uses several methods to examine the same ideas: question and answer, mock interview, crosswords and, of course, exercises. You skip these at your peril.

I hated this book to begin with, but as I worked my way through its pages, I saw the good sense being exhibited. With lots of hand-written notes carefully added to the printed text, they appear to be random jottings but are strong supplements to the basics.

Although this is a programming language, the contents of the pages seem to be far from what one would imagine as the norms of coding instruction. Dammit, they are trying to make this serious subject enjoyable.


For further information, e-mail to Graham K. Rogers.

Back to eXtensions
Back to homepage