Book Image

Expert Delphi - Second Edition

By : Marco Cantù, Paweł Głowacki
Book Image

Expert Delphi - Second Edition

By: Marco Cantù, Paweł Głowacki

Overview of this book

Master Delphi, the most powerful Object Pascal IDE and versatile component library for cross-platform native app development, by harnessing its capabilities for building natively compiled, blazingly fast apps for all major platforms, including Android, iOS, Windows, Mac, and Linux. Expert Delphi begins with a quick overview of Delphi, helping you get acquainted with the IDE and the Object Pascal language. The book then quickly progresses to more advanced concepts, followed by the architecture of applications and the FireMonkey library, guiding you through building server-side services, parallel programming, and database access. Toward the end, you’ll learn how to integrate your app with various web services and deploy them effectively. By the end of this book, you’ll be adept at building powerful, cross-platform, native apps for iOS, Android, Windows, and macOS—all from a single code base.
Table of Contents (21 chapters)
Free Chapter
1
Part 1: Building Blocks
6
Part 2: Going Mobile
12
Part 3: From Data to Services
19
Index

Creating a client app for RAD Server

Let’s now create a client application for the REST API we just built with RAD Server. We’ll do this by reusing the UI and some of the code from the previous versions:

  1. Create a new, blank multi-device project and save it as ToDoListEMS in the client folder.
  2. Keep the default name of the main form. It does not matter because in a moment we are going to remove it from the project.
  3. Add to the project the uToDoTypes and uToDoUtils units.
  4. Add a new data module to the client project. Save it as uDMToDoEMS and change its Name property to DMToDoEMS.
  5. Add uToDoTypes to its uses clause in the interface section and copy the five IToDoData interface method declarations from the uToDoTypes unit to the public section of the data module. The class should look like this:
    type
      TDMToDoEMS = class(TDataModule, IToDoData)
      private
        { Private declarations }
      public
      ...