Delphi Cookbook – 1st Edition

Delphi Coockbook Cover
Delphi Cookbook Cover

UPDATE: This page is about Delphi Cookbook 1st Edition

This book is a cookbook! That’s it, in 328 pages you will find useful (I hope) “recipes” for your day-by-day Delphi job.

Topics of the book

  • Create visually stunning applications using FireMonkey
  • Effectively use LiveBindings with the right OOP approach
  • Create server-side programs to serve RESTful web services and provide data to your mobile apps
  • Develop mobile apps for Android and iOS using well-defined GUI design patterns for a great user experience
  • Build efficient mobile apps that read data from a remote server
  • Call the platform-native API on Android and iOS even for an unpublished API
  • Use extended RTTI to better manage the software customization for your customer
  • Leverage the most popular design patterns for a better design without wasting too much time debugging


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.

How To Buy

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

Official book page at PacktPub

Book at Amazon

Some comments from the readers

“#Delphi Cookbook by @danieleteti. A must buy if you want to be a better Delphi developer.”

— @chillijay from twitter

“IMHO it’s by far the best Delphi book I’ve read. The clear and practical approach used by Daniele in describing ‘recipes’ applied to solve presented problems, makes this book an absolute must-have for every Delphi programmer; in the same way the Charles Petzold’s ‘Programming Windows’ was for the Win32 API C/C++ developer. Great job Daniele!”

— Daniel Merli (Linkedin user)

“This book is worth more than 5 stars. This is a very nicely prepared, well written and typeset, Delphi book, targeting Delphi programmers who wants to pick up nice gems about new generation of Delphi programming. As a “cookbook”, this is not a systematic book, but a book with valuable programming tips and such. The writer fulfills this objective very well. The format of the book is of a concise style, totaling a little around 300 pages. As a reader, you don’t feel over-dragging by verbose lines (as some other books do), while getting the points quickly. Undoubtedly, the author is a technical guru, he is also a great writer. My only quibble – it would be great if the sample code is better formatted. I am looking forward to more books of this author. Thumbs up.”

— Wuping Xin ( user)

“This is a beautifully written piece of work. The clarity and preciseness of the presentation, and the diversity of the topics (applicable to the last 2 Delphi releases) makes this book an invaluable reference source for a host of features.This book is pure gold (and dirt cheap).”

— An ADUG member

“I just got the eBook version and it is great! Thanks for putting it together – very useful recipes!”

— nmadani (blog user)

“Daniele, your contribution to the Delphi community is priceless! I’ve just ordered the book!”

— claudio.piffer (blog user)

“I read the index of your book and I decided to buy it. I like it and found it very useful!”

cniebla (blog user)

Table of Contents

Chapter 1: Delphi Basics

Changing your application’s look and feel with VCL styles and no code

Changing the style of your VCL application at runtime

Customizing TDBGrid

Using the owner’s draw combos and listboxes

Creating a stack of embedded forms

Manipulating JSON

Manipulating and transforming XML documents

I/O in the twenty-first century – knowing streams

Putting your VCL application in the tray

Creating a Windows service

Associating a file extension with your application on Windows

Chapter 2: Become a Delphi Language Ninja

Fun with anonymous methods – using higher-order functions

Writing enumerable types

RTTI to the rescue – configuring your class at runtime

Duck typing using RTTI

Creating helpers for your classes

Checking strings with regular expressions

Chapter 3: Going Cross Platform with FireMonkey

Giving a new appearance to the standard FireMonkey

controls using styles

Creating a styled TListBox

Impressing your clients with animations

Using master/details with LiveBindings

Showing complex vector shapes using paths

Using FireMonkey in a VCL application

Chapter 4: The Thousand Faces of Multithreading

Synchronizing shared resources with TMonitor

Talking with the main thread using a thread-safe queue

Synchronizing multiple threads using TEvent

Displaying a measure on a 2D graph like an oscilloscope

Chapter 5: Putting Delphi on the Server

Web client JavaScript application with WebBroker on the server

Converting a console service application to a Windows service

Serializing a dataset to JSON and back

Serializing objects to JSON and back using RTTI

Sending a POST HTTP request encoding parameters

Implementing a RESTful interface using WebBroker

Controlling remote applications using UDP

Using App Tethering to create a companion app

Creating DataSnap Apache modules

Chapter 6: Riding the Mobile Revolution with FireMonkey

Taking a photo, applying effects, and sharing it

Using listview to show and search local data

Do not block the main thread!

Using SQLite databases to handle a to-do list

Using a styled TListView to handle a long list of data

Taking a photo and location and sending it to a server continuously

Talking to the backend

Making a phone call from your app!

Tracking the application’s life cycle

Chapter 7: Using Specific Platform Features

Using Android SDK Java classes

Using iOS Objective-C SDK classes

Displaying PDF files in your app

Sending Android intents

Letting your phone talk – using the Android TextToSpeech engine

I hope you enjoy the reading!

–Daniele Teti

Leave a Comment