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

Working at a low level with WebBroker

The most simple and generic web server development framework in Delphi is WebBroker. It is the underlying technology for many specialized web service types that you can build with Delphi, such as SOAP XML web services, DataSnap, and RAD Server. If you create a new web server app with the New WebBroker App wizard, you can implement arbitrary HTTP server functionality. In our case, that will be a simple web service that will provide REST API access to a new version of the Todo application.

Here are the steps to start building our first WebBroker server application:

  1. Click on File | New | Other in the IDE and double-click on the Web Server Application wizard in the Web category.
  2. On the first page of the wizard, titled Platform, you have the option to indicate the target platforms. Windows is required, and you can add Linux if you want. I recommend enabling it if your version of Delphi supports it.
  3. On the second page of the wizard...