Home arrow HTML arrow Page 3 - Building an ACP Tree
HTML

Building an ACP Tree


In this two-part series I show you how a tree can be used to facilitate your ACP projects. You need basic knowledge of HTML, JavaScript and Perl in order to understand this series.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
August 13, 2009
TABLE OF CONTENTS:
  1. · Building an ACP Tree
  2. · Categories
  3. · The Tree
  4. · Recommendations for using today’s browsers

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Building an ACP Tree - The Tree
(Page 3 of 4 )

An Example Tree

This is an example of a tree:

 

Fig 1.1

 

Each node is either a browser window or a document. Note that a window can have more than one document, and in it you can go from one document to the next using the Back and Forward buttons of the browser’s toolbar. A window can be identified by the presence of its bars (title bar, menu bar, address bar, etc.). You can have more than one browser window opened in a session.

Node N0 (labeled in red) is the master page. In ACP a window or a document is considered a page. In the diagram, a window is identified by a small disc, while a document is identified by a small opened circle.

The nodes are arranged in levels, beginning from level 0, continuing to level 1, level 2 and so on. Counting of the levels begins from zero.

We need a way to identify a node. Each node begins with an N. This letter N is followed by the level number, whose counting begins from zero. If there is more than one node in a row, then the level number is followed by an underscore, and then the position number on the row, beginning from the left. The leftmost position is position zero, and then you have position 1, 2, 3, 4, etc. Position counting here begins from zero.

If more than one node has the same parent, then the node identifying code is followed by another underscore, and then the position number of the parent in the parent’s row. So for example, N3_2_1 means that you have a node at level 3, its position in the level (row) is 2; it is not the only child, and its parent is at position 1 in the parent’s level (row).

You can use this scheme to identify the windows and documents. So W3_2_1 would be a window at the node just described. Note that a node is either a window or a document. D3_2_1 would be a document at the node just described.

Now notice that there is a broken line in the diagram. It can only occur when we are talking about the parent of the documents and its documents. If more than one document has the same parent, then know that the parent produced the first document; this document produced the second document; the second document produced the third document, and so on.

This is the possibility that the DOM specification gives us; a document can produce another document, while a window can produce another window that automatically has only one document. A window cannot produce documents in “parallel” as it produces other windows. That is why from node N2_1 a solid line moves to node N3_1_1, and then another solid line moves to node N3_2_1. The broken line from node N2_1 to N3_2_1 is to give the diagram a consistence look. It should not be solid, because W2_1 does not produce D3_2_1 directly.

A session begins from N0 (master page), goes downward, and ends in any node lower in the diagram. Upward movement can occur when a user has made a mistake and wants to go back to a previous page to make corrections, or for some other reason. In a session, a perfect user would only move downward in the tree.

Sub Session, Sub Master and Sub Store

A session begins from N0 (master page) and ends in any node going downward. A sub session begins from any node and ends in any other node, below it, going downward. If you think that the beginning node of a sub session has some importance, then you can let it have a small store (sub store). It then becomes a sub master. In that case, it would be nice to have it as an HTML file and not only as a string in the server, so that a user can type its URL into the address bar of his browser and obtain the page.

Descending Chain

A descending chain is a path in the tree from any node down to any other node, without any upward turn. I am one of the innovators of Active Client Pages, so I've created this vocabulary and other vocabulary you will see in this series.

Web Pages Ahead

As you can see, it is possible for the user to open pages from the beginning, right down to the bottom of the tree. He may decide to go back to a page in the middle of the tree. While he is in the middle of the tree again, the pages ahead may still be opened.

This situation with opened pages ahead can confuse the user. So if the user is to go back to some page he had opened, it would be nice to have some code in your pages that would close the pages ahead or warn the user and give him the option to close them.


blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 5 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials