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

Creating DataSnap Apache modules


One of the most awaited Delphi features by server-side Delphi developers is the support for the building of Apache webserver modules. Since Delphi XE6, Delphi can generate Apache modules, and this is very good news! The most recent Apache versions are supported: 2.0, 2.2, and 2.4. An Apache module is compatible only with the specific version for which has been compiled. So be sure about the Apache version you have to deploy your module before you create the project. However, it's possible to change the target Apache version by just changing a unit name.

Getting ready

In this recipe, we'll create a very simple REST service, with only one method returning a list of people. The service will be built using the Embarcadero DataSnap framework and the service itself will be packaged as an Apache webserver module. The real goal of this recipe is to show how to use the Delphi strength in creating Apache module, and a very light intro to DataSnap.

How to do it…

This recipe...