Web Services
  Home arrow Web Services arrow Page 4 - 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 
Actuate Whitepapers 
VeriSign Whitepapers 
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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Dynamic Data Analysis on the Web-a Design Approach - Filtering and ordering


    (Page 4 of 13 )

    When focusing on a subset of data, such as one particular sales region, filtering is required. You might achieve filtering by specifying data to be included or less commonly, data to be excluded. You need to identify the dimensions to be tested for the values.

    It is often useful to present data in a certain sequence so the ability to specify the order in which slices and rows within each slice are returned is required. Alphabetic ordering uses the lexicographic sequence of values, while numeric ordering works by numeric comparison. Other custom orderings are also possible. Ordering might be in ascending or descending sequence.

    The conceptual model for data

    To enable the page author to express data requirements in the terms described above, a set of custom JSP tags can be provided. The programmer will need to implement a tag handler for each of the custom tags and create a tag library descriptor file, which defines the custom tags and associates each custom tag with its tag handler. When you contruct a Web page, you can embed the custom JSP tags, and identify the appropriate tag library descriptor along with a prefix used to distinguish this set of custom tags.

    A well designed custom tag library closely reflects the conceptual model to the page author. Listing 1 shows a set of custom tags that present the OLAP-like data model described above. In this example, a data source is identified along with the dimensions and measures which are required for a particular analysis, and the slice dimensions, filters, and orderings which are to be applied.

    Listing 1. A representative set of data definition tags


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

    <dd:data id="sales">
      <dd:dataSource>Sales Figures</dd:dataSource>

      <dd:dimensions>
        <dd:dimension>Year</dd:dimension>
        <dd:dimension>Product</dd:dimension>
      </dd:dimensions>

      <dd:measures>
        <dd:measure>Unit Sales</dd:measure>
        <dd:measure>Revenue</dd:measure>
      </dd:measures>

      <dd:sliceDimensions>
        <dd:dimension>Product</dd:dimension>
      </dd:sliceDimensions>

      <dd:filters>
        <dd:includeFilter>
          <dd:dimension>Sales Region</dd:dimension>
          <dd:value>North</dd:value>
        </dd:includeFilter>
      </dd:filters>

      <dd:orderings>
        <dd:numericOrdering>
          <dd:dimension>Year</dd:dimension>
        </dd:numericOrdering>
        <dd:numericOrdering direction="descending">
          <dd:measure>Unit Sales</dd:measure>
        </dd:numericOrdering>
      </dd:orderings>
    </dd:data>

    Taglib directive, data, and data source tags

    In Listing 1, the taglib directive establishes the scope of the data definition tags within the JSP with a prefix here of dd.

    The data tag acts as a container for all the other data definition tags, which together define the required data and how the results are to be arranged. The id attribute provides a means of referencing the results, and we shall see how this is used in the Data presentation tags section.

    The dataSource tag identifies the name of the data source of interest. The data source must contain all of the dimensions and measures referenced within this data tag.

    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