Delphi Cookbook - 2nd Edition

Posted on gio 30 giugno 2016 in Books

Delphi Cookbook 2nd Edition

Starting from today my Delphi Cookbook 2nd edition is available to buy. The first edition got a lot of interest and appreciation comments. Delphi Cookbook is a best sellers for PacktPub (my editor) in its category, the editor decided to ask me a 2nd edition. So here it is!

What's new

The problem with each "2nd" edition is: "What I can expect if I already bought the 1st one?". This edition contains all the recipes from the 1st edition updated to the new Delphi 10.1 Berlin, plus a lot (ca 150 pages) of brand new contents. There is also a brand new chapter about less-known RTL classes. Also some "old" recipes has been completely rewritten because some techniques has been superseded by the newer Delphi versions. So, if you liked the 1st edition, you should find something interesting also in the 2nd one. The 2nd edition contains 470 pages compared to the 328 of the 1st edition.

Topics of the book

  • Understand the basics of professionals Delphi programming
  • Become a Delphi language Ninja
  • Knowing the new RTL classes to work with HTTP/S, Net encodings, event bus, compression etc.
  • Develop visually stunning applications using FireMonkey
  • Deploy LiveBinding effectively with the right OOP approach
  • The thousand faces of multithreading: syncronization tecniques in the real world
  • The Parallel Programming Library: Tasks, Futures parallel For
  • Create server-side programs to serve RESTful web services and provide data to your mobile apps
  • Use well-defined GUI design patterns to build mobile applications that provide a great user experience
  • Build mobile apps that read data from a remote server efficiently
  • Using sensors and network in mobile apps
  • Call the platform native API on Android and iOS even for an unpublished API
  • Manage software customization for your customer by making better use of an extended RTTI
  • Implement the most popular design pattern without wasting too much time on debugging and bug fixing

Some considerations

Delphi Cookbook 2nd edition, just like to 1st one, it is not an introductory book, you will not find any "Introduction to the Object Pascal language", however the majority of the chapters are not too complex and can be grasped also by the new Delphi programmers.

Where to buy

The book is available for sale on the editor website and on Amazon.

PacktPub (Official book page)

Delphi Cookbook 2nd Edition on Amazon

Table of contents

[Chapter 1: DELPHI BASICS]{style="color: #000000;"}

  • [Change your application look&feel with VCL styles and no code]{style="color: #000000;"}
  • [Changing the style of your application at run time]{style="color: #000000;"}
  • [Customizing TDBGrid]{style="color: #000000;"}
  • [Using owner draw combos and listboxes]{style="color: #000000;"}
  • [How to make an owner draw control aware of the VCL styles]{style="color: #000000;"}
  • [Creating a stack of embedded forms]{style="color: #000000;"}
  • [Manipulating JSON]{style="color: #000000;"}
  • [Manipulating and transform XML documents]{style="color: #000000;"}
  • [I/O in the 21th century: knowing the streams]{style="color: #000000;"}
  • [Creating a Windows service]{style="color: #000000;"}
  • [Associating a file extension with your application on Windows]{style="color: #000000;"}
  • [Be coerent with the Windows look&feel using TTaskDialog]{style="color: #000000;"}

[Chapter 2: BECOME A DELPHI LANGUAGE NINJA]{style="color: #000000;"}

  • [Fun with anonimous methods - using higher-Order functions]{style="color: #000000;"}
  • [Writing enumerable types]{style="color: #000000;"}
  • [RTTI to the rescue - configuring your class at runtime]{style="color: #000000;"}
  • [Duck typing using RTTI]{style="color: #000000;"}
  • [Creating helpers for your classes]{style="color: #000000;"}

[Chapter 3: KNOWING YOUR FRIENDS: THE DELPHI RTL]{style="color: #000000;"}

  • [Check strings with regular expressions]{style="color: #000000;"}
  • [Consuming RESTful services using native HTTP(S) client libraries]{style="color: #000000;"}
  • [Cope with the encoded Internet world using System.NetEncodings]{style="color: #000000;"}
  • [Save space using System.Zip]{style="color: #000000;"}
  • [Decouple your code using a cross platform publish/subscribe mechanism]{style="color: #000000;"}

