Blog
Recent Entries
12 days of BoxLang - Day 3: SocketBox!
As BoxLang continues evolving into a modern, high-performance, JVM-based runtime, real-time communication becomes essential for the applications we all want to build: dashboards, collaboration tools, notifications, live feeds, multiplayer features, and more.
That’s where SocketBox steps in — the WebSocket upgrade listener built to work seamlessly with CommandBox and the BoxLang MiniServer. ⚡
Today, for Day 3, we’re highlighting how SocketBox supercharges BoxLang development by giving you fast, flexible, and framework-agnostic WebSocket capabilities.
12 Days of BoxLang - Day 2: CommandBox
BoxLang + CommandBox: The Enterprise Engine Behind Your Deployments
For Day 2 of our 12 Days of Christmas series, we’re diving into one of the most powerful parts of the BoxLang ecosystem: CommandBox the defacto enterprise servlet deployment platform for BoxLang.
If BoxLang is the language powering your applications, CommandBox is the engine room behind it all. ⚙️
12 Days of BoxLang - Day 1: ColdBox
ColdBox + BoxLang: The Future of Modern MVC on the JVM Welcome to Day 1 of the 12 Days of BoxLang
To kick off the series, we’re starting with one of the most powerful combinations in the Ortus ecosystem: ColdBox + BoxLang.
ColdBox has been the standard for modern CFML MVC development for over a decade. BoxLang is the next-generation dynamic language built for JVM and beyond. Together, they reshape how developers build web apps, APIs, microservices, CLIs, and soon desktop applications.
Let’s dive into why ColdBox 8 + BoxLang PRIME is a major milestone for the future of modern application development.
Add Your Comment
(6)
Mar 19, 2013 02:18:17 UTC
by Chris Galli
event.getValue('foo','default'); is not returning as I am understanding it should. I am using prc.isWidget = event.getValue('arguments.isWidget','false'); or prc.isWidget = event.getValue('arguments.isWidget',false); But both return false when my arguments.isWidget value is true by using if (arguments.isWidget){prc.isWidget = true;}else{prc.isWidget = false;}; I get the desired behavior. Am I using this incorrectly?
Mar 19, 2013 02:46:43 UTC
by Brad Wood
You're misunderstanding the event.getValue() method. It is not a general purpose method for accessing any variables in the function but instead a special method specifically for getting values from the request collection. If you do event.getValue('arguments.foo') that is looking for a key called "arguments.foo" in the request collection struct, or rc["arguments.foo"] which is obviously not what you want. If you want to deal with values coming into the arguments scope, you want to use the regular functionality of CFML to deal with that such as CFParam, structKeyExists() and the like. Only use the methods in the event object to work with the request collection.
Mar 19, 2013 11:57:01 UTC
by Chris Galli
Thanks. That makes sense now. Something more like param arguments.isWidget = event.getValue('rc.isWidget','false'); pr.isWidegt = arguments.isWidget; should give the arguments scope priority while gracefully delegating to the rc and then to a default value.
Mar 19, 2013 17:27:41 UTC
by Chris Galli
I discovered I do not need to reference the rc in the event.get value. <br><br> param arguments.isWidget = event.getValue('isWidget','false'); <br><br> prc.isWidget = arguments.isWidget;
Mar 19, 2013 18:00:52 UTC
by Brad Wood
Yep, I was going to comment to that effect but you beat me to it. You only have to pass in the exact name of the variable in the rc to the getValue method. Otherwise it would be looking for rc["rc.foo"] which wouldn't exist. Think of it this way: return event.getValue("foobar"); is the exact same as: var rc = event.getCollection(); return rc.foobar;
Mar 19, 2013 18:01:44 UTC
by Brad Wood
Wow, that's annoying that all our line breaks keep getting eaten-- I'm going to put in a ticket for that :)