Hands-on with Delphi - a valuable cookbook for creating cross-platform and multi-tier apps
In one of recent posts, we discussed particularly available ways for creating multi-tier apps and compared two major solutions for Delphi developers, i.e. Embarcadero RAD Server and XData from TMS Software. Today, we're about to introduce new book from Dr. Holger Flick, skim over important chapters and emphasize main advantages of this beautiful piece of work.
Frankly, there is no plethora of books intended for Delphi developers. We can - from time to time - find a new paperback issued by Apress or Packt publishing houses but we are still a minority in comparison with developers using Java, Python or C (++, #). Therefore any new accession to the library is highly appreciated.
Dr. Holger Flick, in narrow collaboration with TMS Software, started a new series of printed books recently and Hands-on with Delphi is the first act in the row. As Dr. Flick announced, we can look forward shortly to see another book, for instance focused on using TMS FNC Maps library, and hope further useful books will follow.
First of all, let's say what this book is - I will cite partly from the original description (the entire book consists of 244 pages).
This book can be regarded as a certain cookbook for those who want to write multi-tier cross-platform apps using TMS Business component packs (TMS XData + TMS Aurelius) and need a complex and exhausting manual. Sure, we can find particular PDF documentation about creating back-end services using TMS XData, some video manuals how to create appropriate services, contacts and datamodules, but we have missed something all-embracing in-one. Well, what are the most important topics of this book:
- Write a professional web service for a database with over 8 million records.
- Design VCL, FireMonkey and TMS WEB Core web clients for multiple platforms and devices.
- Implement a reporting service with XData.
- Generate signed PDF documents with a customizable template.
- Add a token-based login to your services.
- Build user interfaces with vector images to be ready for any display resolution.
- Encrypt sensitive data using modern algorithms.
- Use parallel programming to build responsive client applications.
- Write better code with static code analysis.
The main advantage of this book is that it describes a real example from the real world - an existing freely available database is used as data source and its data can be imported from CSV files into MySQL (or another) database. The database content also demonstrates how swift are all methods used for a sample solution - everything is done in seconds despite large amount of records in the database.
As it is mentioned above, the book is divided into several chapters which lead the reader gradually from the beginning to the peak of the programmer's work. I do not intend to describe particular chapters in more details but some of them are so valuable and noteworthy that they deserve higher attention.
Chapter 5 is focused on creating appropriate web services using XData and adding all necessary custom services. XData's approach is really straightforward and allows to create most of code automatically (using definition of the database) on one hand, and add any user-defined methods as so called service contracts on the other hand.
Chapter 8 shows how to build a VCL client application. The principles are known generally but the author explains how to interconnect an existing web service with user interface using special TAureliusDataset component. It simplifies coding and effort and assures simple relationship between back-end and frond-end with almost no code.
And finally, the icing on the cake - chapter 9. For me, the most valuable part of the book because of the detailed step-by-step explanation of available methods for authentication. I could not find comparably comprehensive reference and ready-to-use examples on the web and handling credentials with time-limited tokens and creating service for checking user access is simply amazing.
For sure, also other parts of the book are beneficial. Some chapters explain implementing filters for returning data from a database, building a report viewer with output to PDF format or handling FireDAC as a default resource for accessing data in plenty of supported database formats.
All samples and code fragments mentioned in the book are easily downloadable from GitHub.
My final impression of this book is very positive. It demonstrates using Delphi together with TMS XData and Aurelius as a good option for creating robust multi-tier apps. The most precious moment is that the book does not explain issues theoretically but works with real and complex assignments from the beginning.
About the AuthorIng. Karel Janecek, MBA, MSc.