Capt. Horatio T.P. Webb
Portals and Dashboards
Using Frames, Ajax and MS SharePoint

MIS 4372 Transaction Processing II

The concept of a "user portal" has increasingly gained in popularity. These portals provide a single web site for the user that acts as a gateway to many of the user's other computing needs. Typically the must gain access to the portal by a logon process. Once logged on, the user sees connections to many different services on a single page. Portals have the advantages of a "single logon" that simplifies access to multiple system features. Most often these portals appear an organization's intranet where tasks, work groups, application tools and databases are commonly shared; secure and maintained.

Microsoft has taken a particular interest in the development of portals with their "SharePoint" technology. They claim that the use of their SharePoint servers provides valuable advantages to organizations in:

  1. Portals

    This is the idea of a single page where users logon and are presented with a variety of applications. This tends to be an HTML page with the organizational advantage that simplifies and aggregates several MIS functions for the user.

  2. Enterprise Search

    In an intranet environment where many diverse users have overlapping data and query needs, enterprise-wide search becomes a critical need. This also means that security and accessibility have been provided to maintain data and access integrity.

  3. Enterprise Content Management

    Content management has become a significant issue for most organization as the amount and number of alternative media types has risen dramatically. Having central access made available to a variety of user simplifies both finding and displaying content as well as reducing storage redundancy.

  4. Business Processes and Forms

    The ability to provide web-based processing for standard user tasks has been a staple of the client/server applications of the web since its inception. "Transaction processing" in whatever form is the often the most critical tasks the web performs. This may range from traditional filling out standard forms (like requesting a parking permit or filing a travel request) to shared calendars and messaging. These tasks typically require the user to make some permanent change in a database (process a transaction) -- as compared to static web displays or data retrievals.

  5. Business Intelligence

    With the advent of large databases, companies can now not only record transaction activity (i.e., data warehousing), it can also be selectively accessed (i.e., data mining) and used to make strategically important decisions about the future (i.e., business intelligence)

  6. Collaboration

    With large central databases, common content, and data access control provided for at the organizational level, users can share applications, data and communication channels.

  7. Dashboards

    An later variation of a portal is the "dashboard" concept where on a single web page many data sources are aggregated to provide a manager with constantly updated status reports. These reports features often use graphs, dials and indicator lights to report on the constantly changing environments -- much like the "dashboard" of your automobile.

In all of these ideas and applications, one of the central ideas is "sharing". This creates several serious technical issues. For sharing to take place, the following must be addressed:

NONE OF THESE IDEAS ARE NEW

They have all been tried in various forms, using various computer technology since the advent of networks in the late 1960s. However, the buzz words that name these shared processes have evolved as have the specific technical solutions.


