IntraWeb Framework Patterns

Store per-user IntraWeb state in UserSession and derive forms from TIWAppForm.

17|7|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/delphicleancode/lazarus-spec-kit --skill intraweb-framework-patterns
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: IntraWeb Framework Patterns
Source: https://github.com/delphicleancode/lazarus-spec-kit/tree/main/.gemini/skills/intraweb-framework
Command: npx skills add https://github.com/delphicleancode/lazarus-spec-kit --skill intraweb-framework-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

IntraWeb apps often misuse global variables and non-isolated data, leading to cross-session data leaks and unstable behavior. This Skill provides safe patterns to manage per-user state using UserSession and to structure UI with TIWAppForm inheritance and per-request DataModules.

Core Features & Use Cases

  • Enforces per-user state storage via UserSession to prevent cross-session leakage.
  • Enforces TIWAppForm-based forms and per-thread DataModule instantiation to align with IntraWeb's multithreaded model.
  • Provides guidelines for secure data access, session lifecycle, and scalable UI patterns in Lazarus/FreePascal web projects.

Quick Start

Adote os padrões de IntraWeb em Lazarus refatorando acessos globais para propriedades de UserSession e herdando formulários de TIWAppForm.

Frequently Asked Questions about IntraWeb Framework Patterns

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

FAQPage Schema
How do I manage state in IntraWeb applications without causing cross-session data leaks?▼

Use per-thread DataModule instantiation and store per-user data in UserSession properties instead of global variables. This prevents cross-session data leakage by isolating database connections and state within IntraWeb's multithreaded environment.

Why does my IntraWeb app share data between different user sessions?▼

IntraWeb shares data between sessions when global variables or non-isolated database connections are used. Refactor your Lazarus app to store state in UserSession properties and create per-thread DataModules to enforce session isolation.

How do I structure user interfaces safely in Lazarus IntraWeb projects?▼

Structure Lazarus IntraWeb UIs by deriving forms from TIWAppForm. This enforces thread-safe UI patterns, aligns with IntraWeb's multithreaded model, and maintains proper session lifecycle management.

Can I use global database connections with IntraWeb in FreePascal web projects?▼

Global database connections break thread safety in IntraWeb FreePascal projects. Create per-thread DataModules to ensure isolated data access per request and prevent unstable application behavior.

What is the best way to handle thread-safe session data in IntraWeb?▼

The best way to handle thread-safe session data in IntraWeb is leveraging UserSession properties. This isolates per-user state securely and prevents the cross-session leaks inherent to using global variables.

Does IntraWeb require per-request DataModules for scalable Lazarus web apps?▼

IntraWeb requires per-thread DataModule instantiation for scalable Lazarus web apps to maintain data access isolation. This aligns with IntraWeb's multithreaded model and ensures secure session lifecycle management without cross-session interference.