In the interests of transparency, I want to make it clear from the outset that I expressed an interest in reading and reviewing Delphi Cookbook, and was sent a copy free of charge from the publisher (Packt Publishing).
The only condition of this agreement was that I publish a review for Delphi Cookbook here on my blog (which is what I would have done even if I had paid for it).
With that said, the views and opinions expressed in this review are 100% genuine. While I am more than happy to review any Delphi publications (solicited or otherwise), my views and opinions are not for sale, and my reviews are always completely honest. To publish anything other than a completely honest review would be as unethical as it would be to the detriment of my reputation for sharing my honest (and blunt) opinion of any topic.
You can find Delphi Cookbook on the publisher’s website (by clicking this link)
Pre-reading: A little background on the book
At the point of writing this section of this review, I have not yet begun reading the book itself (beyond its cover page and marketing information). I feel it is important when writing a review to share any preconceptions I have based on nothing but the cover, and whatever information I have read about the book itself before I begin reading.
So, it is my understanding that Delphi Cookbook was originally going to be titled “The Delphi XE6 Cookbook”, and that the “XE6″ part was subsequently omitted (wisely) so-as not to date the book (i.e. to suggest that the book applies only to the XE6 version of Delphi).
Based on the front cover (specifically the tagline “Quick answers to common problems”), Delphi Cookbook appears to focus on teaching people how to accomplish particular goals in Delphi, rather than serving as a broader language or library reference.
This would indicate that Delphi Cookbook could serve as a good introduction to Delphi for newcomers, as well as a good way for developers migrating from much older versions of Delphi to the newer (cross-platform, FireMonkey) versions to quickly get up to speed on newer features and changes.
Cover to cover, Delphi Cookbook constitutes 328 pages… so it’s a little more than just some “light reading”, so at this point I’m hoping for a well-structured contents.
Now to begin reading…
As I had hoped, the contents illustrates a reasonable structure to the progression of the book.
There are 7 distinct chapters (each chapter broken down further into discrete topics):
- Delphi Basics - Covers various aspects of working with the IDE, Project Wizards, and Designers/Editors. There appear to be some code-inclusive topics within this chapter, which we’ll get to in the process of this review.
- Becoming a Delphi Language Ninja – As the title of this chapter suggests, the topics within cover various aspects of the Delphi Language, including “anonymous methods”, “enumerable types”, the enhanced RTTI (introduced in Delphi 2010), “Class Helpers” and String (with Regular Expressions).
- Going Cross Platform with FireMonkey – Covers FireMonkey topics such as styles, composited controls, animations, LiveBindings, vectors and paths and intermixing FireMonkey with VCL Applications (I sure hope he mentions my MonkeyMixer plugin within this topic)
- The Thousand Faces of Multithreading – Covers various aspects of working with Threads in Delphi (Synchronizing, thread-safety etc)
- Putting Delphi on the Server – Covers producing network/web services and client-side consumers using WebBroker, JSON, HTTP POST, RESTful interfaces, UDP, DataSnap and App Tethering.
- Riding the Mobile Revolution with FireMonkey – Builds on chapter 3 by showing how to make FireMonkey applications for mobile devices (iOS and Android)
- Useing Specific Platform Features - Explains how to exploit platform-specific features such as Android SDK Java classes, Objective-C SDK classes, and even using Android’s Text-To-Speech engine.
As one would expect, there’s also an Index at the end of the book.
Having now read the book (which took me a week, reading casually… one chapter per day) I’m now ready to render verdicts on various aspects of the book.
The overall format of the book makes for easy reading.
The book is prefaced by defining the structure and formatting, so you know right from the start when you’re looking at a code block, which segments of a code block are of particular note (these are printed in bold text), when you’re looking at a command-line input or output, where to find warnings, note and tips, and how instructions (and similar important steps in a process) are defined.
Better still, all of the sample projects used to illustrate the various techniques and topics covered in Delphi Cookbook are available to download, so you can easily load the related demo in the IDE and follow along using the code editor and form designer (which saves having to copy all of the code snips from the book to produce the working demo).
Contact information is provided for asking questions, leaving feedback, or pointing out any errors you may find in the book (no such errors jumped out at me in reading the book, however)
The arrangement of the book is useful for those either new to Delphi, or making a leap from a significantly older version to one of the newer (cross-platform) versions, as the first chapter covers the basics of the form editors. Obviously, those already possessing this knowledge can simply skip over the chapter if they choose to the bits of interest to them.
I will say, however, that there were a couple of useful IDE tips in the first chapter that even I wasn’t aware of, so in the very least a cursory scan through Chapter 1 may well be useful to everyone, even those of us with significant experience.
Screenshots are provided to show the results of anything visual.
The coverage on VCL Styles (also in Chapter 1) made for interesting reading for me, having never made use of the VCL styles features before. This was a very good test of the book in terms of how well the information was presented. I found the instructions, tips and insight into the concept of VCL styles very easy to understand, and within minutes had a little demo running with a VCL style defined, which allowed the user to switch between styles at runtime.
What I enjoy particularly about the way Delphi Cookbook is structured is that it doesn’t just dictate to the read how to do something, it goes on to explain how that something works. This information is presented at the end of each topic’s example as a bullet-point breakdown of the key steps, so if you find yourself requiring a quick reminder down the line, you can simply skim through the “How it works…” subsection and the knowledge you’ve absorbed by reading the chapter previously completes the memory for you.
Better still, the section on VCL Styles goes beyond merely consuming pre-packaged styles to explain how to produce custom styles, both pre-generated, and “owner-drawn” (drawn at runtime). While I have previous experience working with VCL canvasses in Delphi, I had no understanding of the makeup of a VCL Style package prior to reading Delphi Cookbook…. now I do!
In terms of the structuring for each demonstration within the book, they are laid out in the following order:
- Getting ready
- How to do it
- How it works
- “There’s more” (further information building on what you’ve just learned, acting as something of a segway to something else)
In a sense, you’re starting out with a simple explanation of the problem, given a concise solution to that problem, the solution is summarized in a bullet-point form, then you build on that solution to solve a more complex problem.
This technique is very clever, as you find yourself absorbing the information in a more digestible manner.
Useful links related to each subject (where applicable) are provided in each chapter. I was pleased to see MonkeyMixer got a mention in there as well (though the associated link was to Jim McKeeth’s blog, rather than the MonkeyMixer GitHub repository, which would’ve been the more logical address)
While Delphi Cookbook is certainly tailored more towards developers new to Delphi (or leaping to a newer version from a significantly older one) there’s something in there for all of us. As developers, it’s important for us to always expand our knowledge beyond just what we’re making use of on a daily basis.
This was why I spent quite a bit of time reading the section on VCL styles and following along in the exact same way I would imagine a complete newcomer to Delphi would. Doing this served as an ample test of the book in accomplishing its primary objective (teaching newcomers the ropes).
Indeed, I discovered useful information in virtually every topic of every chapter, whether it be simply an alternative way of achieving something, or a feature I didn’t know existed that may well be useful to me in the future.
As I knew going in, Delphi Cookbook is not a comprehensive language reference. This is actually a good thing, as language references tend to be forbidding tomes, unfocused and generally serving the same purpose as the Wiki (search the index to find the declaration and definition of a type or method within a large code framework).
Daniele Teti has done a brilliant job of covering each topic thoroughly, while keeping the descriptions and explanations concise and on-point (something I often struggle to do, as you’ve probably noticed if you’ve read my other articles).
The structuring of topics (which I’ve already praised in this review) is clean, logical and flawless.
In terms of the primary objective of Delphi Cookbook, having approached the topic of VCL Styles as a complete newcomer, and learned much in so doing, I have to conclude that this objective is achieved superbly.
The copy I have read has been the PDF eBook, which has the advantage that you can click on a chapter or section title within the contents to navigate directly to that page. This is very useful when you want to refer back to something you’ve read in the book (perhaps to refresh your memory) quickly and easily.
Would I recommend Delphi Cookbook?
In short: yes! Whether you’re entirely new to Delphi XE5 through XE7, or a seasoned veteran, you’re almost sure to learn something new from Delphi Cookbook.
Certainly, those with less Delphi experience will benefit more from this book than those with more experience, however we should all know that no one of us is a master of all things, and it is my belief that – as developers – we should always strive to learn more. Every day should be a learning experience, and Delphi Cookbook‘s clean (logical) structuring makes absorbing the knowledge contained in its pages intuitive.
Definitely one to have in the library!