developer-delphi-patterns-creational

Implement canonical creational design patterns in Delphi projects.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-delphi-patterns-creational
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developer-delphi-patterns-creational
Source: https://github.com/cslsoftwares/ParamentersORM/tree/main/.cursor/skills/developer-delphi-patterns-creational_V1.1.0
Command: npx skills add https://github.com/cslsoftwares/ParamentersORM --skill developer-delphi-patterns-creational

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Delphi projects often hard-code object creation, leading to tight coupling and hard-to-test code. This skill provides canonical creational patterns (Factory Method, Abstract Factory, Builder, Singleton, Prototype, and Object Pool) to decouple creation from usage and promote reusable, testable designs.

Core Features & Use Cases

  • Factory Method and Abstract Factory for flexible object creation across families of products.
  • Builder pattern for constructing complex objects step by step with fluent interfaces.
  • Singleton for controlled, thread-safe single instances.
  • Prototype for object cloning with state preservation.
  • Object Pool for reusing expensive-to-create objects in high-load scenarios.
  • Real-world Examples: see exemplos/ for canonical Delphi implementations.

Quick Start

Open the exemplos/ directory and implement a selected creational pattern using the canonical Delphi templates.

Frequently Asked Questions about developer-delphi-patterns-creational

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement creational design patterns in Delphi to decouple object creation?

Delphi creational patterns decouple object creation from usage by providing canonical implementations of Factory Method, Abstract Factory, Builder, Singleton, Prototype, and Object Pool. You can implement them using sample PAS files found in the exemplos directory.

What is the best way to construct complex Delphi objects step by step?

The Builder pattern constructs complex objects step by step using fluent interfaces. This Delphi implementation provides a canonical template for building intricate object configurations while maintaining readable and testable code.

How do I create a thread-safe Singleton instance in Delphi?

A thread-safe Singleton in Delphi provides a controlled, single instance of a class. This pattern is included to ensure safe access to shared resources without risking concurrent instantiation conflicts.

When do I need an Object Pool pattern for high-load Delphi applications?

An Object Pool is needed in high-load Delphi scenarios to reuse expensive-to-create objects. Instead of instantiating and destroying objects repeatedly, the pool manages available instances to reduce memory allocation overhead and improve performance.

Can I use Abstract Factory to manage families of related objects in Delphi?

Abstract Factory manages families of related objects in Delphi by providing an interface for creating objects without specifying their concrete classes. It enables flexible object creation across product families while maintaining interface-driven design.

Does this Skill provide actual Delphi source code examples for design patterns?

Yes, the Skill provides example-driven guidance with sample PAS files located in the exemplos directory. These canonical Delphi templates allow you to directly open and implement selected creational patterns in your projects.