Delphi Cookbook – 2nd Edition

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)

https://www.packtpub.com/application-development/delphi-cookbook-second-edition

Amazon

Delphi Cookbook 2nd Edition on Amazon

 

Table of contents

Chapter 1: DELPHI BASICS

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

Chapter 2: BECOME A DELPHI LANGUAGE NINJA

  • Fun with anonimous 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

Chapter 3: KNOWING YOUR FRIENDS: THE DELPHI RTL

  • Check strings with regular expressions
  • Consuming RESTful services using native HTTP(S) client libraries
  • Cope with the encoded Internet world using System.NetEncodings
  • Save space using System.Zip
  • Decouple your code using a cross platform publish/subscribe mechanism

Chapter 4: 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
  • Reinvent your GUI a.k.a Mastering Firemonkey controls, shapes and effects

Chapter 5: THE THOUSAND FACES OF MULTITHREADING

  • Synchronizing shared resources with TMonitor
  • Talking with main thread using a thread safe queue
  • Synchronizing multiple threads using TEvent
  • Displaying a measure on 2D graph like an oscilloscope
  • Using the Parallel Programming Library in the real world: Tasks
  • Using the Parallel Programming Library in the real world: Futures
  • Using the Parallel Programming Library in the real world: Parallel For/Join

Chapter 6: PUT DELPHI ON THE SERVER

  • Developing web client JavaScript applications with WebBroker on the server
  • Converting a console service application to 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 application using UDP
  • Using AppTethering to create companion app
  • Creating DataSnap Apache modules
  • Creating WebBroker Apache modules
  • Using native HTTP(S) client libraries

Chapter 7: RIDE THE MOBILE REVOLUTION WITH FIREMONKEY

  • Taking a photo, applying effects, and sharing it
  • Using ListView to show and search local data
  • Using SQLite databases to handle a to-do list
  • Do not block the main thread!
  • Using a styled TListView to handle long list of data
  • Customizing the TListView
  • Taking a photo and location and sending it to a server continuously
  • Talking with the backend
  • Making a phone call from your app!
  • Tracking the application’s lifecycle

Chapter 8: USING SPECIFIC PLATFORM FEATURES

  • Using Android SDK Java classes
  • Using iOS SDK classes
  • Displaying PDF files in your app
  • Sending Android intents
  • Letting your phone talk: using the Android TextToSpeech engine
  • Using Java classes in Android apps with Java2OP
  • Do it in background, the right way: Android services

Events

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.

 

Conclusions

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.

Delphi Cookbook 2nd edition has been announced

Just after 1 year and half from the 1st edition, the 2nd edition of Delphi Cookbook has been announced. The first edition got a lot of interest and appreciation comments, so the editor decided to ask me a 2nd edition. So here it is! It is still in work-in-progress but the work is going smooth. In a month or two will start the review phase and then the book should be officially presented.

However, if you are interested, the book is already available in preorder.

https://www.packtpub.com/application-development/delphi-cookbook-second-edition

B04677_MockupCover_Cookbook

I want to thank you all for the success which Delphi Cookbook gets, and I hope that this 2nd edition will gets the same (or, why not, better) appreciation.

Stay tuned

DT

Migration to github for all my open source projects… done!

Since when Google announced that Google Code will be closed I did start to plan the migration of all my open source projects. Now, the migration is terminated.

In the next days, I’ll add all the contributors too, so that the development can go forward as usual.

These are the projects

  • DelphiMVCFramework
    • if you are reading my Delphi Cookbook, please use this new repository instead of the old SVN one, reported in the book.
  • DORM, the Delphi ORM
  • DelphiRedisClient
  • DelphiDIContainer
  • DelphiSTOMPClient

All the repositories are available on my personal github page https://github.com/danieleteti and, as usual all contributions are welcome.

Enjoy.

 

My “Delphi Cookbook” has been published

Almost an year ago I started to write a book about Delphi for Packt Publishing. Today that book has been published.

Delphi Cookbook Cover
Delphi Cookbook Cover

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.

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

Official book page at PacktPub

https://www.packtpub.com/application-development/delphi-cookbook

Book at Amazon

http://www.amazon.com/Delphi-XE6-Cookbook-Daniele-Teti/dp/1783559586

— 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