For those whove been stuggling to get to grips with XUL and the like: this book is The One.
Finally help is at hand...
1) Thanks to my repeated rants about XUL (I guess), Prentice Hall were kind enough to send me a complementary copy of Nigel McFarlanes new book, “Rapid Application Development with Mozilla” (RADwM from now on) to review. It turns out that they’ve given me the chance to announce some very good news: this is the resource anyone who’s struggled with XUL so far has hoped for.
In fact I wasn’t planning to write the review so soon but it’s very readable so things have gone faster than expected.
Impressions
Some general thoughts.
Nigel McFarlane has a great writing style. He manages throughout to get on the same side as the reader, as a developer, discussing the issues and hurdles that make the daily grind of any software project. RADwM manages to be both down to earth and approachable while at the same time intelligent and thought provoking. This is how tech books should be written.
What appealed early on was Nigel’s straightforwardness, such as;
(He then goes on to equip the reader with all the essential survival tools.)
As an “outsider” who has little idea of Mozilla’s internals, I found RADwM really conveyed an understanding of what an amazing feat of software engineering Mozilla really is, without attempting to hype it up in any way. Because so much painstaking effort has gone into doing things the Right Way (vs. cutting corners and meeting marketing deadlines), Mozilla is a platform upon which high degrees of complexity can be built with relative ease, thanks to XUL et al. RADwM is worth reading just to get some scale of what’s being going at Mozilla all these years.
Who Should Read It?
RADwM is a book aimed at those with a general experience of software development and there’s some degree of assumed knowledge and experience, of subjects like HTML, CSS and Javascript (don’t worry too much about Javascript - Nigel covers the essentials in Chapter 5).
Certainly for your “typical” PHP developer there should be no problems, the pre-requisite subjects being those we’re all more than acquainted with. In fact there’ll no doubt be much sage nodding as Nigel discusses how CSS relates to XUL and emphases why it’s important to leave our sloppy HTML habits behind (*cough*).
RADwM may even broaden the readers understanding of technologies we’re already happy with;
Bears thinking about...
I would recommend spending at least a couple of hours hacking away at XUL before ploughing into RADwM, with help from resources like XULPlanet, so that you know roughly what ballpark you’re in.
What's On Offer
RADwM is not a reference book (although there’s a ton of info I will be referring back to) but is more of a guided tutorial intended to empower you to use Mozilla for development. Nigel makes it clear early that you’ll need additional reference material and I think this is a strategy that works well, given ongoing Mozilla development plus who wants half the book filled with references better found online.
In general RADwM is organized around the path you’ll likely take while developing an application, subjects like “Navigation” getting their own chapter. A “Hands On” section at the end of each chapter illustrates the preceding discussion by adding to an example application which evolves throughout the book while the closing “Debug Corner” of each chapter is packed with practical insight that is essential for truly rapid application development (tip: try adding the attribute / value paid debug=”true” to some XUL tag and see what happens...).
Threaded through RADwM is a very pleasant tour through XUL, introducing the basic tags early, making sure the reader is happy with the box model, then introducing further tags in context with later subjects, such as saving the <button /> tag to the “Forms and Menus” chapter.
Where ever possible Nigel makes reference to that we already know, namely HTML and CSS with handy comparisons between, say, HTML forms and XUL forms. There are also many useful snippets of Javascript, aimed at showing you what’s possible and giving you new ideas for how to approach problems in that environment (scripting Mozilla should be much less painful than DHTML, for example).
At all times there’s heaps of practical advice from a developers perspective to help you avoid losing your way e.g. (on getting starting with design of an XUL user interface);
It makes solid coverage of topics such as Events and Commands in Mozilla as well as how to interact with the various APIs available in Mozilla from Javascript.
2) Along the way the reader picks up insight into some of the peripheral technologies related to the Mozilla platform such as RDF which has a complete chapter to introduce it with a great section called “A Tutorial on Facts”. And a side effect of reading RADwM may be to improve what you already do with HTML.
XPCom gets it’s own chapter and is where it really starts to sink in how powerful Mozilla makes you, “tall buildings” being just a few lines of JavaScript. The discussion in RADwM provokes a many more questions which are sadly too specific for the scope of the book - strikes me XPCom really needs it’s own book but Nigel does more than enough to get the reader started.
Also the final “Deployment” chapter clears up a number of mysteries (at least to me) related to security and (what I’m most interested in) how to package and “launch” apps from a web server.
Overall RADwM gives you everything you need to get stuck into XUL and Mozilla and deliver the finished product.
In Summary: A Must Buy
RADwM crosses the border that has kept “outsiders” from being able to succeed with Mozilla.
Personally it’s cleared up a lot of the puzzles I’ve struggled with in various dabblings with XUL and I now feel able to doing something serious with Mozilla, knowing that I’ll be able to get around confidently as a developer.
Not only is it a fascinating read, it also opens the door to a platform which has immense potential. So if you’re wondering what to read this Christmas, I highly recommend “Rapid Application Development with Mozilla”. Hopefully the Postman will get there in time...