Ferreteria/v2/usage/pages: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v2‎ | usage
Jump to navigation Jump to search
(a bit more info)
(what the app does)
Line 15: Line 15:
* $this->ParseInput();
* $this->ParseInput();
* $this->HandleInput();
* $this->HandleInput();
** The application will typically implement this as something like:
*** $this->BuildMenu();
*** $this->MenuNode_Init();
*** $this->TitleString("Default Title");
*** $this->HandleContent();
** This is kind of messy and needs to be mapped out and possibly redesigned.
* $this->PreSkinBuild();
* $this->PreSkinBuild();
* $this->Skin()->Build();
* $this->Skin()->Build();

Revision as of 13:52, 23 June 2015

About

Pages in Ferreteria handle execution of various processes to build a page, including form input handling and rendering of output.

An application will generally create their own page class descended from one of these classes, depending on what functionality it wants.

When URL translation is needed from a Page object (e.g. ParsePath()), the object passes the request over to menus.

Files

Classes

  • clsPage (abstract) - default page execution, stub for automatic email when exception thrown; app, skin, and data objects
    • clsPageBasic (abstract) - handles exception-email generation
      • clsPageLogin (abstract) - provides login forms (inheritor must call them, though) and admin menus

Process

The basic sequence of page component creation as defined in clsPage is:

  • $this->ParseInput();
  • $this->HandleInput();
    • The application will typically implement this as something like:
      • $this->BuildMenu();
      • $this->MenuNode_Init();
      • $this->TitleString("Default Title");
      • $this->HandleContent();
    • This is kind of messy and needs to be mapped out and possibly redesigned.
  • $this->PreSkinBuild();
  • $this->Skin()->Build();
    // tell the skin to fill in its pieces
  • $this->PostSkinBuild();
  • $this->Skin()->DoPage();