MSAMM
Back to course

Free preview · Oracle Visual Builder: Applications That Outlive Their First Release

The scopes, and what each one means

PAGE, FLOW and APPLICATION. How long each LIVES, who can SEE it, and what happens to it when the user NAVIGATES OR REFRESHES.

Three scopes, and the difference between them is the single most consequential choice in this module.

PAGE SCOPE LIVES AS LONG AS THE PAGE IS OPEN AND NOBODY ELSE CAN SEE IT. Navigate away and it is gone; come back and it starts fresh. That is the right default for almost everything — what is in this field, what this page loaded, which row is selected here.

FLOW SCOPE LIVES AS LONG AS THE USER IS INSIDE THE FLOW AND EVERY PAGE IN THAT FLOW CAN SEE IT. Move between pages of the same flow and it survives; leave the flow and it is gone. Which is exactly the shape of "the thing the user is currently working on" — the customer they selected, the order they are part-way through.

APPLICATION SCOPE LIVES AS LONG AS THE APPLICATION IS OPEN AND EVERYTHING CAN SEE IT. The signed-in user, a global preference. It is the most powerful and the most abused — because it always works, so it is what somebody reaches for when a value needs to be somewhere else.

AND A REFRESH DESTROYS ALL THREE, WHICH IS THE PART THAT SURPRISES PEOPLE. Application scope sounds permanent and is not: it lives in the browser's memory for this run of the application, so pressing F5 empties it exactly as it empties the other two. Anything that must survive a refresh needs Lesson 7's mechanism, and nothing here provides it.

SO THE THREE QUESTIONS THAT IDENTIFY A SCOPE ARE: WHO ELSE READS THIS, WHEN SHOULD IT BE FORGOTTEN, AND WHAT SHOULD A REFRESH DO? Answering those three in order gives the scope with no judgement required — and Lesson 3 is what happens when somebody answers only the first.

That is the end of the free preview. The full course covers the rest of the curriculum, with the assessment and a certificate on completion.

See the full course