Intraweb Framework

Guide Delphi developers in implementing Intraweb web applications with session handling and separation of concerns.

48|12|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/delphicleancode/delphi-spec-kit --skill intraweb-framework
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Intraweb Framework
Source: https://github.com/delphicleancode/delphi-spec-kit/tree/main/.gemini/skills/intraweb-framework
Command: npx skills add https://github.com/delphicleancode/delphi-spec-kit --skill intraweb-framework

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Intraweb is a VCL-for-the-Web framework that allows you to create stateful business web applications in Delphi projects. When dealing with Intraweb in Copilot or your project, consider the following best practices to ensure maintainability and scalability.

Core Features & Use Cases

  • Sessions (UserSession) and Global Variables: Do not use classic unit var global variables or Singleton instances for user data, since Intraweb applications run in a Multithread environment with concurrent sessions (each user has their own). Use ServerController.UserSession for per-session data.
  • ServerController and Configuration: The global system parameters, database connection pool and initializations that do not depend on the user must be resolved in the ServerController (IWServerController.pas) object. Avoid injecting heavy dependencies and direct database scopes in TIWAppForm.
  • Non-Blocking User Interfaces (Asynchronous Callbacks): In the web context, you should not use blocking code to "wait" for the user. Use OnAsyncClick and Ajax-like flows to avoid blocking, and consider WebApplication.ShowMessage for non-blocking interactions.

Quick Start

Create a new Delphi Intraweb project and apply the framework’s naming conventions, session handling rules, and separation of concerns guidelines.

Frequently Asked Questions about Intraweb Framework

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

FAQPage Schema
How do I manage user data in Intraweb applications without causing thread conflicts?

In Intraweb applications, you must manage user data by accessing the ServerController.UserSession object. This ensures safe per-session data isolation in the framework's multithreaded environment, preventing conflicts that arise from using global variables.

Why should I avoid global variables in Delphi Intraweb projects?

You should avoid global variables in Delphi Intraweb projects because the web framework runs in a multithreaded environment with concurrent sessions. Using unit-level globals or singletons for user data breaks session isolation, so use ServerController.UserSession instead.

Where should I initialize database connection pools in an Intraweb web framework?

Database connection pools and global system parameters must be initialized in the ServerController (IWServerController.pas) object. This separates global configuration from user interface logic, avoiding heavy dependency injection directly into TIWAppForm classes.

How do I handle non-blocking user interactions in Delphi web apps?

To handle non-blocking user interactions in Delphi web apps, implement OnAsyncClick callbacks and Ajax-like flows. You should also use WebApplication.ShowMessage for alerts to avoid blocking code execution while waiting for user input.

What is the best way to structure Delphi web apps using the Intraweb framework?

The best way to structure Delphi Intraweb web apps is by enforcing strict separation of concerns and consistent naming conventions. Place global initializations in ServerController and isolate per-session user data within UserSession modules.