MSAMM
Back to course

Oracle Visual Builder: Applications That Outlive Their First Release · Module 4 · Variables, types and where state lives

Variables that persist

Lesson 39 of 176 · 3 min

Surviving a refresh, and THE DECISION ABOUT WHAT MAY BE KEPT IN A BROWSER AT ALL. NEVER ANYTHING YOU WOULD MIND A USER READING. Lesson 2 ended by saying every scope dies on refresh. This is the mechanism that survives one, and it comes with a condition that matters more than the technique. WHAT IT DOES IS WRITE THE VALUE INTO THE BROWSER'S OWN STORAGE AND READ IT BACK WHEN THE APPLICATION STARTS. So a filter selection, a collapsed panel, a draft the user has not submitted, all survive an accidental reload. Which is a genuine improvement to a real application — losing a half-filled form to a stray F5 is Lesson 11's first failure. THE CONDITION IS THAT BROWSER STORAGE IS NOT PRIVATE AND IS NOT SECURE. The user can open it and read it. So can anything running on that page. It survives sign-out unless something clears it,

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.

Get the free lessons by email

We will email you a link to every free lesson in this course. No account needed, and one message only.

In this module: Module 4 · Variables, types and where state lives

  1. 1What a variable is here
  2. 2The scopes, and what each one meansFree preview
  3. 3Choosing a scope, deliberately
  4. 4Types, and why you should declare them
  5. 5Types that mirror a service
  6. 6Computed values and expressions
  7. 7Variables that persist
  8. 8The event that fires when state changes
  9. 9State that four pages need
  10. 10Naming state so it is findable
  11. 11What breaks: four state failures
  12. 12Lab briefing · Move state and watch it break
Variables that persist — Oracle Visual Builder: Applications That Outlive Their First Release — MSAMM