advpl-mvc

Community

Build modern Protheus MVC with safe hooks.

AuthorJoniPraia
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps you implement the correct modern MVC pattern in Protheus (FWMVC), avoiding legacy deprecations and unsafe validation/commit hooks that can break transactions or corrupt behavior.

Core Features & Use Cases

  • Modern MVC skeleton: provides the required trio of MenuDef(), ModelDef(), and ViewDef() with a consistent, production-oriented structure.
  • Model hooks with FWModelEvent: guides using oModel:InstallEvent() and FWModelEvent (BeforeTTS, InTTS, AfterTTS) instead of deprecated bCommit/bTudoOk patterns.
  • Headless vs interactive execution: explains when to use FWExecView (UI) versus FWMVCRotAuto (batch/PE/Job) and how to pass model data for automatic routines.
  • Sub-models and grids: supports header + detail patterns using AddFields, AddGrid, SetRelation, and grid constraints like SetUniqueLine.

Quick Start

Use the advpl-mvc Skill to refactor your legacy AxCadastro/Modelo2/Modelo3 routine into a modern MVC source by creating MenuDef, ModelDef with FWModelEvent hooks, and a ViewDef wired to the model.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: advpl-mvc
Download link: https://github.com/JoniPraia/plugadvpl/archive/main.zip#advpl-mvc

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.