Understanding the Basics of Delphi Programming

Team of hackers working hackathon at laptop in workshop
Hero Images / Getty Images

This series of articles is perfect for beginner developers as well as for those readers who welcome a broad overview of the art of programming with Delphi. Use it to prepare for a formal introductory Delphi training course or to refresh yourself with the principles of this versatile Web-programming language.

About the Guide

Developers will learn how to design, develop and test simple applications using Delphi.

The chapters will cover the fundamental elements of creating Windows applications using Delphi, including the Integrated Development Environment (IDE) and the Object Pascal language. Developers will get up to speed quickly through real-world, practical examples.

This course is aimed at readers who are new to programming, come from some other development environment (like MS Visual Basic, or Java) or are new to Delphi.

Prerequisites

Readers should have at least a working knowledge of the Windows operating system. No previous programming experience is required.

  • Recommended reading: Delphi history – from (Turbo) Pascal to Delphi 2005.
    Concise descriptions of Delphi versions and its history, along with a brief list of features and notes. Find out how Delphi evolved from Pascal to a RAD tool that can help you deliver high-performance, scalable applications ranging from desktop and database solutions to mobile and distributed applications for the Internet – not only for Windows but also for Linux and.NET.

    Chapters

    Start with Chapter 1: Introducing Borland Delphi

    Then continue learning -- this course already has more than 18 chapters!

    Current chapters include:

    CHAPTER 1:
    Introducing Borland Delphi
    What is Delphi? Where to download a free version, how to install and configure it.

    CHAPTER 2:
    A quick journey through the main parts and tools of the Delphi integrated development environment.

    CHAPTER 3:
    Creating your first *Hello World* Delphi Application
    An overview of application development with Delphi, including creating a simple project, writing code, compiling and running a project.

    Also, find out how to ask Delphi for help.

    CHAPTER 4:
    Learn about: properties, events and Delphi Pascal
    Create your second simple Delphi application allowing you to learn how to place components on a form, set their properties and write event-handler procedures to make components cooperate.

    CHAPTER 5:
    Take a closer look at exactly what each keyword means by examining each line of the Delphi from unit source code. Interface, implementation, uses and other keywords explained in easy language. 

    CHAPTER 6:
    An introduction to Delphi Pascal
    Before you start developing more sophisticated applications by using the RAD features of Delphi, you should learn the basics of the Delphi Pascal language.

    CHAPTER 7:
    Time to extend your Delphi Pascal knowledge to the max. Explore some intermediate Delphi problems for everyday development tasks.

    CHAPTER 8:
    Learn the art of helping yourself with code maintenance. The purpose of adding comments to Delphi code is to provide more program readability using understandable descriptions of what your code is doing.

    CHAPTER 9:
    Cleaning your Delphi code errors
    A discussion on Delphi design, run and compile time errors and how to prevent them. Also, take a look at some solutions to most common logic errors.

    CHAPTER 10:
    Your First Delphi Game: Tic Tac Toe
    Designing and developing a real game using Delphi: Tic Tac Toe.

    CHAPTER 11:
    Your First MDI Delphi Project
    Learn how to create a powerful "multiple document interface" application using Delphi.

    CHAPTER 12:
    Win a copy of Mastering Delphi 7
    Delphi Programming Tic Tac Toe Contest -- develop your own version of the TicTacToe game and win one copy of the great Mastering Delphi 7 book.

    CHAPTER 13:
    It's time to learn how to let Delphi help you code faster: start using code templates, code insight, code completion, shortcut keys and other time-savers.

    CHAPTER 14:
    In just about every Delphi application, we use forms to present and retrieve information from users. Delphi arms us with a rich array of visual tools for creating forms and determining their properties and behavior. We can set them up at design time using the property editors and we can write code to re-set them dynamically at runtime.

    CHAPTER 15:
    Communicating Between Forms
    In "Making Forms Work - a Primer" we looked at simple SDI forms and considered some good reasons for not letting your program auto-create forms. This chapter builds on that to demonstrate techniques available when you close modal forms and how one form can retrieve user input or other data from a secondary form.

    CHAPTER 16:
    Creating flat (non-relational) databases with no database components
    Delphi Personal edition does not offer database support. In this chapter, you will find out how to create your own flat database and store any kind of data -- all without a single data aware component.

    CHAPTER 17:
    Working with units
    While developing a large Delphi application, as your program becomes more complex, its source code can become hard to maintain.Learn about creating your own code modules - Delphi code files that contain logically associated functions and procedures. Along the way we'll briefly discuss using Delphi's built-in routines and how to make all the units of a Delphi application cooperate.

    CHAPTER 18:
    How to be even more productive with Delphi IDE (the code editor): start using code navigation features - quickly jump from a method implementation and a method declaration, locate a variable declaration using tooltip symbol insight features, and more.