Tag
cfml
30 articles
Stump the Programmer: The Recursive Shelf
Robert presents a ColdFusion/BoxLang coding challenge to build a recursive function that converts a flat array of hierarchical category data (using `id` and `parent_id` relationships) into a nested tree structure without using loops. The solution uses `arrayFilter()` to find children of each parent and `arrayMap()` to recursively build the `children` array for each node, with an optional bonus feature to alphabetically sort children at each nesting level using a `sortKey` parameter.
Building a better spider
Robert evolved a web scraping service over several years to extract link metadata (Open Graph, Twitter Cards, oEmbed, JSON-LD) for social sharing features, progressively hardening it against bot detection, timeouts, and SSL errors. The latest version uses a multi-layered extraction strategy—rotating user-agents, disabling certificate validation, adding browser headers only for non-bot UAs to maximize successful extraction.
Serving static HTML content with CommandBox multi-server
Robert explains configuring CommandBox multi-server to serve HTML files
Setting up your first BoxLang Server
Robert explains quickly spinning up a BoxLang server
The Law of Unintended Consequences
Robert explains how he broke XML rendering in commandbox-ssg
Tidying up HTML with jSoup: Part Deux
Robert shows how to impliment tidy HTML using jSoup, again
cfdocs-ssg: Using ssg to generate larger sites
Commandbox-ssg is not just for blogs