Book Image

Delphi Cookbook - Second Edition

By : Daniele Teti
Book Image

Delphi Cookbook - Second Edition

By: Daniele Teti

Overview of this book

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 (15 chapters)
Delphi Cookbook Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Taking a photo, applying effects, and sharing it


This recipe will introduce the mobile development world using a simple app that shows how to take a photo directly from the camera or from the photo library, apply some effects to it, and then share it using one of the installed apps on the device.

Getting ready

This recipe makes extensive use of Delphi actions. Actions are an implementation of the GoF Command design pattern and have been an important tool for the Delphi developer since the initial versions of Delphi. You can use them as much as you like. In the mobile era, actions are even more important and useful. Indeed, actions can be used to execute common tasks such as taking a photo with the camera, getting a photo from the library, or sharing some content with the other apps. Here's how our app will look:

The Photo with Effects app, with buttons on the top; three out of the four buttons are bound to standard actions

How to do it…

Now we are about to create our first FireMonkey mobile app...