๐งฉ Architecture & Core Logic
- Super Powers
- Joomla Powers
- Compile Native Components, Plugins & Modules
- Multi-Version Support
- Conditional Logic Injection
- Reusable Admin Views
- Dynamic GET Builder
- Round-Trip Code Integration
- Custom Admin Views
- Site Views
- Dynamic Dashboards
- Model Linking Between Views
- Shared Field Reuse Across Views
- Drag & Drop Field Mapping
- Dynamic Field Visibility
- Independent Packaging
๐ Joomla CMS Integration
๐งฑ Custom Code System (Powerful Dual Feature)
๐ Field Type System
๐ Snippets, Templates, Layouts, Libraries
- Snippets Reusable Html Blocks
- Layouts Reusable Php Render Templates
- Templates Page Level Views Linked To Custom Admin Site Views
- Libraries JS CSS Assets Linked To UI
- CDN Local Toggle For Library Delivery
- Media Folder Injection With Override Support
- Repository Push Pull Reset Workflow
- Init Snippets Layouts Templates Via Gui
๐ฆ Packages
๐งฉ Architecture & Core Logic
๐ File & Code Management
๐ง Code Reuse & Blueprints
๐ Joomla CMS Integration
๐จ Visual GUI & UX
๐ Internationalization
๐ฆ Packaging & Distribution
โ๏ธ Compiler Engine Features
๐งฑ Custom Code System
๐ Field Type System
๐ Dynamic GET (Visual SQL Engine)
๐ Snippets, Templates, Layouts, Libraries
๐ Documentation & Metadata
๐ Analytics & Insights
๐งฉ Architecture & Core Logic
- Super Powers
- Joomla Powers
- Compile Native Components, Plugins & Modules
- Multi-Version Support
- Conditional Logic Injection
- Reusable Admin Views
- Dynamic GET Builder
- Round-Trip Code Integration
- Custom Admin Views
- Site Views
- Dynamic Dashboards
- Model Linking Between Views
- Shared Field Reuse Across Views
- Drag & Drop Field Mapping
- Dynamic Field Visibility
- Independent Packaging
๐ Joomla CMS Integration
- Token Integration
- ACL Per View, Field, Item
- Field-Based Joomla Config Generation
- Support For Joomla Categories/Tags/Custom Fields
- CLI-Ready Components
- Joomla Update Server Integration
- Version-Aware Language String Compilation
- Remote Publishing to Custom Repo Update Streams
๐ Field Type System
- Field Types Define Templates And Data Types
- Gui Defined Rules Required Unique Nullable
- Save Get Hooks Per Field
- Database Schema Auto Generated From Field Settings
- Per Display Field Rendering Config List Edit
- Create Dynamic Models With Modals Selectors
- Conditional Js And Css Per Field
๐ Snippets, Templates, Layouts, Libraries
- Snippets Reusable Html Blocks
- Layouts Reusable Php Render Templates
- Templates Page Level Views Linked To Custom Admin Site Views
- Libraries JS CSS Assets Linked To UI
- CDN Local Toggle For Library Delivery
- Media Folder Injection With Override Support
- Repository Push Pull Reset Workflow
- Init Snippets Layouts Templates Via Gui
Nested Custom Code Support
By enabling composable and centrally defined logic layers, it allows you to scale your Joomla component architecture with clarity, consistency, and flexibility.
What Is It?
Nested Custom Code Support means one Custom Code entity can contain special insert tags (e.g. [CUSTOMCODE=myReusableBlock]) that reference and pull in other Custom Code blocks during the build process.
Instead of duplicating similar logic across components or views, you:
- Define a reusable logic block (e.g., sanitizeInput)
- Create a โparentโ Custom Code block (e.g., save logic)
- Nest the reusable logic using a placeholder tag
- JCB replaces the tag with the full nested block during compile
๐ Compilation is recursive โ nested blocks can themselves include more blocks, with safeguards against infinite loops.
Where Can You Use It?
- ๐ง Inside Controllers (save, delete, cancel)
- ๐พ In Models (prepareTable, validate)
- ๐ In Layouts or Templates
- โ๏ธ In Field Logic (on save/get)
- ๐งฌ In Snippets (HTML, JS, or mixed)
Key Features
- ๐งฉ Logic Composition: Break large functions into reusable building blocks โ inject as needed.
- ๐ DRY Architecture: Write it once, nest it anywhere โ no duplication.
- ๐ง Compile-Time Safety: Nested injection happens only during compile, so logic remains clear and easy to trace in the final source code.
- ๐ Secure Namespacing: Nested blocks inherit and respect JCBโs compile-time variable context (placeholders still work inside nested logic).
Use Case Examples
- A reusable error handler injected into multiple save controllers
- A shared API authentication check nested into multiple views
- A language string parser reused across multiple template renderers
- A data formatting function reused across different layout views
Why It Matters
- โ Simplifies maintenance: update nested logic in one place
- โ Encourages modular thinking and micro-function structure
- โ Promotes sharing logic across large or complex components
- โ Avoids spaghetti code and long, monolithic code blocks
Best Practices
- Give nested blocks clear and meaningful names (e.g., validateUserAccess)
- Keep nested logic focused on one task (single-responsibility principle)
- Avoid deep recursion (>3 levels) for performance and readability
- Use nesting for shared concerns: validation, error reporting, utility logic
Conclusion
Nested Custom Code support turns JCBโs compiler into a true modular logic engine. By enabling composable and centrally defined logic layers, it allows you to scale your Joomla component architecture with clarity, consistency, and flexibility. It's code reuse โ supercharged.
Summary
JCB allows Custom Code blocks to call or include other Custom Code blocks during compilation, enabling a modular architecture where logic is broken down into reusable, composable parts. This nested system dramatically improves maintainability, scalability, and DRY (Don't Repeat Yourself) compliance.