title: Why to wrap a `Dialog` with `FragmentDefinition`?
body: <p>An UI5 dialog can be defined directly as a <code>Dialog</code>:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Dialog
      xmlns = &quot;sap.m&quot;
      id = &quot;helloDialog&quot;
      title = &quot;Hello {/recipient/name}&quot;&gt;
      &lt;beginButton&gt;
          &lt;Button
              text = &quot;{i18n&gt;dialogCloseButtonText}&quot;
              press = &quot;.onCloseDialog&quot; /&gt;
      &lt;/beginButton&gt;
  &lt;/Dialog&gt;
  </code></pre>
  <p>Or can be wrapped by a <code>FragmentDefinition</code>:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;core:FragmentDefinition
      xmlns:core = &quot;sap.ui.core&quot;
      xmlns = &quot;sap.m&quot;&gt;
  
      &lt;Dialog
          id = &quot;helloDialog&quot;
          title = &quot;Hello {/recipient/name}&quot;&gt;
          &lt;beginButton&gt;
              &lt;Button
                  text = &quot;{i18n&gt;dialogCloseButtonText}&quot;
                  press = &quot;.onCloseDialog&quot; /&gt;
          &lt;/beginButton&gt;
      &lt;/Dialog&gt;
  
  &lt;/core:FragmentDefinition&gt;
  </code></pre>
  <p>As far as I understand, a <code>FragmentDefinition</code> provides a higher degree of reuse since it doesn't depend on any view's controller but can be initialized with a custom controller using <code>sap.ui.core.Fragment.load()</code>:</p>
  <pre class="lang-js prettyprint-override"><code>this._oDialog = await Fragment.load({
      controller: fragmentController,
      id: oView.getId(),
      name: &quot;webapp.view.MyDialog&quot;
  });
  </code></pre>
  <p>However, according to the <a href="https://openui5nightly.hana.ondemand.com/topic/04129b2798c447368f4c8922c3c33cd7" rel="nofollow noreferrer">documentation</a>, starting UI5 1.93, the <code>loadFragment()</code> function is available on every controller instance extending <code>sap.ui.core.mvc.Controller</code> and this API has several advantages over the generic <code>sap.ui.core.Fragment.load()</code> function.</p>
  <p>If I use a <code>loadFragment()</code>, should I still wrap a <code>Dialog</code> with <code>FragmentDefinition</code>? I've tried both implementations, both of them work and I see a dialog on a view, so what are the benefits of using <code>FragmentDefinition</code> if I still can directly call a <code>Dialog</code> with <code>loadFragment()</code>?</p>