Move small tasks from wishlist to todo, update npm packages Replace #[Auth] attributes with manual auth checks and code quality rule Remove on_jqhtml_ready lifecycle method from framework Complete ACL system with 100-based role indexing and /dev/acl tester WIP: ACL system implementation with debug instrumentation Convert rsx:check JS linting to RPC socket server Clean up docs and fix $id→$sid in man pages, remove SSR/FPC feature Reorganize wishlists: priority order, mark sublayouts complete, add email Update model_fetch docs: mark MVP complete, fix enum docs, reorganize Comprehensive documentation overhaul: clarity, compression, and critical rules Convert Contacts/Projects CRUD to Model.fetch() and add fetch_or_null() Add JS ORM relationship lazy-loading and fetch array handling Add JS ORM relationship fetching and CRUD documentation Fix ORM hydration and add IDE resolution for Base_* model stubs Rename Json_Tree_Component to JS_Tree_Debug_Component and move to framework Enhance JS ORM infrastructure and add Json_Tree class name badges 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.8 KiB
Executable File
2.8 KiB
Executable File
Core Framework Systems
Main_Abstract Middleware System
The framework provides application-wide middleware hooks via Main_Abstract:
Implementation
-
Create
/rsx/main.phpextendingMain_Abstractwith three methods:init()- Called once during bootstrappre_dispatch(Request $request, array $params)- Called before any route dispatchunhandled_route(Request $request, array $params)- Called when no route matches
-
Pre-dispatch flow:
- Main::pre_dispatch() called first
- Controller::pre_dispatch() called second
- If either returns non-null, dispatch halts with that response
-
Controller/API Method Signatures:
- All controller methods:
function method_name(Request $request, array $params = []) - All API methods:
function method_name(Request $request, array $params = []) $paramscontains GET query string parameters and URL-extracted route parameters (like:id)- POST data is accessed via
$request->post()or$request->input(), NOT in$params
- All controller methods:
Core JavaScript Classes
These classes are ALWAYS available - never check for their existence:
Rsx_Manifest- Manifest managementRsx_Storage- Browser storage (session/local) with scopingRsx- Core framework utilities- All classes in
/app/RSpade/Core/Js/
Use them directly without defensive coding:
// ✅ GOOD
Rsx_Manifest.define(...)
// ❌ BAD
if (typeof Rsx_Manifest !== 'undefined') {
Rsx_Manifest.define(...)
}
Dispatcher System
Maps HTTP requests to RSX controllers based on manifest data.
Autoloader System
Provides path-agnostic class loading - classes are found by name, not path.
Manifest System
Indexes all files in /rsx/ for automatic discovery and loading.
JQHTML Named Slots (v2.2.112+)
Child template syntax changed from <#slotname /> tags to content('slotname') function:
- Old:
<#header />(deprecated) - New:
<%= content('header') %>(v2.2.112+) - Parent syntax unchanged:
<#header>content</#header>
JQHTML Slot-Based Template Inheritance (v2.2.108+)
When component template contains ONLY slots (no HTML), it automatically inherits parent class template structure:
- Enables abstract base components with customizable slots
- Child templates define slot-only files to extend parent templates
- Parent templates call slots:
<%= content('slotname', data) %>(data passing supported) - JavaScript class must extend parent:
class Child extends Parent - Slot names cannot be JavaScript reserved words (enforced by parser)
JQHTML Define Tag Configuration
<Define> tag supports three attribute types:
extends="Parent"- Explicit template inheritance$property=value- Set default this.args values (unquoted=JS expression, quoted=string)- Regular HTML attributes (class, id, tag, data-*)
- Enables template-only components without JavaScript classes