SOAP & Web Services Page 12 - Dynamic Data Analysis on the Web-a Design Approach |
The design approach described in this article uses a set of custom JSP tags to implement an OLAP-like data model, which provides an architected interface between the data access and presentation parts of a Web application. The sections that follow describe the benefits. Separation of data access from presentation It is widely recognised that an architectural separation between data model and presentation is desirable within all but trivial Web applications. For instance, the Model-View-Controller paradigm is one widely used approach to achieve this, and the architecture described in this article is compatible with such approaches. As well as providing a well-defined interface to separate the implementation of data access from that of presentation, the actual tasks of creating such implementations are also separated. Once the initial work of defining the data sources (in terms of dimensions, measures, and so forth) is complete, then the tasks of implementing them and any pages that depend on them can be done in parallel and by different individuals. Separation of the roles of page author and data access programmer The OLAP-like data model, in conjunction with a well-implemented data source, provides the page author with little likelihood of inadvertently configuring an incorrect analysis of the data. This is in stark contrast to technologies such as SQL, where a simple typographical error or misunderstanding of the database schema can lead to very significant and sometimes subtle errors. From the perspective of the data access programmer, the OLAP-like data model provides a lot of flexibility for implementation. It is conceptually simple and requires only the ability to filter and aggregate data to support it. This leaves a considerable design space for the data access programmer to exploit any capabilities of the underlying data source (such as converting requests into appropriate queries against a relational database, for instance). Dynamically configurable The illustrated tag library is particularly suited to dynamic configuration as a result of form submission. The individual component tags that are used to configure a data tag, such as filter tags and ordering tags, can be readily integrated with conditional logic tags and input from form fields. This enables the page author to create pages that permit the user to control some parameters of an analysis (such as selecting a sales region to filter the results to, or selecting whether to aggregate by months or quarters, and so forth). Reusable data sources A well-thought-out data source can be used to supply data for a variety of pages. It is not necessary to use every dimension and measure whenever a data source is used -- just the subset required for the particular purpose. So, data sources can often be defined that offer a common superset of the dimensions and measures needed for several different analyses/pages. Encourages good design The fact that the design approach is centered around the definition of the required data means that this critical aspect of the design must be approached early on and in considerable detail. Neither the implementation of the pages nor the data sources can begin before the definition of the data source in terms of dimensions and measures is done. Furthermore, considering the data to be used in the relatively abstract terms of dimensions and measures encourages good conceptual design independent of the physical details of how the data will be displayed or accessed. In short, this approach encourages design before implementation, as well as conceptual design before physical design. Standards These data definition and data presentation tag libraries conform to the J2EE 1.2 standard, making them compatible with a wide range of Web application servers. The custom JSP tags that are used to implement the interface between page author and programmer are readily understood by integrated development environments and other tooling, thus improving productivity.
blog comments powered by Disqus |