dWebSpec Dictionary
CONTEXT: descriptors->segment




All Details Standard Only Platform Only
Structured Web info and helpTechnologies
 Home Page
 Product Page
 Download Page
 Feedback
Javascript Tree Menu

Results for:

 segment 
Prev  Topic  Next

One of the facilities provided by dynamic web platforms is the ability to divide pages into sections or segments. These segments could then be dynamically arranges, selectively shown or hidden, enabled or disabled. There are also the issue of re-use of segment; one copy used in many places. There is also some form of inheritance; adding to a base segment, or enhancements based on runtime parameters.

With AJAX comes the possibility of segments being targets for re-rending, partial refresh, etc.

All these activities are captured by the segment descriptor.

Page Segmentation

Segments could be of two flavors. 1) Component based: on some platforms all elements are part of component tree. As such, a segment, which is a component itself, would be a container component. On such platform, a segment could have identity or server side representation.

2) Character stream based: on such platforms, we are simply generating character streams, of HTML or xHTML syntax. For these we could arbitrarily demarcate the page any way desired, as long as the active tags used to render the page remain valid XML. When such demarcations are done, it is possible for the dynamically assembled page to become invalid HTML/xHTML.? For example, with starting <div> tag, and no ending </div> tag. This would be a concern during the demarcation exercise, but there are no restrictions that preclude this. This is less likely for component based architecture, because of the component hierarchy.

Segment Reuse

Apart from the breaking of page into segments, there is another issue of pages that are made up of other pages. This allows the reuse of common fragments by multiple pages. This feature could vary from simple inclusion of segments, to full templates whereby a common theme or page is defined, which part of it could be replace or customized in the composition of pages.

dWebSpec provides the scheme for capturing the reuse of segments as provided in the state of the art frameworks and template utilities. The full implications of this aspect could be realized from the descriptor attributes, also a full discussion on page reuse is provided in the Introduction and Guide.

As an overview, the following facilities are provided for. 1) The include facilities, which allows inclusion of fragments from other pages. 2) The template facilities, that allows the use of a template or master page in composing pages.

 ASP.NET  

Segments primarily allow the division of pages into sections that could be enabled/disable or made visible, using logic at runtime. The logic is referred to as behavior-logic, in dWebSpec term. Example of segment entries are shown below.


  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>Customer Statement</title>
  </head>
  <body>
  <h1>
  <!-- aws:segment id="Statement" type="inline" -->
  . . .  elements
  <!-- /aws:segment -->
  </h1>
  <p>
  <!-- aws:segment id="DebtorsNotice" type="inline" -->
  . . .  elements
  <!-- /aws:segment -->
  </p>
  </body>

</html>

This would be reflected as segments in the descriptors; the debtors segment used the expression that allows it to show when a customer owes.

SEGMENT DESCRIPTORS

id

type

visible

enable

valuue

base-page-id

extends

event-id

description

Statement inline              
DebtorsNotice inline {bb.owed > 0>            

Unlike character stream based platform that arbitrary demarcations could be placed on the page, the division of a page into segments is more streamlined on the component based platform.

The division of the page would be along the lines of panels, containers, includes, etc. This is a common concept behind components, and having components that are containers, that could contain one or more other components.

This does not concern intrinsic page demarcations like table, row <tr> or cell <td>. What is in question is the demarcation of page for the purpose of dynamic behavior applications; those intrinsic demarcations must be implemented with their Web Control equivalent, in order to utilize server behaviors.

dWebSpec defines some segment types. These correspondences are shown below. The last three segment types are called the include type; they are the subject of discussion of the next section.

dWebSpec segment

type

ASP.NET

<table>

inline

asp:Table

<theader>

inline

<tbody>

inline

<tfooter>

inline

<frame>

dynamic-include

<iframe>

dynamic-include

<div>

inline

asp:Panel

<row>

inline

asp:TableRow

<td>

inline

asp:TableCell

<layer>

inline

aws - inline

aws - static-include

static-include

aws - dynamic-include

dynamic-include

*

aws - insert-include

insert-include

*

* These items are discussed further below.

There are other ASP segments, like ItemTemplate, that are nested within components. These are discussed in the presentation of the various in-build components that ASP.NET offers.

For the purpose of behavior application, segments have the following attributes.

Segment Attribute

ASP.NET Container Attribute

visible

Visible

enabled

Enabled

Segment Reuse

Further discussion on insert-include and dynamic-include now follows. Segment reuse has two forms. 1) The master or template page that has segment defined within that could be overridden or replaced. Pages would use these templates and override them as appropriate. Any page could be a template, it is the segments of the “insert” type that would delineate a segment as override-able. It is within the page descriptor that a page could indicate what page it is using as a template.

2) Another means of re-use is to include dynamically or statically other pages. For specification of segment to include, dWebSpec provides two attributes a) the base-page-id that indicate the page the segment reside, and b) extends that carries the segment-id to include.

ASP.NET has facilities for static include, which is discussed on segment types. There is no support for dynamic include as specified by dWebSpec. What is available is User Controls, that allow design of complex components that could include both segments and elements.

AJAX

All the segmentation and segment reuse discussed above, have to do with initial rendering or re-rendering on post-back, for the page. There is partial-rendering involving AJAX. This has gained popularity in making web application appear highly interactive, on the level of desktop applications.

To mark a segment for partial-rendering, all that is needed is to include an event-id entry for the segment. This id would belong to the AJAX event descriptor entry.

The subject of AJAX is discussed under the event descriptor, and event-id specification of this descriptor.

More details are available in the attributes descriptions id type value event-id visible enabled base-page-id extends description

Prev Next