Just released eBook: Delphi Event-based and Asynchronous Programming
Delphi Event-based and Asynchronous Programming
I just had to do it... Go with the flow!
It's the Black Friday / Cyber Monday "season", so I had to rush the book offer
The book was actually scheduled for release in early December, but then the Black Friday deals started popping up all over the place... pressure was building... and I finally caved in!
I cut the darn thing in two, and decided to offer Part I at a discount, and will give Part II for free to all Buyers. Not really a 97% BF discount but hey... Junior is still studying, and we still have to pay the bills (Corona doesn't help, either)!
So, here it is!
I hope you'll like it like you did Delphi Memory Management!
https://dalija.prasnikar.info/delphiebap/index.html
Event-based programming is everywhere. Nowadays, you can hardly write any kind of application without leaning on events and messages.
This simple, yet extremely powerful mechanism is also the cornerstone of asynchronous and multithreaded programming. Without events, we would not know when some task was completed.
But, asynchronous and multithreaded programming consists of more than just handling multiple threads, protecting shared resources, and synchronization. It also includes designing and understanding program flow. That design aspect is often forgotten, taken for granted, and solving all the fine-grained nuances of multithreaded programming hogs the spotlight.
Without understanding asynchronous flow and the bigger picture it can be hard to properly solve all the other issues, including multithreading. What used to be plain spaghetti code, now becomes temporal spaghetti.
You can lose control over your objects, have bits of code creating and releasing them all over the place, even without adding multithreading into the mix. Memory leaks, crashes, and holding references to dead data long after its destruction are perfectly possible even in a single-threaded environment.
While the starting point of this book is giving a proper introduction to event-based and asynchronous programming flow and design, it also provides the necessary implementation details, explanations and code examples needed to put those designs into practice.
Table of Contents
Part I. - Sections 1-4
Introduction
1. The Loop
Hidden complexityPeeking at the console
Main event loop
Event-based programming
Pushmi-pullyu
Game loop
2. Messaging Systems
Windows messaging systemWindows messaging system in VCL
Custom messaging systems and patterns
System.Messaging
3. Life, the Universe, and Everything
Life, the Universe, and EverythingAutomatic memory management
Interfaces
Class helpers
Anonymous methods and lambdas
4. Asynchronous Programming and Multithreading
Asynchronous programming and multithreadingMaking the first dive...
Application.ProcessMessages
Application.ProcessMessages reentrancy problem
Moving long operations to a background thread
Asynchronous message dialog
Tasks
Futures
5. Thread Safety
What is thread safety anyway?The importance of thread safety
Achieving thread safety
Avoiding shared data
Protecting shared data
6. GUI and Multithreading
Main (GUI) threadCommunicating with the main thread
Any timeline on physical copies?
ReplyDeleteOh, and congratulations!
DeleteThanks!
DeleteTimeline, no. It's planned though.
eBook version will be out for a while first. I'll wait for more feedback and eventually release an eBook update before the print is out.
At the moment, we're adding finishing touches to Part II that will be out early December...
Paperback edition has just been published. For all eBook purchases, there is 50% discount on paperback edition.
DeleteLinks and instructions for getting discount for already purchased eBooks are at: https://dalija.prasnikar.info/delphiebap
Hey Dalija,
ReplyDeleteAnderson here. First, congratulations!!! You're a brave woman and I wish this would set an example for other women to engage in technology. Especially in Delphi, which is a male dominated field. We will all benefit from that.
Second, where can I find your books to buy?
Cheers,
A
Hi,
Deletefor purchasing you can follow the links on the side (or in above article for Async Programming)
You can also find direct purchase links for all books on https://dalija.prasnikar.info
Delphi Memory Management is also available on Amazon.