MSAMM
Back to course

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

Choosing a scope, deliberately

Lesson 35 of 176 · 2 min

The question is NOT "WHERE IS IT CONVENIENT" but "WHO ELSE NEEDS THIS, AND WHAT SHOULD HAPPEN TO IT WHEN THEY LEAVE". Every scope works. That is the problem — there is no error to guide you, so the wrong choice is discovered months later as behaviour nobody can explain. THE PULL IS ALWAYS OUTWARD, AND IT IS ALWAYS THE WRONG DIRECTION. A page value that another page needs gets promoted to flow scope; a flow value another flow needs gets promoted to application scope. Each promotion solves today's problem in one action and buys a permanent cost, which is why it keeps happening. THE COST OF A SCOPE THAT IS TOO WIDE IS THAT NOTHING CLEARS IT. A value at application scope set on one page is still set when the user arrives somewhere unrelated an hour later, and that page reads it as current. Lesson 11's second 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.

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