A1.01 Navigation aware components (requirements) (Wpf) - chempkovsky/CS2WPF-and-CS2XAMARIN GitHub Wiki

In the "A0" article we mentioned non navigation aware components: efom, edlg, sform, sdlg, lform, ldlg, O2m.

On the other hand there exists typical navigational task related to master-detail chains.

  • Take a look at the slide of 05 article.
    • Database have a master-detail chains longer than two:
      • Country > Author > Manuscript > Book
      • Country > Dialect > Manuscript > Book
  • The typical navigational task can be formulated as below
    • Having tabular form for "Country" the end user must be able to select one row and navigate to "Author"-tabular form with only the authors who was born in the selected country
      • Having tabular form for "Author" the end user must be able to navigate back to "country"-tabular form
      • Having tabular form for "Author" the end user must be able to open "Add Author" form with "Country" controls which are read only and already populated with data of master "Country" row.
      • Having tabular form for "Author" the end user must be able to open "Update Author" form with "Country" controls which are read only.
      • Having tabular form for "Author" the end user must be able to select one row and navigate to "Manuscript"-tabular form with only the manuscripts which was written by the selected Author
        • Having tabular form for "Manuscript" the end user must be able to navigate back to "Author"-tabular form
        • Having tabular form for "Manuscript" the end user must be able to open "Add Manuscript" form with "Author" and "Country" controls which are read only and already populated with data of master "Country" row and master "Author" row.
        • Having tabular form for "Manuscript" the end user must be able to open "Update Manuscript" form with "Author" and "Country" controls which are read only.
        • Having tabular form for "Manuscript" the end user must be able to select one row and navigate to "Book"-tabular form with only the books which was published for the selected Manuscript
          • Having tabular form for "book" ...

So the master-detail chains naturally defines navigation chains with a business rules mentioned above.

Another important requirement is that all components that support navigation should not know anything about each other. The URL must be used to send data from one node of navigation to another. It means that Add/Update/Delete forms must be implemented not only as a dialogs but they must be implemented as navigation aware pages as well.

The next thing to mention about is a need of the component that declares the tree of all navigation paths (from master to detail) with a give View as a root (or head) of tree.

  • For instance, the tree with an Author as a root gives only one path:

    • Author > Manuscript > Book
  • But the tree with an Country as a root gives three paths:

    • Country > Author > Manuscript > Book
    • Country > Dialect > Manuscript > Book
    • Country > Publisher > Book
  • Depending of "Add/Update/Delete"-form implementation it must be two kind navigation-tree components:

    • navigation-tree component for "Add/Update/Delete"-form implemented as a dialog
    • navigation-tree component for "Add/Update/Delete"-form implemented as a navigation aware page

The last thing is the order in which to generate the navigation aware components. The order for eform-components is from master to detail. This is because eform-component given View may use "SearchDialog" of master View.