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

Data-driven apps

In this chapter, we are going to go through the steps of building a simple mobile app with an embedded database for managing a list of todo items. Before jumping into coding, let’s first look into the overall application architecture. The more complex the system we want to build, the more important it is to properly structure it.

The typical approach is to divide and conquer; break a big problem into smaller problems that are simpler to solve. The most common approach in software development is to break the whole system into clearly separated tiers. In a data-driven app, we should be able to identify at least two logical parts: the UI and data access logic. Clear separation of these two tiers enables a plugin architecture, where the UI can connect to different data access blocks in a standard way and the UI can be replaced without touching the underlying data access layer.

In the context of a Delphi app, we can split our project into three independent...