Tuesday, June 13, 2017

Announcing Delphi Developer Days 2017 Special Edition Database Workshop

I am pleased to announce that registration is now open for Delphi Developer Days 2017 Special Edition Database Workshop with Bob Swart and me, Cary Jensen, which will be held this fall in the U.S. and Europe.

Unlike our traditional Delphi Developer Days events, which include a broad range of topics, this workshop focuses exclusively on database development. It begins with a detailed look at connecting to data and configuring FireDAC, and continues with a look at some of FireDAC’s more advanced features, including Array DML, the SQL command preprocessor, and cached updates.

The workshop continues with an in-depth discussion of multi-tier development. Topics include creating DataSnap servers and using Embarcadero’s RAD Server. Here you will learn how to access your data from mobile applications, how to support both Delphi and non-Delphi clients using REST (REpresentational State Transfer), and how to create RAD Server microservices with Delphi.

Both days of this workshop are taught jointly by me and Bob. You are encouraged (though not required) to bring a laptop in order to follow along with the provided code samples.

Each attendee will receive a Delphi Developer Days course book, which includes a special edition of my latest book Delphi in Depth: FireDAC, along with material on DataSnap, mobile development, and RAD Server written by Bob (Dr.Bob) Swart.

Here are the cities and dates for this fall tour:
Chicago, 25-26 September 2017
Antwerp, Belgium, 9-10 October 2017
Frankfurt, Germany, 27-28 November 2017

In addition to the course book, attendees also receive lunch on each day and all code samples covered during the workshop. Due to the nature of this workshop format, seating is limited. Register now to save your place in this special edition database workshop and receive a substantial discount for early registration. For more information, visit http://www.DelphiDeveloperDays.com.

The Delphi Developer Days 2017 Special Edition Database Workshop is taught in English.

Note that we will return with the traditional Delphi Developer Days event in the spring of 2018, where we present both joint as well as separate sessions on a wide variety of Delphi topics.

Friday, May 12, 2017

Delphi in Depth: FireDAC is now available

Last autumn, as I was finishing up my chapters for the 2016 Delphi Developer Days course book, which I wrote with Nick Hodges, Director of Engineering at Embarcadero Technologies, I received a question about FireDAC from my German colleague Dr. Holger Flick. He was asking about the relevance of my ClientDataSet book to some work he was doing with FireDAC. I replied that the book would help to some extent since so many aspects of Delphi database development were covered by that book, and that I had used FireDAC and InterBase for many of that book’s examples.

But his question got me to thinking about the FireDAC material that I had already written. I had four or five chapters from previous Delphi Developer Days, I had another three or four articles that I had published in software-related magazines, and I had several FireDAC presentations from CodeRage under my belt. I might have half a book there already. Why not, I thought, my next book will be a FireDAC book.

I don’t regret that decision at all, though I must say that even I was surprised at how much work it was to complete this book. This is my twenty-sixth book (and that’s not counting the eight Delphi Developer Days books that we’ve published since 2009). I know how much work it takes to write a book, but this one was different. The amount of research that this book required was a surprise.

For one thing, I felt that this book should be more than just a FireDAC book. It should be a book that deserves to be on the shelf of every Delphi database developer. For the new Delphi database developer who is unfamiliar with the “Delphi way” of doing things, this book contains discussions of and demonstrations of the essential techniques that every Delphi database developer needs to know. This includes concepts like the TDataSet interface, the current record, and how to read to and write from TFields. (Just a note here, this book assumes you are using Delphi XE6 or later.)

The advanced Delphi database developer, however, is not left out. These developers may simply want to scan some of the chapters where core concepts are reviewed, but there are many chapters that delve into some of the more powerful and exciting features of FireDAC, including virtual field management, cloned cursors, and cached updates.

So, the short story is that the book was a lot of work, and in the end, worth the effort.
The book begins with an overview of FireDAC, including its features and benefits. In chapter 2 you learn the many different ways to connect to your data, whether you are using one of the mainstream databases and a FireDAC native driver or are migrating from a legacy file-server database.

Chapter 3 explores how you configure FireDAC to control nearly every aspect of your data retrieval, in-memory management, and subsequent database writes. Here you learn about FireDAC dataset property inheritance, and how to fine tune configurations at the individual component level.

Chapters 4 and 5 demonstrate how you communicate with the underlying database using dataset components, queries, and stored procedures. Here I describe the capabilities of these components, as well as some of their basic configuration, including how to create and use parameterized query and stored procedure calls. I also cover how to use transactions, as well as how to monitor the database connections from your running applications.

Chapter 6 introduces the fundamentals of Delphi database development, introducing concepts like the current record, data-bound navigation and editing, as well as programmatic navigation and editing. Chapter 7 introduces the creation and use of indexes, while chapters 8 and 9 discuss searches and filtering, many techniques of which employee indexes.

These four chapters are specifically intended to provide a core understanding of data-related operations in Delphi. I expect the more advanced Delphi database developers to quickly scan chapter 6 for anything that doesn’t look familiar. However, even the advanced developer may glean new and useful information from a more thorough read of chapters 7 through 9, as several of the technical reviewers noted (and these guys are definitely advanced Delphi database developers).

The remaining chapters of this book are dedicated to more advanced FireDAC technologies that can enable sophisticated solutions in your database applications. Chapter 10 introduces virtual fields, and shows you how to use aggregates, Calculated (and InternalCalc) fields, and Lookup fields. It also examines the FieldsOptions property, a feature introduced in Delphi XE6.

In chapter 11 I cover how to persist your FireDAC datasets and FDSchemaAdapters to files and streams, as well as how to retrieve that data. There’s a lot of good stuff in that chapter, including how to control what data is persisted, and how data being loaded can interact with data that is already loaded.

In Chapter 12 and 13 I explore the FDMemTable. Here I discuss the role played by the FDMemTable within the FireDAC landscape, and then examine many of the techniques that are best suited for FDMemTables. Topics include the dynamic creation of FDMemTable structure, loading FDMemTables from other datasets, cloning cursors, and creating nested datasets.

In Chapter 14 I take an in-depth look at the SQL command preprocessor. Here you learn how to add tremendous flexibility to your SQL statements, features that permit you to run a common set of SQL statements across two or more different database servers. The SQL command preprocessor also gives you unprecedented control over expressions that you add to your SQL, introducing dozens of FireDAC scalar functions for your use.

Chapter 15 covers Array DML (Data Manipulation Language), a high-speed mechanism for executing a large number of similar parameterized queries, for instance, when you are inserting thousands of records into a given table with an INSERT SQL statement. When you need to update or insert a large amount of data quickly, this is your tool.

In Chapter 16 I examine a feature that I have been a champion of for years, cached updates. Here you will learn how to create, manage, and exploit cached updates to create advanced features for your applications. I also discuss both the decentralized and centralized models of cached updates, and provide important guidance for the process of applying updates and handling potential update failures.

I finish the book with a short chapter on Local SQL, demonstrating how to configure your FireDAC components to perform SQL queries on any Delphi dataset or combination of datasets. It’s a powerful technique that provides for solutions that would previously be difficult or impossible.

This has been a challenging while fun and rewarding project for me, and for those of you who buy my book, thank you! I hope you enjoy it.

Still interested? Learn more here: http://www.jensendatasystems.com/FireDACbook