Expert Delphi

Book description

Become a developer superhero and build stunning cross-platform apps with Delphi

About This Book

  • A one-stop guide on Delphi to help you build cross-platform apps
  • This book covers important concepts such as the FireMonkey library, shows you how to interact with the Internet of Things, and enables you to integrate with Cloud services
  • The code is explained in detail with observations on how to create native apps for Ios and Android with a single code base

Who This Book Is For

If you want to create stunning applications for mobile, desktop, the cloud, and the Internet of Things, then this book is for you. This book is for developers who would like to build native cross-platform apps with a single codebase for iOS and Android. A basic knowledge of Delphi is assumed, although we do cover a primer on the language.

What You Will Learn

  • Understand the basics of Delphi and the FireMonkey application platform as well as the specifics of Android and iOS platforms
  • Complete complex apps quickly with access to platform features and APIs using a single, easy-to-maintain code base
  • Work with local data sources, including embedded SQL databases, REST servers, and Backend-as-a-Service providers
  • Take full advantage of mobile hardware capabilities by working with sensors and Internet of Things gadgets and devices
  • Integrate with cloud services and data using REST APIs and scalable multi-tier frameworks for outstanding multi-user and social experience
  • Architect and deploy powerful mobile back-end services and get super-productive by leveraging Delphi IDE agile functionality
  • Get to know the best practices for writing a high-quality, reliable, and maintainable codebase in the Delphi Object Pascal language

In Detail

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.

Style and approach

This book will help you build cross-platform mobile apps with Delphi using a step-by-step approach.

Publisher resources

Download Example Code

Table of contents

  1. Preface
    1. What this book is not about
    2. Why Delphi?
    3. What this book covers
    4. What you need for this book
    5. Who this book is for
    6. Conventions
    7. Reader feedback
    8. Customer support
      1. Downloading the example code
      2. Errata
      3. Piracy
      4. Questions
  2. Fasten Your Seat Belts
    1. Delphi installation
      1. Delphi versions
      2. Running the Delphi installer
      3. Installing custom components
      4. IDE options
      5. Riding the Integrated Development Environment
    2. Delphi compilers and toolchains
    3. Hello World app
    4. Deploying to mobile devices
      1. Deploying to Android
      2. Deploying to iOS
    5. Summary
  3. Mind Your Language
    1. Do you speak Object Pascal?
      1. Program structure
      2. Console application
      3. Forms applications
    2. Object Pascal Phrase Book
      1. Tokens
      2. Constants
      3. Types
      4. Sets and arrays
      5. Helpers
      6. Generics
      7. Anonymous code
      8. Operator overloading
      9. Custom attributes
      10. Runtime Type Information
    3. Summary
  4. Packing Up Your Toolbox
    1. Parallel Programming Library
      1. Parallel loops
      2. Tasks
      3. Futures
    2. Working with files
    3. JSON
      1. Writing JSON
      2. Reading JSON
    4. XML
    5. Summary
  5. Playing with FireMonkey
    1. Drawing in code
    2. Get moving with timers
      1. Precise timing
    3. The power of parenting
      1. Shapes
      2. Animations
      3. Programmable effects
    4. Touch me
      1. Touch
      2. Gestures
      3. Multitouch
    5. Game of Memory
      1. Designing the game
      2. Working with images
      3. Designing a user interface
        1. Aligning, anchoring, and margins
        2. Layouts
      4. Building the games main form
      5. Storing the game's configuration
      6. The game's settings form
    6. Summary
  6. FireMonkey in 3D
    1. Cross-platform 3D rendering
    2. Using Context3D
    3. Custom Wireframe component
    4. Objects 3D
    5. Moving Earth
    6. Building an interactive 3D scene
    7. Using 3D models
    8. Starfield simulation
    9. Mixing 3D and 2D
    10. Summary
  7. Building User Interfaces with Style
    1. Working with built-in styles
    2. Using custom styles
    3. Embedding styles as resources
    4. Customizing styles
    5. Using frames
    6. Working with inherited views
    7. Previewing forms on devices
    8. Summary
  8. Working with Mobile Operating System
    1. James Bond's toy
    2. What I'm running on?
    3. The life of an app
    4. Sensing the world
    5. Taking photos
    6. Using share sheets
    7. Camera, light, action!
    8. Working with address book
    9. Notify me!
    10. Navigating the web
    11. Working with maps
    12. Creating and consuming Android services
    13. Delphi language bridges
      1. Vibrating on Android
      2. Vibrations on iOS
    14. Summary
  9. Extending to the Internet of Things
    1. Communication protocols
    2. Understanding BLE
    3. Connecting to things with ThingConnect
    4. Getting close with beacons
      1. Beacons in a museum
      2. Emulating beacons with TBeaconDevice
    5. Proximity solutions with BeaconFence
    6. App tethering
    7. Summary
  10. Embedding Databases
    1. Architecting data-driven apps
    2. Modeling data
    3. Choosing a database
    4. Accessing databases with FireDAC
    5. Building data-driven user interface
    6. Using visual live bindings
    7. Fast user interface prototyping
    8. Summary
  11. Integrating with Web Services
    1. Understanding web services
    2. Native HTTP client
    3. Consuming XML SOAP web services
    4. Integrating with REST services
    5. Backend as a service client
    6. Integrating with the cloud
      1. Moving ToDo List to Amazon S3
    7. Summary
  12. Building Mobile Backends
    1. Delphi and multi-tier architectures
    2. Getting low-level with WebBroker
      1. Organizing your WebBroker projects
    3. Do it yourself with DataSnap
      1. Implementing DataSnap server functionality
    4. Easy REST API publishing with RAD Server
      1. RAD Server setup
      2. Building resources
    5. Summary
  13. App Deployment
    1. Deploying to App Stores
      1. Publishing your apps to Apple iOS App Store
      2. Publishing your Android apps to Google Play Store
      3. Monetizing with adds and in-app purchases
    2. Enhancing your apps
      1. Practical version control
      2. Planning a release
      3. Development and refactorings
      4. Sleeping well with unit testing
      5. Continuous integration and deployment
    3. Summary
  14. The Road Ahead
    1. What we have learned
    2. Staying on top of everything
      1. Apps everywhere
      2. Serverless backends and NoSQL
      3. Internet of all kinds of things
    3. Your next Delphi mobile app
    4. Summary

Product information

  • Title: Expert Delphi
  • Author(s): Paweł Głowacki
  • Release date: June 2017
  • Publisher(s): Packt Publishing
  • ISBN: 9781786460165