One of the central advantages to both the portal and dashboard concepts is the assumption that multiple sources are employed on a single page simultaneously. The ability to accomplish this in a browser environment has evolved over the years using a variety of approached. We will examine some common web-based technologies in the order in which they appeared below:

  1. Frames

    HTML Frames provides the ability to display multiple web pages within a single web page and was one of the early features provided in HTML.

    The original concept relies on the idea of a "frame" as space containing the contents of a single HTML page. "frames" could then be arranged into a "frameset". This idea is different in HTML from the concept of an HTML page containing a single page of content inside the >body> and </body> tags. So instead of a single page like

    <html>
    <body>
    .
    .
    contents of a single page
    .
    .
    </body>
    </html>

    The use of frames replaces the <body> tag with a <frameset> tag pair inside of which the multiple frames are specified with <frame> tags.

    The general layout is:

    <html>
    <frameset [rows | cols] = "[pixels | %],  [pixels | %],   [pixels | %],...">

    <frame src="URL of an HTML page" >
    <frame src="URL of an HTML page" >
    <frame src="URL of an HTML page" >
    </frameset>
    </html>

    The first frameset attribute identifies whether the page is to subdivided in multiple pages arranged in either rows or columns. This choice is then followed by a quoted list of "widths for each column" OR "heights for each row" depending on whether "rows" or "cols" has been chosen expresses ed in pixels. Alternatively, the "widths" or "heights" can be expresses as:

    For example:

    Here if the HTML for a simple three column frameset:

    <html>
    <frameset cols="350,150,*">
    <frame src="http://www.bauer.uh.edu/parks/rss4.xml">
    <frame src="http://www.bauer.uh.edu/parks/spidey3a.asp">
    <frame src="http://www.google.com">
    </frameset>
    </html>

    The three HTML pages are to be arranged in columns. Three column widths are specified: 350 for the first (a sample RSS nes feed); 150 for the second (a stock market quote scapped from Google) and whatever width is leftover of the current browser window is the width of the third column (the Goggle home page). For each HTML page a "frame" tag is shown with an "src=" attribute that specifies the URL for the HTML page that is to appear in the specified column. Then there is a closing "frameset" tag. Note: there is NO body tag -- Each frame has its own. See the example here.

    There are numerous frameset and frame tag attributes that can be set to control size, function and appearance:

    If desired, you can subdivide the page further. This can be accomplished by making one of the frames that make up the frameset a frameset itself. Thus, a frameset of row frames can be subdivided into cols and vice versa. Here is the sequence of HTML pages that would be required to make a frameset with nine HTML pages in three rows and three columns:

    The top level page would be (named: frame_ex_top.htm), and have three rows like this:

    <html>
    <frameset rows="*,*,*">
    <frame src="frame_ex_row1.htm">
    <frame src="frame_ex_row2.htm">
    <frame src="frame_ex_row3.htm">
    </frameset>
    </html>

    Then, each of the three rows would be a frameset:

    The first row would be a frameset with three frames:

    frame_ex_row1.htm
    <html>
    <frameset cols="*,*,*">
    <frame src="frame_ex_row1_col1.htm">
    <frame src="frame_ex_row1.col2.htm">
    <frame src="frame_ex_row1.col3.htm">
    </frameset>
    </html>
    

    The three HTML pages on the first row would be:

    frame_ex_row1_col1.htm frame_ex_row1_col2.htm frame_ex_row1_col3.htm
    <html>
    <body>
    I am the row 1 col 1 page
    </body>
    </html>
    
    <html>
    <body>
    I am the row 1 col 2 page
    </body>
    </html>
    
    <html>
    <body>
    I am the row 1 col 3 page
    </body>
    </html>
    

    The second row would be a frameset with three frames:

    frame_ex_row2.htm
    <html>
    <frameset cols="*,*,*">
    <frame src="frame_ex_row2_col1.htm">
    <frame src="frame_ex_row2.col2.htm">
    <frame src="frame_ex_row2.col3.htm">
    </frameset>
    </html>
    

    The three HTML pages on the second row would be:

    frame_ex_row2_col1.htm frame_ex_row2_col2.htm frame_ex_row2_col3.htm
    <html>
    <body>
    I am the row 2 col 1 page
    </body>
    </html>
    
    <html>
    <body>
    I am the row 2 col 2 page
    </body>
    </html>
    
    <html>
    <body>
    I am the row 2 col 3 page
    </body>
    </html>
    

    The third row would be a frameset with three frames:

    frame_ex_row3.htm
    <html>
    <frameset cols="*,*,*">
    <frame src="frame_ex_row3_col1.htm">
    <frame src="frame_ex_row3.col2.htm">
    <frame src="frame_ex_row3.col3.htm">
    </frameset>
    </html>
    

    The three HTML pages on the third row would be:

    frame_ex_row3_col1.htm frame_ex_row3_col2.htm frame_ex_row3_col3.htm
    <html>
    <body>
    I am the row 3 col 1 page
    </body>
    </html>
    
    <html>
    <body>
    I am the row 3 col 2 page
    </body>
    </html>
    
    <html>
    <body>
    I am the row 3 col 3 page
    </body>
    </html>
    

    Whew! See the working example here.

    Any other arrangements of multiple subdivisions can be accomplished.

  2. Cross Frame Scripting

    It is simple (?) enough to make framesets that provide a way to alternatively lay out multiple HTML pages. But the frameset is only a mechnism for specifying pages -- it does not address communication BETWEEN frames.

    The HTML object model provides a simple way to: (1) access HTML object properties; (2) specify actions based on object events; and (3) control behaviors by executing an object's methods. In order to accomplish these tasks, the script must have a way to reference the object. In the HTML object model, that method used by scripts to reference HTML objects is:

    window. document. forms
    name
    or
    number
    (0,1,2,...)
    . elements
    name
    or
    number
    (0,1,2,...)
    . property
    event
    method

    However, in a frameset there are multiple pages (i.e., documents), so we must add an additional componewnt in the object model. In the same vein as "forms" and "elements" we must add the "frames" name of number. Notes:

    1. we have three options about where to start the refernce:
      1. window (means start at the browser);
      2. top (same as window); or
      3. parent (start the reference at the parent of the current page).
    2. then we make a reference to the frame's name or number. This tells us how to navigate through the frameset's frames (i.e., 0,1,2,...). The first "frames" reference is to the first frameset; the second to the second frameset (if it exists); etc.
    3. the use of "document" seems redundant -- it is OPTIONAL in the IE browser -- but is required if you are in Firefox (so always use the ".document.").
    4. the remainder of the object reference is the same as the non-frame version

    Here is the general form:

    window
    or
    top
    or
    parent
    . frames
    1st level
    name
    or
    number
    (0,1,2,...)
    . frames
    2nd level
    name
    or
    number
    (0,1,2,...)
    . frames
    3rd level
    name
    or
    number
    (0,1,2,...)
    ... document. forms
    name
    or
    number
    (0,1,2,...)
    . elements
    name
    or
    number
    (0,1,2,...)
    . property
    event
    method

    Here is a simple three frame example:

    <html>
    <frameset rows="*,*,*">
    <frame src="frame_ref1.htm">
    <frame src="frame_ref2.htm">
    <frame src="frame_ref3.htm">
    </frameset>
    </html>
    

    Here is the code for the first frame in the frameset (frame_ref1.htm):

    <html><head>
    <script language="javascript">
    <!--
    function pref()
    {
      if (window.document.form1.elements[1].checked) targ=0;
      if (window.document.form1.elements[2].checked) targ=1;
      if (window.document.form1.elements[3].checked) targ=2;
      getvalue=window.document.form1.t1.value;
      top.frames[targ].document.form1.t1.value=getvalue;
    }
    -->
    </script></head>
    <body>
    This is frame_ref1.htm. This page uses a form named "form1".<br>
    <form name="form1">
    This is a textbox named t1 <input name="t1" type="text" size="5"><p>
    Put the value in the textbox above into the textbox in the
    <br>1st frame <input type="radio" name="b">
    <br>2nd frame <input type="radio" name="b" checked>
    <br>3rd frame <input type="radio" name="b">
    <p><input type="button" onClick="pref()" value="change it"
    </form></body></html>
    

    The code shows how to retrieve a value from a textbox; determine (from the checked radio button, it assignes 0,1,2 to "targ") which frame gets the value. The cross frame assignment is made by:

    top.frames[targ].document.form1.t1.value=getvalue;

    See the working frame reference example as discussed above.

  3. iFrames -- Inline Frames

    While frames have received some level of utilization, there is much derision because of: printing issues (only on page can be printed from the frameset at a time and the user must click inside the frame to print it), bookmarking issues (doesn't retain any navigation that occurs inside the frameset in the bookmark) and navigation issues (confusing to users how the navigation works). Originally some browsers didn't support frames. This is generally not true today. But there is considerable outdated information about alledged "frame problems".

    However, the "in-line" version of frame has received some wide acceptance. An inline frame does NOT require the "frameset". One or more "in-line frames can be put "anywhere" in a standard HTML page without constraints. An "iframe" can appear anywhere in an HTML document. There are numerous attributes that define the iframe. In general the tag is:

    <iframe>

    any HTML

    </iframe>

    Attributes are:

See the working iframe example here.

The ability to place one or more HTML pages provides the capability to create an access portal with several page options immediately visible to the user. Frames used in the ways discussed above are a quick and dirty tool to get a portal done. It works without any special server-side programming

  • Ajax Updating

    While frames is a way to control simultaneous multiple access on a single page, it has generally been replaced by the Ajax technologies. See my 2000 initial XMLHTTP page here. The technology XMLHTTP discussed was ultimately renamed "AJAX" (asynchronous JavaScript and XML). This is still a misnomer. It doesn't have to be javascript (it can be vbscript) AND it doesn't not have to be XML (it can be text, HTML or anything else you wish to get/put on the page) AND it does NOT have to be asynchronous. What AJAX does is to:

    send and receive data to/from servers to the browser from a scripting language without refreshing (replacing) the contents of the page

    Most importantly, this AJAX activity is invisible to the user and it can work in the "background" while the user does other things. My pages on Ajax are: