Ferreteria/v0.5/startup: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
(Created page with "{{fmt/title|Ferreteria startup process}} This is the chain of events that takes place, in a typical application based on caAppUser ("the App object" or just "App"), when the s...")
 
No edit summary
Line 2: Line 2:
This is the chain of events that takes place, in a typical application based on caAppUser ("the App object" or just "App"), when the site is invoked (i.e. a page is requested, possibly just the front page or possibly something more specific).
This is the chain of events that takes place, in a typical application based on caAppUser ("the App object" or just "App"), when the site is invoked (i.e. a page is requested, possibly just the front page or possibly something more specific).


Assuming there are no initialization problems, App calls its Main() function. This then opens the database; if successful, it then calls its GetPageObject() method to get the Page object to use for rendering. The class to used is determined by the Ferreteria deployment's configuration, and is not (at least by default) affected by the URI data.
Assuming there are no initialization problems, App calls its Main() function. This then opens the database and, if successful, calls its GetPageObject() method to get the Page object to use for rendering. The class to used is determined by the Ferreteria deployment's configuration, and is not (at least by default) affected by the URI data.


It then calls the Page object's DoBuilding(), DoFiguring(), and DoOutput() methods.
App->Main() then calls the Page object's DoBuilding(), DoFiguring(), and DoOutput() methods. Each of those then creates an appropriate {{l/ver|evint}} object and passes it to $this->DoEvent():
* DoBuilding(): cEventNodeBuild
* DoFiguring(): cEventNodeFigure
* DoOutput() actually calls $this->Render() which calls $this->RenderNodes() which must be defined by the Page object. The standard implementation is to use the tRenderableTree trait, which then iterates through each sub-node... this doesn't quite make sense. At what point is the Render event created?


''documentation in progress''
''documentation in progress''

Revision as of 15:08, 17 June 2022

Ferreteria startup process

This is the chain of events that takes place, in a typical application based on caAppUser ("the App object" or just "App"), when the site is invoked (i.e. a page is requested, possibly just the front page or possibly something more specific).

Assuming there are no initialization problems, App calls its Main() function. This then opens the database and, if successful, calls its GetPageObject() method to get the Page object to use for rendering. The class to used is determined by the Ferreteria deployment's configuration, and is not (at least by default) affected by the URI data.

App->Main() then calls the Page object's DoBuilding(), DoFiguring(), and DoOutput() methods. Each of those then creates an appropriate evint object and passes it to $this->DoEvent():

  • DoBuilding(): cEventNodeBuild
  • DoFiguring(): cEventNodeFigure
  • DoOutput() actually calls $this->Render() which calls $this->RenderNodes() which must be defined by the Page object. The standard implementation is to use the tRenderableTree trait, which then iterates through each sub-node... this doesn't quite make sense. At what point is the Render event created?

documentation in progress