← ClaudeAtlas

coldbox-routing-developmentlisted

Use this skill when configuring ColdBox routes, setting up RESTful resource routes, creating route groups, implementing URL pattern matching with constraints, defining named routes, or working with Router.cfc in a ColdBox application.
ColdBox/skills · ★ 0 · AI & Automation · score 61
Install: claude install-skill ColdBox/skills
# Routing Development ## When to Use This Skill Use this skill when setting up URL routing for ColdBox applications, defining REST resource routes, or configuring route constraints and groups. ## Language Mode Reference Examples use **BoxLang (`.bx`)** syntax by default. Adapt for your target language: | Concept | BoxLang (`.bx`) | CFML (`.cfc`) | |---------|-----------------|---------------| | Class declaration | `class [extends="..."] {` | `component [extends="..."] {` | | DI annotation | `@inject` above `property name="svc";` | `property name="svc" inject="svc";` | | View templates | `.bxm` suffix | `.cfm` / `.cfml` suffix | | Tag prefix | `<bx:if>`, `<bx:output>`, `<bx:set>` | `<cfif>`, `<cfoutput>`, `<cfset>` | > **CFML Compat Mode**: With BoxLang + CFML Compat module, `.bx` and `.cfc` files coexist freely. BoxLang-native classes use `class {}` (`.bx` files); CFML-compat classes use `component {}` (`.cfc` files). ## Core Concepts ColdBox routing maps URLs to handler actions via `config/Router.cfc`: - RESTful resource routes are defined via `resources()` or `route()` - Route groups share prefix, namespace, or middleware - Constraints validate URL segments with regex - Named routes can be used in views/handlers via `buildLink()` - HTTP verb restrictions enforce RESTful semantics ## Implementation Steps 1. Create/open `config/Router.cfc` 2. Define resource routes or individual routes 3. Add route groups where appropriate 4. Apply constraints to dynamic segments 5.