Delphi Cookbook - Second Edition

Over 60 hands-on recipes to help you master the power of Delphi for cross-platform and mobile development on multiple platforms

Delphi Cookbook - Second Edition

This ebook is included in a Mapt subscription
Daniele Teti

16 customer reviews
Over 60 hands-on recipes to help you master the power of Delphi for cross-platform and mobile development on multiple platforms
$39.99
$49.99
RRP $39.99
RRP $49.99
eBook
Print + eBook
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785287428
Paperback470 pages

Book Description

Delphi is a cross-platform Integrated Development Environment (IDE) that supports rapid application development for Microsoft Windows, Apple Mac OS X, Google Android, and Apple iOS. It helps you to concentrate on the real business and save yourself the pain of wandering amid GUI widget details, or having to tackle inter-platform incompatibilities. It also has a wide range of drag-and-drop controls, helping you code your business logic into your business model, and it compiles natively for desktop and mobile platforms.

This book will teach you how to design and develop applications, deploy them on the cloud platform, and distribute them within an organization via Google Play and other similar platforms.

You will begin with the basics of Delphi and get acquainted with JSON format strings, XSLT transformations, unicode encodings and various types of streams. We then move on to more advanced topics such as developing higher-order functions and using enumerators and RTTI. You will get an understanding of how Delphi RTL functions and how to use FireMonkey in a VCL application. We will then cover topics such as multithreading, using the parallel programming library and putting Delphi on a server. We will also take a look at the new feature of WebBroker Apache modules and then ride the mobile revolution with FireMonkey.

By the end of the book, you will be able to develop and deploy cross-platform applications using Delphi.

Table of Contents

Chapter 1: Delphi Basics
Introduction
Changing your application look and feel with VCL styles and no code
Changing the style of your VCL application at runtime
Customizing TDBGrid
Using owner draw combos and listboxes
Making an owner draw control aware of the VCL styles
Creating a stack of embedded forms
Manipulating JSON
Manipulating and transforming XML documents
I/O in the 21st century – knowing the streams
Creating a Windows service
Associating a file extension with your application on Windows
Be coherent with the Windows look and feel using TTaskDialog
Chapter 2: Becoming a Delphi Language Ninja
Introduction
Fun with anonymous methods – using higher-order functions
Writing enumerable types
RTTI to the rescue – configuring your class at runtime
Duck typing using RTTI
Creating helpers for your classes
Chapter 3: Knowing Your Friends – the Delphi RTL
Introduction
Check strings with regular expressions
Consuming RESTful services using native HTTP(S) client libraries
Cope with the encoded Internet world using System.NetEncodings
Save space using System.Zip
Decouple your code using a cross-platform publish/subscribe mechanism
Chapter 4: Going Cross-Platform with FireMonkey
Introduction
Giving a new appearance to the standard FireMonkey controls using styles
Creating a styled TListBox
Impressing your clients with animations
Using master/details with LiveBindings
Showing complex vector shapes using paths
Using FireMonkey in a VCL application
Reinventing your GUI also known as mastering Firemonkey controls, shapes, and effects
Chapter 5: The Thousand Faces of Multithreading
Introduction
Synchronizing shared resources with TMonitor
Talking with the main thread using a thread-safe queue
Synchronizing multiple threads using TEvent
Displaying a measure on a 2D graph like an oscilloscope
Using tasks to make your customer happier
Monitoring things using futures
Parallelize using the parallel for
Chapter 6: Putting Delphi on the Server
Introduction
Developing web client JavaScript applications with WebBroker on the server
Converting a console application to a Windows service
Serializing a dataset to JSON and back
Serializing objects to JSON and back using RTTI
Sending a POST HTTP request encoding parameters
Implementing a RESTful interface using WebBroker
Controlling remote application using UDP
Using app tethering to create a companion app
Creating DataSnap Apache modules
Creating WebBroker Apache modules
Using native HTTP(S) client libraries
Chapter 7: Riding the Mobile Revolution with FireMonkey
Introduction
Taking a photo, applying effects, and sharing it
Using TListView to show and search local data
Using SQLite databases to handle a to-do list
Do not block the main thread!
Using a styled TListView to handle long lists of data
Customizing the TListView
Taking a photo and location and sending it to a server continuously
Talking with the backend
Making a phone call from your app!
Tracking the application's lifecycle
Chapter 8: Using Specific Platform Features
Introduction
Using Android SDK Java classes
Using iOS Objective C SDK classes
Displaying PDF files in your app
Sending Android Intents
Letting your phone talk – using the Android TextToSpeech engine
Using Java classes in Android apps with Java2OP
Doing it in the background, the right way – Android services

