Intraweb Framework
Skill53 starsChanged 8 months agoMITView on GitHub
Guides and standards for using the Intraweb stateful web framework in Delphi projects.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/acbr-patterns.mdCursor rule
- .cursor/rules/delphi-conventions.mdCursor rule
- .cursor/rules/design-patterns.mdCursor rule
- .cursor/rules/dext-patterns.mdCursor rule
- .cursor/rules/dmvc-patterns.mdCursor rule
- .cursor/rules/firebird-patterns.mdCursor rule
- .cursor/rules/horse-patterns.mdCursor rule
- .cursor/rules/intraweb-patterns.mdCursor rule
- .cursor/rules/memory-exceptions.mdCursor rule
- .cursor/rules/mysql-patterns.mdCursor rule
- .cursor/rules/postgresql-patterns.mdCursor rule
- .cursor/rules/refactoring.mdCursor rule
- .cursor/rules/solid-patterns.mdCursor rule
- .cursor/rules/tdd-patterns.mdCursor rule
- .cursor/rules/threading-patterns.mdCursor rule
- acbr-componentsSkill
- Delphi Clean CodeSkill
- Delphi Code ReviewSkill
- Delphi Memory and ExceptionsSkill
- Delphi SOLID PatternsSkill
- Design Patterns GoF — DelphiSkill
- DevExpress/DEXT ComponentsSkill
- Dext Framework PatternsSkill
- DelphiMVCFrameworkSkill
- DUnitX Testing PatternsSkill
- Firebird DatabaseSkill
- Horse FrameworkSkill
- MySQL DatabaseSkill
- PostgreSQL DatabaseSkill
- Delphi Code RefactoringSkill
- Delphi Test-Driven Development (TDD) and DUnitXSkill
- Threading & Multi-ThreadingSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Golden Rule: Do not use classic unit var global variables or Singleton instances for user data, since Intraweb applications run in a …
- Very specific: line 28
Use the OnAsyncClick property for DOM updates without full-screen postback.
- Very specific: line 52
Use iw concatenated with the native typologies:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Intraweb Framework - Spec-Kit
Intraweb is a VCL-for-the-Web framework that allows you to create stateful business web applications in a semantic way similar to creating Desktop applications. When dealing with Intraweb in Copilot or your project, consider the following best practices to ensure maintainability and scalability.
1. Sessions (UserSession) and Global Variables
Golden Rule: 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).
- To maintain user-specific data, strictly use the
UserSessionUnit.pasunit (ServerController.UserSessionInstance).
//❌ BAD: Incorrect Usage (Global scope variable serves all sessions, Multithreading problem)
var
LCustomerId: Integer;
//✅ GOOD: Correct Usage (Safe properties of the current context)
UserSession.CustomerId := 10;2. 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.
3. Non-Blocking User Interfaces (Asynchronous Callbacks)
In the web context, you should not use blocking code to "wait" for the user, such as ShowMessage, InputBox, or classic VCL ModalResults calls that rely on code locking on the same line.
- Use the
OnAsyncClickproperty for DOM updates without full-screen postback. - In Intraweb version 15 or newer, explore the capabilities of
WebApplication.ShowMessagecombined with Ajax calls and safe web interface interrupts.
//❌ BAD: Blocking the thread on the Intraweb
procedure TIWForm1.iwBtnSaveClick(Sender: TObject);
begin
if Application.MessageBox('Deseja salvar?', 'Confirme', MB_YESNO) = IDYES then
//Rescue code
end;
//✅ GOOD: Using Ajax Async from Intraweb
procedure TIWForm1.iwBtnSaveAsyncClick(Sender: TObject; EventParams: TStringList);
begin
WebApplication.ShowMessage('Registro Salvo via Callback Assíncrono!', smAlert);
end;4. Separation of Rules and UI
It is easy to build monstrous projects on the Intraweb by grouping the entire system rule behind the click (ex: num iwBtnProcessarAsyncClick). Follow the SRP (Single Responsibility Principle) principles:
- The form maps to the Controller request and re-renders components. The rules remain in the Application/Services layer.
- An Application/Service or Repository layer that is used in the Intraweb cannot couple or know the
IWApplicationunit (do not useWebApplication.ShowMessageamong persistence Services).
5. Naming of Visual Components (Intraweb Prefixes)
Use iw concatenated with the native typologies:
TIWButton->iwBtnSaveTIWEdit->iwEdtNameTIWLabel->iwLblTitleTIWComboBox->iwCmbStatusTIWGrid->iwGrdItemsTIWRegion->iwRegContainer
6. Dynamic HTML and Custom CSS
Despite being VCL-like, the massive stylizations in the components create large DOMS in the interface. Prefer to define external CSS files using ExtraHeader injection in the form and apply the Css property to the tags of the T visual components TIW* instead of manually painting the color of buttons and fonts via the Object Inspector.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

