MSAMM
Back to course

Oracle Visual Builder: Applications That Outlive Their First Release · Module 9 · Fragments, components and reuse

Fragments: a piece of page you reuse

Lesson 92 of 176 · 3 min

What a fragment is, WHAT IT CAN AND CANNOT SEE, and HOW DATA GETS IN AND OUT OF IT. A fragment is a piece of page you define once and place in several pages — and the whole of its behaviour follows from what it can see, which is deliberately very little. IT CANNOT SEE THE PAGE THAT CONTAINS IT. Not its variables, not its state. That is the design rather than a limitation: a fragment that read its host's variables would work on the page it was written for and break silently on the second one, which is exactly what reuse is supposed to prevent. SO DATA GETS IN AS PARAMETERS, DECLARED BY THE FRAGMENT. It says what it needs, the page supplies it, and the contract is visible on both sides. Which is Module 3 Lesson 3's rule applied to a component: pass what identifies, and let the

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 9 · Fragments, components and reuse

  1. 1The component library you already have
  2. 2Fragments: a piece of page you reuse
  3. 3When to make one
  4. 4Custom components
  5. 5Sharing across applications
  6. 6Theming and staying consistent
  7. 7What breaks: two reuse failures
  8. 8Lab briefing · Extract a fragment properly