Friday, 19 December 2014

Delphi Cookbook review

A few people have reviewed this book already but for various personal and work commitments, reasons, I've been unable to review the book until now.

It's been many years since a really innovative Delphi book came out that was worth taking a look at. Delphi Product Manager +Marco Cantù's annual book is always an excellent source of up-to-date reference, and Coding in Delphi by the former Product Manager +Nick Hodges was a worthy giveaway to those who purchased recent versions of Delphi.

Delphi Cookbook was written by an author I'd not come across in the Delphi community before, +Daniele Teti. It reminds me of some of the O'Reilly books I have read in the past that, although they don't assume a certain level of knowledge and explain things well enough for beginners, you get much more out of them if you do have some language experience. Indeed, Daniele explains up front in the lengthy preface that it is not aimed at beginners.

The book contains 50 "recipes" covering not only VCL Windows projects, but also cross-platform development using FireMonkey, for Windows, Mac, iOS and Android. It was written alongside Delphi XE6 and so already is one version out of date, but it is not much of an issue in this case because the recipes work much the same across all versions (although XE4 is the minimum required for the FireMonkey cross-platform code).

The first chapter, Delphi Basics, is a real eclectic mix of topics, ranging from the relatively new VCL Styles to parsing XML and JSON, from Windows Services to really old topics such as associating file extensions. These are simple to follow and some, especially the XML and JSON topics, are useful building blocks for later on.

On the whole, the recipes are enjoyable to follow and Daniele has done a good job with the downloadable examples so you can see the ideas in action when compiling them in Delphi.

There is a slightly odd flow to the book; for example, chapter 2 discusses reasonably low-level concepts like RTTI, anaonymous methods and class helpers; this is followed by chapter 3 which discusses styles in FireMonkey, and chapter 4 which then goes low-level again with multi-threading using TMonitor and TEvent.

Probably the most useful chapter for me, and possibly for many now Delphi has entered the mobile marketplace, is chapter 5, which covers writing the server-side application or service, for your remote applications to communicate with. This is neatly followed by a chapter on the mobile basics, many of which are already covered by the examples and demos provided with Delphi. However, chapter 7 also takes you further into Android and iOS platform specifics.

I like Daniele's informal style which sets the tone that this book is really about exploration and fun, rather than about following a "recipe" to the letter. He is often honest in his appraisal of a Delphi feature, which is refreshing, but it shines through that this was a labour of love about a development environment about which he, and his prospective readers, are passionate.

Without the advent of the mobile development in Delphi, I don't think this book would have taught much new to a seasoned developer. But there is plenty of well-explained content in here for everyone to have something to learn. At the very low price it is being offered for, it's a good go-to book to have in your library.

Friday, 17 October 2014

Delphi development update

Hi everyone,

I can't believe it's been over a year since my last posting. My last post was having a moan about the cost of Delphi XE5, coming from XE4. Well, as many pointed out to me, the Software Assurance plan was the way to go and I'm now happily running on Delphi XE7 and enjoying being on the latest releases of Delphi as and when they emerge.

I know the whole SA/Recharge issue is a hot topic amongst Delphi developers, but I've covered that already and, as a successful business which uses Delphi heavily, the SA plan is actually a reasonable price to pay for the benefits we get from each new version of Delphi. So let's leave that discussion to the forums, for now.

I really wanted to mention 2 things today.

Firstly, using Delphi XE7, we have had our first app successfully submitted to the iOS App Store. I can't say too much about it yet because we want to give our customers the first details. But I have to say that I submitted the app to Apple 3 weeks ago, thinking the whole process would take months, knowing how difficult I've heard it is to get an app approved. Within less than 2 weeks, my app was approved, first time, and is currently in the store. Written entirely using out-of-the-box Delphi, on the FireUI framework. Communicating to a Datasnap Server written also entirely in Delphi. This is terrific for us and we have been able to re-use so much existing code for the app that would have had to be rewritten had we chosen another mobile development framework.

Secondly, I have a copy of the new Delphi Cookbook by +Daniele Teti which I have just begun and will post a review of within the next month. It's written in an informal style making it an easy read, and all of the example code is available to download if you buy the book.

Having used and evangelised Delphi for the past 20 years, I thought I knew everything there is to know, but there are some nice topics that I've encountered already that have explained something new or different, and it's always good to learn.

Happy coding.