Introduction
Server Platform
Application Server
Content Generation
   Languages
   PageTree
   Pages
   PageType
   Elements
   Templates
   Callbacks
Class Library API
Manual Index

next | previous

Page Tree

Hierarchical Database Page Tree

Dynamic pages, templates and elements are categorized in a hierarchical page tree. The tree consisting of nodes and their relationships to each other. A node is uniquely defined by it's path (category and page). Also a unique node number is assigned for internal use. Each node is represented by a record in databases 'PAGE' table and characterized by it's:

  • Category Name
  • Page Name
  • Page Number
  • Page Generation Type
  • Node Type
  • Page Group
  • ...

Page Category and Page Name

In a file based approach a file on a web server is referred to by its path relative to the sites 'DocumentRoot'. To dynamically generate content, Maxscape introduces the use of the two CGI variables 'Category' and 'Page' to point to the equivalent location on the file system or in the content database.

For example to address this page, you can use the hyperlink:

<a href="?Category=/Profile/Content&Page=PageTree">PageTree</a>

which can be seen as an equivalent to <a href="/Profile/Content/PageTree.html"> in a file based addressing scheme. Besides of using the HTML anchor tag, you can use the Maxscape API function:

$Page->mxsLink (Category => '/Profile/Content', Page => 'PageTree', Text => 'PageTree',), which also yields:

PageTree

Page Generation Types

The 'Page Generation Type' determines, how to generate the content of a page. Obviously, it doesn't make to much of sense to dynamically generate a static page stored in a file, because this can do the HTTPD server on its own. So, the first idea is to embed software in the text of a file, which in return is parsed 'on the fly' by a script to execute the embedded software. So, with Maxscape you can define 'Page Generation Types' by yourself, either in a file or the content database. Predefined 'Page Generation Types' are:

  • CGI-Template (template script, stored in a file)
  • DB-Template (content database template)
  • PlainFile (static page, stored in the content database)
  • parsedPlainFile (parsed database page)
  • DB-PerlScript (Perl script stored in the content database)
  • Link (link to a category or page)
  • File (can be used to control file access)

Node Types

Page nodes are either of type: 'category', 'document', 'template' or 'Link'.

Category
Categories are used for structuring purposes and may contain other nodes. They are the equivalent to what directories are in the file system terminology. Also categories can be used to inherit variables and properties to sub categories and sub pages.
Page/Document
The notion 'page' or 'document' in a 'database web server' approach is the equivalent to a file in a file based system. There are several advantages of the database in comparison with the file approach. For example, you can easily add informations and characteristics, make database queries, structure data a.s.o.
Page Elements
The content of pages are stored in page elements, which are actually fields in the content database. An element has a name, an attribute, a content, a language and maybe more parameters. The default element type (defined by the 'Type' attribute) is plain text, respectively HTML. Setting the elements 'Type' attribute to 'parsed' or 'execute', causes the runtime system to parse (evaluate variables and call embedded functions) or to execute the function's code.
Template Technique
Templates are used to generalize a special layout or design to more than one page. If you have designed your system well, you can change the outlook of 1000 pages with a few clicks. Template technique can reduce the required storage space dramatically, since they can remove most of the redundancy. They also can help to hide the complexity of a layout to content authors.

nextprevioustopbecome a membercontact © Maxscape