
Hands-On Design Patterns with Delphi
Build applications using idiomatic, extensible, and concurrent design patterns in Delphi
- 476 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Hands-On Design Patterns with Delphi
Build applications using idiomatic, extensible, and concurrent design patterns in Delphi
About this book
Get up to speed with creational, structural, behavioral and concurrent patterns in Delphi to write clear, concise and effective code
Key Features
- Delve into the core patterns and components of Delphi in order to master your application's design
- Brush up on tricks, techniques, and best practices to solve common design and architectural challenges
- Choose the right patterns to improve your program's efficiency and productivity
Book Description
Design patterns have proven to be the go-to solution for many common programming scenarios. This book focuses on design patterns applied to the Delphi language. The book will provide you with insights into the language and its capabilities of a runtime library.
You'll start by exploring a variety of design patterns and understanding them through real-world examples. This will entail a short explanation of the concept of design patterns and the original set of the 'Gang of Four' patterns, which will help you in structuring your designs efficiently. Next, you'll cover the most important 'anti-patterns' (essentially bad software development practices) to aid you in steering clear of problems during programming. You'll then learn about the eight most important patterns for each creational, structural, and behavioral type. After this, you'll be introduced to the concept of 'concurrency' patterns, which are design patterns specifically related to multithreading and parallel computation. These will enable you to develop and improve an interface between items and harmonize shared memories within threads. Toward the concluding chapters, you'll explore design patterns specific to program design and other categories of patterns that do not fall under the 'design' umbrella.
By the end of this book, you'll be able to address common design problems encountered while developing applications and feel confident while building scalable projects.
What you will learn
- Gain insights into the concept of design patterns
- Study modern programming techniques with Delphi
- Keep up to date with the latest additions and program design techniques in Delphi
- Get to grips with various modern multithreading approaches
- Discover creational, structural, behavioral, and concurrent patterns
- Determine how to break a design problem down into its component parts
Who this book is for
Hands-On Design Patterns with Delphi is aimed at beginner-level Delphi developers who want to build scalable and robust applications. Basic knowledge of Delphi is a must.
Tools to learn more effectively

Saving Books

Keyword Search

Annotating Text

Listen to it instead
Information
Section 1: Design Pattern Essentials
Introduction to patterns
- What design patterns are
- Why patterns are useful
- The difference between patterns and idioms
- The origins of design patterns
- The classification of common patterns
- Pattern misuse and anti-patterns
Patterns in programming
Patterns are useful
type
TSparseRec = record
IsEmpty: boolean;
Value : integer;
end;
TSparseArray = TArray<TSparseRec>;
for i := Low(data) to High(data) do
if not data[i].IsEmpty then
Process(data[i].Value);
type
Nullable<T> = record
...
property HasValue: Boolean read GetHasValue;
property Value: T read GetValue;
end;
You can then redefine TSparseArray as an array of Nullable<integer>, as the following code:
type
TSparseArray = TArray<Nullable<integer>>;
procedure Iterate(const data: TSparseArray; const iterator: TProc<integer>);
var
i: Integer;
begin
for i := Low(data) to High(data) do
if not data[i].IsEmpty then
iterator(data[i].Value);
end;
Table of contents
- Title Page
- Copyright and Credits
- About Packt
- Contributors
- Preface
- Section 1: Design Pattern Essentials
- Introduction to patterns
- Section 2: Creational Patterns
- Singleton, Dependency Injection, Lazy Initialization, and Object Pool
- Factory Method, Abstract Factory, Prototype, and Builder
- Section 3: Structural Patterns
- Composite, Flyweight, Marker Interface, and Bridge
- Adapter, Proxy, Decorator, and Facade
- Section 4: Behavioral Patterns
- Nullable Value, Template Method, Command, and State
- Iterator, Visitor, Observer, and Memento
- Section 5: Concurrency Patterns
- Locking patterns
- Thread pool, Messaging, Future and Pipeline
- Section 6: Miscellaneous Patterns
- Designing Delphi Programs
- Other Kinds of Patterns
- Other Books You May Enjoy
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app