What You Will Learn

  • Develop visually stunning applications using FireMonkey
  • Deploy LiveBinding effectively with the right OOP approach
  • Create server-side programs to serve RESTful web services and provide data to your mobile apps
  • Use well-defined GUI design patterns to build mobile applications that provide a great user experience
  • Build mobile apps that read data from a remote server efficiently
  • Call the platform native API on Android and iOS even for an unpublished API
  • Manage software customization for your customer by making better use of an extended RTTI
  • Implement the most popular design pattern without wasting too much time on debugging and bug fixing

Authors

Table of Contents

Chapter 1: Delphi Basics
Introduction
Changing your application look and feel with VCL styles and no code
Changing the style of your VCL application at runtime
Customizing TDBGrid
Using owner draw combos and listboxes
Making an owner draw control aware of the VCL styles
Creating a stack of embedded forms
Manipulating JSON
Manipulating and transforming XML documents
I/O in the 21st century – knowing the streams
Creating a Windows service
Associating a file extension with your application on Windows
Be coherent with the Windows look and feel using TTaskDialog
Chapter 2: Becoming a Delphi Language Ninja
Introduction
Fun with anonymous methods – using higher-order functions
Writing enumerable types
RTTI to the rescue – configuring your class at runtime
Duck typing using RTTI
Creating helpers for your classes
Chapter 3: Knowing Your Friends – the Delphi RTL
Introduction
Check strings with regular expressions
Consuming RESTful services using native HTTP(S) client libraries
Cope with the encoded Internet world using System.NetEncodings
Save space using System.Zip
Decouple your code using a cross-platform publish/subscribe mechanism
Chapter 4: Going Cross-Platform with FireMonkey
Introduction
Giving a new appearance to the standard FireMonkey controls using styles
Creating a styled TListBox
Impressing your clients with animations
Using master/details with LiveBindings
Showing complex vector shapes using paths
Using FireMonkey in a VCL application
Reinventing your GUI also known as mastering Firemonkey controls, shapes, and effects
Chapter 5: The Thousand Faces of Multithreading
Introduction
Synchronizing shared resources with TMonitor
Talking with the main thread using a thread-safe queue
Synchronizing multiple threads using TEvent
Displaying a measure on a 2D graph like an oscilloscope
Using tasks to make your customer happier
Monitoring things using futures
Parallelize using the parallel for
Chapter 6: Putting Delphi on the Server
Introduction
Developing web client JavaScript applications with WebBroker on the server
Converting a console application to a Windows service
Serializing a dataset to JSON and back
Serializing objects to JSON and back using RTTI
Sending a POST HTTP request encoding parameters
Implementing a RESTful interface using WebBroker
Controlling remote application using UDP
Using app tethering to create a companion app
Creating DataSnap Apache modules
Creating WebBroker Apache modules
Using native HTTP(S) client libraries
Chapter 7: Riding the Mobile Revolution with FireMonkey
Introduction
Taking a photo, applying effects, and sharing it
Using TListView to show and search local data
Using SQLite databases to handle a to-do list
Do not block the main thread!
Using a styled TListView to handle long lists of data
Customizing the TListView
Taking a photo and location and sending it to a server continuously
Talking with the backend
Making a phone call from your app!
Tracking the application's lifecycle
Chapter 8: Using Specific Platform Features
Introduction
Using Android SDK Java classes
Using iOS Objective C SDK classes
Displaying PDF files in your app
Sending Android Intents
Letting your phone talk – using the Android TextToSpeech engine
Using Java classes in Android apps with Java2OP
Doing it in the background, the right way – Android services

Book Details

ISBN 139781785287428
Paperback470 pages
Read More
From 16 reviews

Read More Reviews