CBWire (ColdFusion Livewire) follows patterns similar to Laravel
Livewire. Here's a breakdown of when to use each:
Data properties are the reactive state of your component. They are:
Use data properties when you need to:
Computed properties are derived values calculated on the fly. They are:
Use computed properties when you need to:
The biggest practical benefit of computed properties in CBWire is the
per-request caching - if your template calls getFilteredProducts()
five times, the database query only runs once. When you genuinely need
a fresh result, simply pass false to bypass the cache. This makes
computed properties ideal for wrapping service calls driven by your
data property filters, without worrying about redundant queries.
https://www.ortussolutions.com/blog/build-secure-scalable-websocket-applications-with-socketbox-boxlang