Book Image

Mastering Delphi Programming: A Complete Reference Guide

By : Primož Gabrijelčič
Book Image

Mastering Delphi Programming: A Complete Reference Guide

By: Primož Gabrijelčič

Overview of this book

Delphi is a cross-platform Integrated Development Environment (IDE) that supports rapid application development for most operating systems, including Microsoft Windows, iOS, and now Linux with RAD Studio 10.2. If you know how to use the features of Delphi, you can easily create scalable applications in no time. This Learning Path begins by explaining how to find performance bottlenecks and apply the correct algorithm to fix them. You'll brush up on tricks, techniques, and best practices to solve common design and architectural challenges. Then, you'll see how to leverage external libraries to write better-performing programs. You'll also learn about the eight most important patterns that'll enable you to develop and improve the interface between items and harmonize shared memories within threads. As you progress, you'll also delve into improving the performance of your code and mastering cross-platform RTL improvements. By the end of this Learning Path, you'll be able to address common design problems and feel confident while building scalable projects. This Learning Path includes content from the following Packt products: Delphi High Performance by Primož Gabrijel?i? Hands-On Design Patterns with Delphi by Primož Gabrijel?i?
Table of Contents (19 chapters)

Builder

The last pattern from this chapter, builder, helps with creating complex objects or their representations. The general idea behind the pattern is to separate such a process into two parts: one gives instructions to an abstract builder interface, and another converts the instructions into a concrete representation. This allows us to create multiple representations from the same construction process.

The builder pattern is similar to an automated coffee/tea machine that always follows the same build process: put a cup on the tray, insert the correct beverage into the system, flow hot water through the system into the cup, and beep at the end. While the build process is always the same, the end result depends on a concrete implementation of step two.

The builder pattern is very similar to the abstract factory pattern. In both cases, the shared class uses an abstract interface...