Fearless Cross-Platform Development with Delphi: Expand your Delphi skills to build a new generation of Windows, web, mobile, and IoT applications
Learn to rapidly build and deploy cross-platform applications from a single codebase with practical, real-world solutions using the mature Delphi 10.4 programming environment
- Implement Delphi’s modern features to build professional-grade Windows, web, mobile, and IoT applications and powerful servers
- Become a Delphi code and project guru by learning best practices and techniques for cross-platform development
- Deploy your complete end-to-end application suite anywhere
Delphi is a strongly typed, event-driven programming language with a rich ecosystem of frameworks and support tools. It comes with an extensive set of web and database libraries for rapid application development on desktop, mobile, and internet-enabled devices. This book will help you keep up with the latest IDE features and provide a sound foundation of project management and recent language enhancements to take your productivity to the next level.
You’ll discover how simple it is to support popular mobile device features such as sensors, cameras, and GPS. The book will help you feel comfortable working with FireMonkey and styles and incorporating 3D user interfaces in new ways. As you advance, you’ll be able to build cross-platform solutions that not only look native but also take advantage of a wide array of device capabilities. You’ll also learn how to use embedded databases, such as SQLite and InterBase ToGo, synchronizing them with your own custom backend servers or modules using the powerful RAD Server engine. The book concludes by sharing tips for testing and deploying your end-to-end application suite for a smooth user experience.
By the end of this book, you’ll be able to deliver modern enterprise applications using Delphi confidently.
What you will learn
- Discover the latest enhancements in the Delphi IDE
- Overcome the barriers that hold you back from embracing cross-platform development
- Become fluent with FireMonkey controls, styles, LiveBindings, and 3D objects
- Build Delphi packages to extend RAD Server or modularize your applications
- Use FireDAC to get quick and direct access to any data
- Leverage IoT technologies such as Bluetooth and Beacons and learn how to put your app on a Raspberry Pi
- Enable remote apps with backend servers on Windows and Linux through REST APIs
- Develop modules for IIS and Apache web servers
Who this book is for
This book is for Delphi developers interested in expanding their skillset beyond Windows programming by creating professional-grade applications on multiple platforms, including Windows, Mac, iOS, Android, and back-office servers. You’ll also find this book useful if you’re a developer looking to upgrade your knowledge of Delphi to keep up with the latest changes and enhancements in this powerful toolset. Some Delphi programming experience is necessary to make the most out of this book.
Table of Contents
- Recent IDE Enhancements
- Delphi Project Management
- A Modern Day Language
- Multiple Platforms, One Code Base
- Libraries, Packages, and Components
- Live Bindings
- FireMonkey Styles
- Create “Stand-out” Interfaces Using 3D
- Mobile Data Storage
- Cameras, the GPS, and More
- Extending Delphi with Bluetooth, IoT, and Raspberry Pi!
- Console-Based Server Apps and Services
- Web Modules for IIS and Apache
- Using RAD Server
- Deploying an Application Suite
Fearless Cross-Platform Development with Delphi Contributors About the author About the reviewer Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Share Your Thoughts Section 1: Programming Power Chapter 1: Recent IDE Enhancements Understanding the Delphi IDE Delphi 10 Seattle Delphi 10.1 Berlin Delphi 10.2 Tokyo Delphi 10.3 Rio Delphi 10.4 Sydney Summary Questions Further reading Chapter 2: Delphi Project Management Technical requirements Creating a console application Building a Windows VCL application Starting a multi-device application Working with dynamic libraries Understanding packages Dealing with Android services Customizing your favorite project types Using build configurations effectively Build events Working with related projects Managing source modifications Looking through your code history Integrating source repositories Using the command-line tools for build automation Summary Questions Further reading Chapter 3: A Modern-Day Language Technical requirements Remembering Delphi's Pascal roots Reviewing the syntax Growing a language Adding objects to Pascal Promising functionality with interfaces Handling unknown data types Supporting nested types Migrating to Unicode Applying strong type checking generically Adding anonymous methods for cleaner code Adding metadata to your classes with attributes Learning about the latest enhancements Simplifying variable declaration Controlling initialization and the finalization of records Summary Questions Further reading Section 2: Cross-Platform Power Chapter 4: Multiple Platforms, One Code Base Technical requirements Moving to FireMonkey from the VCL Starting a new Windows FireMonkey project Migrating an existing Windows VCL application to use FireMonkey Preparing other platforms Preparing a Mac for cross-platform development Running your first cross-platform application Preparing for iOS development and deployment Preparing your PC to deploy to an Android device Working with various screen sizes Exploring target views Writing code to support multiple platforms Summary Questions Further reading Chapter 5: Libraries, Packages, and Components Technical requirements Sharing code in libraries Things to keep in mind for the Windows platform Loading libraries dynamically versus statically Things to keep in mind for non-Windows platforms Putting code into packages Working with package filenames Turning a package into a component Creating our first component Adding in the code to a component Adding design-time properties to a component Adding cross-platform support to components Summary Questions Further reading Chapter 6: All About LiveBindings Technical requirements Using the LiveBindings designer to get started quickly Using layers to group LiveBindings elements Revealing embedded component properties Creating magic with the LiveBindings Wizard Pulling in fields from a database Adding more controls through the wizard Prototyping custom objects at design time Swapping out prototype data for your own custom data Applying custom formatting and parsing to your bound data Getting to the BindingsList Customizing the display Parsing edited data Coding your own LiveBindings methods Summary Questions Further reading Chapter 7: FireMonkey Styles Technical requirements Understanding and using FireMonkey styles Loading style sets Selecting between multiple StyleBooks Accessing substyle definitions Customizing FireMonkey styles with the Style Designer Creating a default style for a control type Creating a custom style for a specific control Styling your applications with ease Quickly setting a single, application-wide style Customizing styles per form Managing style resources with code Summary Questions Further reading Chapter 8: Exploring the World of 3D Technical requirements Getting started with 3D in Delphi Adding 2D controls to a 3D form Adding basic and extruded shapes Showing lines for the axes Extruded shapes User-defined shapes Adding color, lighting, and movement Adding a light source to colors and textures Coloring extruded objects Adding animation Animating color Importing 3D models Changing the camera Multiple cameras Satellite camera Testing on phones Let's write a game! Implementing hidden clickable areas Activating and deactivating an object Mixing 2D and 3D controls for best use of each Working with layered objects at design time Deciding on the end game Summary Questions Further reading Section 3: Mobile Power Chapter 9: Mobile Data Storage Technical requirements Comparing different approaches Learning about InterBase's editions Introducing SQLite Managing databases Using the InterBase Server Manager and IBConsole Trying out SQLite Studio Setting up access to tables and queries Utilizing FireDAC, Delphi's cross-platform Data Access Component Getting table and query records from InterBase Getting table and query records from SQLite Deploying your database Deploying IBLite and IBToGo Updating data on a mobile device Understanding touch-oriented interfaces Summary Questions Further reading Chapter 10: Cameras, the GPS, and More Technical requirements Setting up Establishing a base Getting permission Setting up permissions for Android apps Using sensitive services on iOS Capturing your neighborhood Saving an image to the database Loading previously taken images Expanding your use of the camera Marking your spot Getting permission for location services Saving coordinates in the database Showing the location in the list view Mapping your way Setting up a Google Maps API key for Android Setting up your Delphi project to use Google Maps Plotting park points Changing the map style Sharing your pictures Summary Questions Further reading Chapter 11: Extending Delphi with Bluetooth, IoT, and Raspberry Pi Technical requirements Starting with Bluetooth Classic Configuring Classic Bluetooth Discovering and pairing devices Publishing Bluetooth services Connecting and communicating Learning about low-energy Bluetooth Utilizing beacons Setting up a beacon server app Finding and reacting to beacon messages Fencing your application Doing more with the Internet of Things Discovering and managing your device Getting data from IoT devices Using a Raspberry Pi Using Android to run your apps on a Raspberry Pi Summary Questions Further reading Section 4: Server Power Chapter 12: Console-Based Server Apps and Services Technical requirements Starting with console apps on Windows and Linux Installing the Windows subsystem for Linux Running our first Linux app Adding a simple database lookup module Testing the data module with a console app Providing remote server connectivity for clients Testing with a console client Logging activity Sending logs in two directions Adding a custom logging mechanism Creating a Windows service Logging to the Windows Event Log Adopting a Linux daemon Exposing your server to the world Modifying our client app to use the new server Summary Questions Further reading Chapter 13: Web Modules for IIS and Apache Technical requirements Surveying website-building options in Delphi Understanding the Web Server Application wizard Getting comfortable with the underlying framework Templating your HTML Building an ISAPI web module for IIS on Windows Logging from an ISAPI web module Getting started with the Apache HTTP server Installing and starting Apache on Windows Installing and starting Apache on Linux Writing cross-platform Apache web modules Deploying an Apache web module on Windows Deploying an Apache web module on Linux Summary Questions Further reading Chapter 14: Using the RAD Server Technical requirements Establishing a use case for RAD Server Considering an application's multi-user needs Enabling push notifications for registered devices Justifying the cost Getting familiar with what's included Running RAD Server on a development environment Using the RAD Server Management Console Writing modules to extend your server Using the wizard to create our first resource package Implementing MyParks for RAD Server Building a REST server without code Testing RAD Server with the REST Debugger Inserting, updating, and deleting data Modifying MyParks for use with RAD Server Setting up RAD Server connection components Sending updates back to RAD Server Summary Questions Further reading Chapter 15: Deploying an Application Suite Technical requirements Configuring for a wide audience Getting settings in desktop applications Updating a web module with dynamic settings Updating a RAD Server package with dynamic settings Reviewing mobile data storage locations Securing data Securing your server's data transmission Controlling access to resources Adding application security for RAD Server clients Protecting your hardware and operating system Adding a graphical touch Iconifying desktop apps Iconifying mobile apps Setting splash screen options on iOS Creating splash screens for Android Establishing product identity Including Windows version information Identifying your Apple product Identifying your Android product Testing for deployment Using virtual machines Testing the wide range of mobile devices Distributing the final product Installing RAD Server modules to production Selecting deployment configuration Deploying macOS and iOS applications Deploying an Android app Summary Questions Further reading Assessments Chapter 1 – Recent IDE Enhancements Chapter 2 – Delphi Project Management Chapter 3 – A Modern-Day Language Chapter 4 – Multiple Platforms, One Code Base Chapter 5 – Libraries, Packages, and Components Chapter 6 – All about LiveBindings Chapter 7 – FireMonkey Styles Chapter 8 – Exploring the World of 3D Chapter 9 – Mobile Data Storage Chapter 10 – Cameras, the GPS, and More Chapter 11 – Extending Delphi with Bluetooth, IoT, and Raspberry Pi Chapter 12 – Console-Based Server Apps and Services Chapter 13 – Web Modules for IIS and Apache Chapter 14 – Using RAD Server Chapter 15 – Deploying an Application Suite Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts
How to download source code?
1. Go to:
2. In the Find a repository… box, search the book title:
Fearless Cross-Platform Development with Delphi: Expand your Delphi skills to build a new generation of Windows, web, mobile, and IoT applications, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.