Explore the Book
Language Basics
Structure, identifiers, typing, variables, constants, loops, conditionals, procedures, functions, units, error handling, pointers, and memory management.
Simple Types
Enumerated types, sets, integers, floating point types, dates, times, and numerical conversions.
OOP Fundamentals
Classes and objects, inheritance, and polymorphism basics in Delphi.
String Handling
The string type as a reference type, TStringBuilder, TStringList, regular expressions, and advanced Unicode support.
Featured Chapters
Delphi XE2 Foundations
Delphi XE2 Foundations by Chris Rolliston provides a detailed reference and conceptual overview of the Embarcadero Delphi XE 2 language and wider runtime library. Published in both printed and eBook versions, the book covers 15 chapters across three parts — from language basics and OOP fundamentals through to string handling, arrays, I/O, streams, packages, RTTI, native APIs, dynamic libraries, and multithreading.
The author began writing the book after Embarcadero reintroduced an entry-level edition of Delphi in February 2011, when the XE version was current. The printed version is available from CreateSpace and Amazon; the eBook is available from Amazon's Kindle store.
View Editions
What's Inside
Part One
Language basics, simple types including enumerations and numbers, and OOP fundamentals — covering the core building blocks of Delphi programming.
Part Two
String handling, arrays and collections, basic I/O for console applications, working with the file system, and advanced I/O with streams.
Part Three
Packages, dynamic typing, runtime type information (RTTI), native APIs, dynamic libraries, and multithreading — the advanced topics for professional Delphi development.
Delphi XE2 Foundations provides a thorough introduction to the fundamental building blocks of the Delphi language, starting with structure, identifiers, and the type system. Readers learn how variables and constants are declared, how loops and conditionals control program flow, and how procedures and functions encapsulate reusable logic. The book also covers units as the primary mechanism for organising source code, along with error handling strategies that help developers write resilient applications. Pointers and memory management receive dedicated attention, ensuring that even low-level concepts are explained clearly for those building performance-critical software.
A substantial portion of the book is devoted to simple types, which form the bedrock of data representation in Delphi. Enumerated types and sets are explored in detail, showing how they can make code both more readable and more maintainable. Integer and floating-point types are examined with an emphasis on range, precision, and conversion behaviour. The treatment extends to dates, times, and numerical conversions, equipping developers with the knowledge to handle real-world data accurately and to avoid common pitfalls associated with type mismatches and overflow conditions.
Object-oriented programming is a cornerstone of modern Delphi development, and Delphi XE2 Foundations dedicates significant space to its core principles. The discussion begins with classes and objects, explaining how they model real-world entities and encapsulate state and behaviour. Inheritance is presented as a powerful mechanism for extending and specialising existing types, while polymorphism enables flexible, extensible designs. By grounding these concepts in practical Delphi examples, the book helps developers move confidently from procedural code to well-structured, object-oriented applications that are easier to maintain and evolve over time.
String handling in Delphi is richer than many developers realise, and the book unpacks this topic with considerable depth. The native string type is examined as a reference type with unique characteristics that distinguish it from simpler data structures. Utility classes such as TStringBuilder and TStringList are introduced for efficient string manipulation and list management. Regular expressions receive their own treatment, offering powerful pattern-matching capabilities for text processing. Advanced Unicode support is also covered, reflecting the global nature of modern software and the importance of correct international text handling.
Beyond the core language features, the book explores the wider runtime library that ships with Delphi XE2. Streams, XML handling, registry access, and INI file support are all addressed, giving developers the tools to manage configuration, persistence, and data interchange in their applications. The treatment of packages demonstrates how to modularise code for reuse and deployment, while the coverage of typing expressions and extended RTTI opens the door to advanced reflection-based techniques. These chapters bridge the gap between language syntax and real-world application development.
Multithreading is a critical skill for building responsive, high-performance software, and Delphi XE2 Foundations provides a clear introduction to the subject. The book explains how to create and manage threads within Delphi applications, addressing synchronisation, shared resource protection, and common concurrency pitfalls. By working through practical examples, developers gain an understanding of how to offload background work without compromising the responsiveness of the user interface. This knowledge is increasingly important as multi-core processors become the norm in both desktop and server environments.
The book is available in both printed and eBook formats, with the electronic edition thoughtfully divided into three parts for convenient access. Each version includes accompanying sample code that illustrates the concepts discussed in the text, allowing readers to experiment and reinforce their understanding through hands-on practice. The code examples are designed to be clear and focused, avoiding unnecessary complexity while demonstrating real-world usage patterns. This combination of detailed exposition and practical samples makes the book suitable for both systematic study and quick reference during development work.
Delphi XE2 Foundations is structured to serve as both a tutorial for newcomers and a reference for experienced developers returning to the platform. The table of contents is organised logically, moving from language fundamentals through to advanced topics such as native APIs and third-party library integration. Each chapter builds on preceding material while remaining sufficiently self-contained to support focused reading on specific subjects. Supplementary resources, including errata and an FAQ section, help readers stay current with any clarifications or updates related to the content.
The author brings a clear, measured writing style to the material, avoiding unnecessary jargon while still treating each subject with appropriate technical rigour. Feedback from readers has consistently highlighted the book's practical focus and its value as a day-to-day development companion. Screenshots and diagrams are used where they aid comprehension, and the overall design of both the printed and digital editions prioritises readability. For anyone working with Embarcadero Delphi XE2, whether maintaining existing systems or starting new projects, the book offers a reliable and comprehensive foundation.