Web Services
  Home arrow Web Services arrow Page 9 - 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 
Moblin 
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

    Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!

    Dynamic Data Analysis on the Web-a Design Approach - Reporting common errors


    (Page 9 of 13 )

    When filtering is applied to data, it is not uncommon to find that no rows of data match the filtering criteria. The page author might wish to deal with this and other exceptional occurrences gracefully. An ifDataState tag can be used to allow various common conditions to be anticipated, detected, and reported in a structured way. Listing 5 illustrates the use of ifDataState tags in a common pattern used to protect against empty result sets and access violations.
    Listing 5. A common error-handling pattern


    <dd:ifDataState dataRef="sales" notAuthorised="true">
      You are not authorised to access this sales data.
    </dd:ifDataState>

    <dd:ifDataState dataRef="sales" rows="none">
      Your selections have returned no data.
    </dd:ifDataState>

    <dd:ifDataState dataRef="sales" rows="oneormore">
      <%-- All seems OK, let's use the data here --%>
    </dd:ifDataState>

    The example in Listing 5 assumes that identification, authentication, and authorization mechanisms are in place to match the user with access rights for the associated data. The details of such a scheme are beyond the scope of this article. What is important is that the problem has been encapsulated by the custom tag, and that the page author does not have to worry about the nasty details.

    In this example, two cardinalities of result rows are then tested. Each cardinality test can only be satisfied if the authorisation test is met and data is successfully fetched. The first cardinality test recognises the empty result set situation. The next performs the data presentation if at least one result row is available. Other cardinalities might be tested for, but these are the most common.

    Implementation notes

    The JSP specification provides services which enable cooperating sets of custom JSP tags, such as those described here, to be developed and deployed successfully. This article is not intended to be a detailed survey of JSP custom tag development, but this section does address some of the principle issues in the implementation of sets of custom JSP tags of the type we have discussed here. It also provides pointers to appropriate parts of the API and the associated documentation.

    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 3 hosted by Hostway