[Chapter 4: GOING CROSS PLATFORM WITH FIREMONKEY]{style="color: #000000;"}

  • [Giving a new appearance to the standard FireMonkey controls using styles]{style="color: #000000;"}
  • [Creating a styled TListBox]{style="color: #000000;"}
  • [Impressing your clients with animations]{style="color: #000000;"}
  • [Using master/details with LiveBindings]{style="color: #000000;"}
  • [Showing complex vector shapes using Paths]{style="color: #000000;"}
  • [Using Firemonkey in a VCL application]{style="color: #000000;"}
  • [Reinvent your GUI a.k.a Mastering Firemonkey controls, shapes and effects]{style="color: #000000;"}

[Chapter 5: THE THOUSAND FACES OF MULTITHREADING]{style="color: #000000;"}

  • [Synchronizing shared resources with TMonitor]{style="color: #000000;"}
  • [Talking with main thread using a thread safe queue]{style="color: #000000;"}
  • [Synchronizing multiple threads using TEvent]{style="color: #000000;"}
  • [Displaying a measure on 2D graph like an oscilloscope]{style="color: #000000;"}
  • [Using the Parallel Programming Library in the real world: Tasks]{style="color: #000000;"}
  • [Using the Parallel Programming Library in the real world: Futures]{style="color: #000000;"}
  • [Using the Parallel Programming Library in the real world: Parallel For/Join]{style="color: #000000;"}

[Chapter 6: PUT DELPHI ON THE SERVER]{style="color: #000000;"}

  • [Developing web client JavaScript applications with WebBroker on the server]{style="color: #000000;"}
  • [Converting a console service application to Windows service]{style="color: #000000;"}
  • [Serializing a dataset to JSON and back]{style="color: #000000;"}
  • [Serializing objects to JSON and back using RTTI]{style="color: #000000;"}
  • [Sending a POST HTTP request encoding parameters]{style="color: #000000;"}
  • [Implementing a RESTful interface using WebBroker]{style="color: #000000;"}
  • [Controlling remote application using UDP]{style="color: #000000;"}
  • [Using AppTethering to create companion app]{style="color: #000000;"}
  • [Creating DataSnap Apache modules]{style="color: #000000;"}
  • [Creating WebBroker Apache modules]{style="color: #000000;"}
  • [Using native HTTP(S) client libraries]{style="color: #000000;"}

[Chapter 7: RIDE THE MOBILE REVOLUTION WITH FIREMONKEY]{style="color: #000000;"}

  • [Taking a photo, applying effects, and sharing it]{style="color: #000000;"}
  • [Using ListView to show and search local data]{style="color: #000000;"}
  • [Using SQLite databases to handle a to-do list]{style="color: #000000;"}
  • [Do not block the main thread!]{style="color: #000000;"}
  • [Using a styled TListView to handle long list of data]{style="color: #000000;"}
  • [Customizing the TListView]{style="color: #000000;"}
  • [Taking a photo and location and sending it to a server continuously]{style="color: #000000;"}
  • [Talking with the backend]{style="color: #000000;"}
  • [Making a phone call from your app!]{style="color: #000000;"}
  • [Tracking the application's lifecycle]{style="color: #000000;"}

[Chapter 8: USING SPECIFIC PLATFORM FEATURES]{style="color: #000000;"}

  • [Using Android SDK Java classes]{style="color: #000000;"}
  • [Using iOS SDK classes]{style="color: #000000;"}
  • [Displaying PDF files in your app]{style="color: #000000;"}
  • [Sending Android intents]{style="color: #000000;"}
  • [Letting your phone talk: using the Android TextToSpeech engine]{style="color: #000000;"}
  • [Using Java classes in Android apps with Java2OP]{style="color: #000000;"}
  • [Do it in background, the right way: Android services]{style="color: #000000;"}


In the next months there will be some events regarding the book.

  1. A one day workshop, held in Rome and Milan, about selected recipes of the books with additional contents and other "live" considerations.
  2. Some blog post about contents that not fitted (by time and other contraints) in the book. Most of them will be about the server side development and will involve Redis and other open source projects.
  3. Oct 6,7 2016 PacktPub will be one of the sponsor of ITDevCon 2016. During that event there will be some surprises for the attendants offered by the Delphi Cookbook "series" (yes, 2 is a series :-) ) editor.


As usual, writing a tech book is an hard task. 470 pages are more than I was thinking at the day 0. However, I'm quite (not completely, as usual) satisfied about the work. I really hope that you will enjoy the content at least as much I enjoy the writing.