Book Image

Expert Delphi

By : Paweł Głowacki
Book Image

Expert Delphi

By: Paweł Głowacki

Overview of this book

Delphi is the most powerful Object Pascal IDE and component library for cross-platform native app development. It enables building natively compiled, blazingly fast apps for all major platforms including Android, iOS, Windows, Mac, and Linux. If you want to build server-side applications, create web services, and have clear GUIs for your project, then this book is for you. The book begins with a basic primer on Delphi helping you get accustomed to the IDE and the Object Pascal language and will then quickly move on to advanced-level concepts. Through this book, we’ll help you understand the architecture of applications and will teach you the important concepts of the FireMonkey library, show you how to build server-side services, and enable you to interact with the Internet of Things. Towards the end, you will learn to integrate your app with various web services and deploy them. By the end of the book, you will be able to build powerful, cross-platform, native apps for iOS and Android with a single code base.
Table of Contents (14 chapters)

What this book covers

Chapter 1, Fasten Your Seat Belts, covers how to install Delphi and prepare it for mobile cross-platform development. We'll build a Hello World FireMonkey app and natively compile it from the same source code to Android and iOS.

Chapter 2, Mind Your Language, reviews the basic constructs of the Object Pascal programming language used in Delphi. After covering the fundamentals, we'll quickly move on to the discussion of more advanced language concepts used in FireMonkey programming, including class helpers, generics, anonymous code, and Runtime Type Information.

Chapter 3, Packing Up Your Toolbox, covers some of the most useful, everyday programmer skills, such as writing multithreaded code with parallel programming library and working with JSON and XML.

Chapter 4, Playing with FireMonkey, teaches the basics of building cross-platform mobile GUI with FireMonkey. you'll learn how to use shapes, effects, and animation components. We'll cover working with touch, multitouch, and gestures. At the end of this chapter, we'll write the complete mobile Game of Memory game.

Chapter 5, FireMonkey in 3D, explores how to build stunning interactive 3D graphical user interfaces, including working with wireframes, 3D controls, and importing 3D models into your Delphi apps.

Chapter 6, Building User Interfaces with Style, covers FireMonkey styling. We'll look into using built-in styles and custom styles with TStyleBook component, and customizing the styles with embedded Style Editor. We'll also cover working with frames and using inherited views for specific mobile form factors.

Chapter 7, Working with Mobile Operating System, covers how to access mobile hardware and operating systems with high-level components abstracting away underlying mobile APIs. We'll look into working with sensors, camera, address book, embedding web browsers, using maps, creating and consuming Android services, and working with language bridges for accessing APIs and frameworks not surfaced through the FireMonkey library.

Chapter 8, Extending to the Internet of Things, teaches how to build cross-platform mobile apps that communicate with IoT sensors and devices using Bluetooth LE communication protocol. We'll look into working with the TBluetoothLE components and also using specialized IoT components available via the GetIt Package Manager. We'll also cover building proximity-enabled apps that work with beacons using the TBeacon components and BeaconFence. The App Tethering framework is discussed as well for easy communication between mobile apps.

Chapter 9, Embedding Databases, covers building a To-Do List mobile app illustrating best practices for architecting data-driven solutions with a clear separation between user interface and data access layers. We use FireDAC database access framework for communicating with embedded SQLite mobile database and build user interface with the TListView component with dynamic appearance.

Chapter 10, Integrating with Web Services, looks at different Delphi frameworks and components for integrating with web services. We start from low-level native HTTP client library, consuming XML SOAP web services, and moving on to the REST and BaaS client components. In the last part, we will look into Cloud API for integrating with the Amazon and Azure clouds. We also replace the To-Do List app data access tier with logic to store JSON data in the Amazon Simple Storage Service (S3).

Chapter 11, Building Mobile Backends, explores building scalable multitier systems with Delphi. You'll learn how to build mobile backends with different Delphi frameworks, including WebBroker, DataSnap, and the RAD Server. During the course of this chapter, we will split the To-Do List app into separate client and server parts.

Chapter 12, App Deployment, covers practical steps of deploying Delphi mobile apps to the Google Play Store and the Apple iOS App Store. We'll also look at best agile practices for continuous enhancement of your apps with using version control, refactorings, and unit testing.