CodeRage XII Modernizing your VCL application

Thank you for watching my session on Modernizing your VCL application at CodeRage XII.

If you want to watch the video again, you can use this YouTube link:

Slides, source code and database for this webinar is available for download here:

The zip file is password protected to add some level of security to it.
The password is coderagexii

Additional Tips:

The Windows-10 styles can be modified or appended with your own styling using Tools | Bitmap Style Designer.

When using a TTask to get things done in the background, avoid sharing resources with the main thread. Either disable access from the main thread to these resources or create copies for the TTask. After that feedback the results to the main thread using TThread.Queue or TThread.Synchronize.

When using TTask, use a task-based approach just like you would in the real world when you let a colleague do a task. Just delegate an entire task with the required resources (memory, file handles, connections, datasets) to a TTask and allow the task to feedback its results at the end of the task. Avoid using locking as this can easily lead to deadlocks, waitlocks and other blocking effects.

When using Change Views keep in mind that the first time a subscription is activated on the Change View it will return all records, as it does not yet know which records you have already received for the specified subscription identifier.

Change View subscription identifiers should be unique but repeatable for each running application instance. Create an identifier, such as [MachineName+UserName] and use it to activate the subscription. If the application is stopped and then run again, it can activate the subscription using the same identifier, so you will get the changes back again.

CodeRage XII – Modernizing your VCL application

If you haven’t already sign up for this years CodeRage XII conference.

CodeRage XII is an online conference for three days starting Tuesday Nov 7th on 13:00 in the afternoon (CET, Amsterdam time), until Thursday Nov 9th at one a clock in the night.

There are a lot of interesting sessions this year, covering everything from JSON to Linux Libraries, Amazon data storage to running on Arduino with Visuino. And many more.

Key speakers this year are Robert C. Martin on Clean Coding and Agile, Marco Cantu on ExtJS, and of course our own Paweł Głowacki on Amazon data storage integration.

I’ve got a session as well, on Modernizing your VCL application. It takes a Webshop BackOffice application and re-styles it for Windows-10 and 2017, removes the user wait times by using FireDAC Async SQL and TTask from the Parallel Programming Library (PPL) and uses Interbase Change Views to take a first step to changing from a save/load based approach to a state-based application, where the user always has the latest data available.

PASCON 19 maart 2016

De volgende PASCON is alweer heel dichtbij, op zaterdag 19 maart. Het wordt een  uitdagende dag met begrijpelijke uitleg van complexe onderwerpen zoals Generics, Kunstmatige Intelligentie (David Dirkse) en Threading met de PPL (Danny Wind).

Over het stukje PPL (Parallel Programming Library)  kan ik wat meer vertellen; hier laat ik enkele eenvoudig toepasbare usage patterns zien die je direct kunt gebruiken in je eigen Delphi code om je code vlot en responsive te laten reageren. Onder andere een pattern voor Task Resource Handling, en Task Monitoring, maar ook netjes afhandelen van Task Canceling.

Meer info hier, en toegang is gratis:

CodeRage X – Delphi Parallel Programming Deep Dive: Task Monitoring, Resource Locking, Thread Pool, Design Patterns and more!

Made by

Made by

Delphi Parallel Programming Library Deep Dive: Task Monitoring, Resource Locking, Thread Pool, Design Patterns and more! That is the full title of this session at CodeRage X. I hope you found this deeper look into some of the relevant parallel programming features such as TInterlocked, TMonitor and TThreadPool useful.

The replay of this session of CodeRage X has been made available by Embarcadero on YouTube here:
CodeRage X Delphi Parallel Programming Deep Dive


Source code for this session is available here:

Remember: when you run into shared resources with multi-threaded programming; consider just making a copy of the data for each thread.

The entire CodeRage X Object Pascal playlist of videos is available here:
CodeRage X Object Pascal Track