Web Services
  Home arrow Web Services arrow Page 7 - Dynamic Data Analysis on the Web-a Des...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB SERVICES

Dynamic Data Analysis on the Web-a Design Approach
By: developerWorks
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2004-12-29

    Table of Contents:
  • Dynamic Data Analysis on the Web-a Design Approach
  • Data analysis concepts
  • Dimensions and measures
  • Filtering and ordering
  • Dimension, measure, and slice dimension tags
  • Presenting data
  • Value formatting tags
  • Use of JavaBeans to provide dynamic values
  • Reporting common errors
  • Tag containment
  • Custom tags: lightweight, cheap, replaceable
  • Benefits of this design approach
  • In conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Dynamic Data Analysis on the Web-a Design Approach - Value formatting tags


    (Page 7 of 13 )

    In the example, the page author has chosen specific presentation tags that he or she knows will suit the result values.

    The write tag is used to evaluate data values in its body and include them in the page content.

    The valueFromColumn tag references a forRows tag using the rowRef attribute, and extracts a value from a particular column in each row. It is configured with a single dimension or measure tag.

    The numberFormat tag expects a numeric value within its body and formats this according to the specified style. The documentation for each data source needs to explain to the page author what type of values are found in each of the dimensions and measures. The set of custom tags for data presentation have to include a range of value formatting tags to meet the needs of the page author.

    Table 1. Example output of generalised presentation tags

    YearProductUnit SalesRevenue
    2001Widget A100£1,000
    2001Widget B80£1,200
    2001Widget C60£1,100

    YearProductUnit SalesRevenue
    2002Widget C80£1,650
    2002Widget A60£600

    YearProductUnit SalesRevenue
    2003Widget B60£900

    In Table 1, an example of the output generated by the tags in Listing 2 is shown. The table lists sales information covering three distinct years and three products for the sales region of interest. Note that the measures have been aggregated for each unique combination of year and product, resulting in six output rows which have been collected into three slices. The rows are in order of year first, and then by unit sales within year in descending order.

    Specialised presentation tags

    The generalised tags above will meet the many needs of the page author. However, inevitably specialised presentation requirements will need the development of bespoke function.

    Listing 3 shows an example of a bespoke tag designed with specific knowledge of the data it is to work with.

    Listing 3. A specialised presentation tag


    <%@ taglib uri="/WEB-INF/tlds/dc.tld" prefix="dc" %>

    <dc:satisfactionChart id="sattrend" width="100%" dataRef="satdata" aggregation="trend"
      monthDimension="Month" yearDimension="Year"
      sampleSizeMeasure="NSI Sample Size" lowSampleSizeMeasure="Low Sample Size"
      nsiMeasure="NSI" satVSatMeasure="SatVSat">
      <dc:title>Net Satisfaction Index (NSI) - Product Diagnostic Survey</dc:title>
    </dc:satisfactionChart>

    In Listing 3, the satisfactionChart tag references a data tag using the dataRef attribute. The dimensions and measures that the satisfactionChart tag requires are named by attributes, which allows it to work with different data sources with different dimension and measure names, provided the data in those dimensions and measures conforms to its requirements. A chart title is provided using the nested title tag. An example of the output from the satisfactionChart tag is shown in Figure 1.

    Figure 1. Example output of a specialised presentation tag


    Example output of a specialised presentation tag

    Enabling dynamic data analysis

    Flexibility in presenting information is half of the equation, but to be truly dynamic, the user has to be given the means to modify the information being presented.

    The data-related tags illustrated in Listing 1 lend themselves to dynamic control in a structured, yet versatile way. The OLAP-like model provides a structure which ensures that any resulting query is well-formed and valid. Custom JSP tags, such as those illustrated earlier, provide a number of opportunities for dynamic substitution including:

    • Selection of dimensions to be included in the analysis
    • Selection of measures to be included in the analysis
    • Provision of filtering values to be used to constrain the result data
    •  Selection of alternative ordering options for the result data

    More Web Services Articles
    More By developerWorks


     

       

    WEB SERVICES ARTICLES

    - Dynamic Data Analysis on the Web-a Design Ap...
    - Use collection types with SOAP and JAX-RPC
    - Blogging Away To Glory (A bBlog Primer)
    - Introduction to Service Oriented Architectur...
    - Connecting Smart Devices on the Internet
    - An Embeddable Standards Compliant Web Servic...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway