Oracle Visual Builder: Applications That Outlive Their First Release · Module 4 · Variables, types and where state lives
Computed values and expressions
Lesson 38 of 176 · 3 min
DERIVING RATHER THAN STORING, which is the same rule this platform applies to scores and totals. A STORED COPY DRIFTS THE MOMENT ITS INPUT CHANGES. Some values are computed from other values — a total from a list of lines, a full name from two fields, whether a button should be enabled. There are two ways to hold one and only one of them stays correct. STORING MEANS COMPUTING IT AND PUTTING THE ANSWER IN A VARIABLE. Which works, once. Then somebody edits a line and the total is wrong — not out of date, WRONG, because the page is displaying a number that no longer corresponds to anything on the screen. AND THE FIX IS ALWAYS THE SAME AND ALWAYS INCOMPLETE. Recompute on edit. Then recompute on delete. Then on the add nobody remembered. Every path that changes an input must remember to update the copy, and the failure…
The full lesson is part of the course
The video, the complete written lesson and the module quiz are included in Oracle Visual Builder: Applications That Outlive Their First Release, with a certificate on completion and a fourteen-day refund window.
In this module: Module 4 · Variables, types and where state lives
- 1What a variable is here
- 2The scopes, and what each one meansFree preview
- 3Choosing a scope, deliberately
- 4Types, and why you should declare them
- 5Types that mirror a service
- 6Computed values and expressions
- 7Variables that persist
- 8The event that fires when state changes
- 9State that four pages need
- 10Naming state so it is findable
- 11What breaks: four state failures
- 12Lab briefing · Move state and watch it break
