A Framework for Display of Information from a Data Source Presented by Shaolong Wu University of Houston Department of Computer Sciences
Nov 18, 2014
A Framework for Display of Information from a Data
Source
Presented byShaolong Wu
University of HoustonDepartment of Computer Sciences
Agenda
1. Motivation2. Objectives3. Introduction4. Architecture5. Implementation6. Demonstration7. Conclusion8. Future Work
Motivation
Web Publishing Technology- Components: Browser, Web Server, Database, Network- Technologies: HTML, HTTP, XML/XSL, JDBC/ODBC,
ASP, Servlet/JSP- Expensive Resources- Complexities
Simplify Web Publishing Process
Increase Performance and Scalability
Agenda
1. Motivation2. Objectives3. Purpose4. Architecture5. Implementation6. Demonstration7. Conclusion8. Future Work
Objectives
Understand Web Publishing Architecture and Technologies
Develop a Framework for Display of Information from a Data Source
Demonstrate How Easy and Simple to Use
the Framework
Agenda
1. Motivation2. Objectives3. Introduction4. Architecture5. Implementation6. Demonstration7. Conclusion8. Future Work
Complexities of Web Publishing
Browser
CGI
ASP
Servlet
HTTP Response
Database
JDBC/ODBC
HTML
Create/Transform
HTTP Request
Web Server
Complexities of Web Publishing
Expensive resources- ODBC/JDBC- ASP/JSP, Java/VBScript etc- SQL
- Web Server Administration Expensive processes
- Connecting to database at Server- Creating HTML at Server
Simplify The Process
Browser
Database
HTTP Request
Web Server
Template
HTTP Response
HTTP Response
HTTP Request
HTML
Create/Transform
Simplify The Process
Release a lot of resources- No database connection at Server- SQL dynamically generated at client machine
- HTML created at client machine Reduce complexity of the process
- No ODBC/JDBC- No Code for ASP/JSP- Server only provides the Template- Web Server Administration becomes easy
XML Technology
New technology about data
Platform independent
Metalanguage
Provides structural and semantic information to the data
Provide additional meaning and context to the application
Well-formed, hierarchical structure and can be valid
XSL and XSLT XSL is a formatting language XSL transforms XML data XSLT is a text based transformation
process XSLT is completed through a XSL
StylesheetXSL Stylesheet
XML Data
XLSTProcessor
Result TreeHTML, XML, Text …
Transforms
SQL Server 2000 XML Support
HTTP Access FOR XML XML Mode
- Raw: each row in result becomes “row” element
and columns become attributes- Auto: table become element or sub-element, columns become attributes, hierarchy depends on table order in SQL- Explicit: user defines the elements and attributes
Agenda
1. Motivation2. Objectives3. Introduction4. Architecture5. Implementation6. Demonstration7. Conclusion8. Future Work
Framework Architecture
QueryTemplate.xmlSchema
Query XSL Stylesheet
Mapper
SQL Database
XML Data
HTTP Request HTTP ResponseRunValidator
HTML Document
Transforms
GeneratorsJava Objects
Our Framework
Agenda
1. Motivation2. Objectives3. Introduction4. Architecture5. Implementation6. Demonstration7. Conclusion8. Future Work
Components and Objects
Defines which data to display and how to display Must follow a Schema Root Element: <xmlMapper:mapper> First Part: <xmlMapper:query> defines which data
• Sub-element <xmlMapper:fields> defines fields and table• Sub-element <xmlMapper:where> defines the WHERE
clause• Used by Generators to generate the Query
Second Part: <xmlMapper:output> defines how to display
• Define targets and actions for XML Stylesheet• Can be any HTML output• Used by Generators to create the XSL Stylesheet
The QueryTemplate.xml Template
Components and Objects
The Generators Retrieve the QueryTemplate.xml Template
from Server Accept user input query condition Generate the Query and the XSL Stylesheet Also validate the Template when running at
terminal Accept the Query, XSL Stylesheet and database
address Retrieve XML Data from SQL Server 2000
database Transform the XML data into HTML document
The Mapper
GUI Tool to help developing the Template Run at Server terminal
The RunValidator
Components and Objects
Generated by the Generators based on the Template
Used by the Mapper to retrieve the XML data from database
Format:SELECT+'<ROOT>';SELECT…TableName.FieldName…WHERE TableName1.FieldName=TableName2.FieldName AND TableName.Field=FOR XML AUTO;SELECT '</ROOT>'
The Query
Components and Objects
Generated by the Generators based on the Template
Used by the Mapper to transform the XML data into HTML
Regular XSL Stylesheet
Specifies matching targets and actions
Usually, the matching targets are XML elements or Attributes
Application dependent
The XSL Stylesheet
Components and Objects
The SQL Database SQL Server 2000 database Support retrieving XML data via HTTP access
with the “FOR XML” clause
The XML Data Database table name become elements or sub-
elements Hierarchy depends on the order defined in the
TemplateThe HTML Document The desired HTML Document Display in client’s browser
Components and Objects
Include Java objects the Generators and the Mapper
Specify a location to display the resulting HTML
Use a form to get user input query condition
Use a button to trigger the Javascript method that did all the process
The Starting HTML
Agenda
1. Motivation2. Objectives3. Introduction4. Architecture5. Implementation6. Demonstration7. Conclusion8. Future Work
Demonstration
accounts DatabaseShow how to develop, deploy, and apply our framework step by step
Northwind DatabaseShow how to transform deep hierarchical XML dataShow how easy to insert a column into HTML table after development
Agenda
1. Motivation2. Objectives3. Introduction4. Architecture5. Implementation6. Demonstration7. Conclusion8. Future Work
Benefits and Significance
HTML is dynamically created on client machine Increase scalability and performance of the server
Retrieve XML data from database directly on client machine Reduce complexity
One Template to specify what to display and how to display it Easy to use and maintain
All processes are executed on client machine More secure
Agenda
1. Motivation2. Objectives3. Introduction4. Architecture5. Implementation6. Demonstration7. Conclusion8. Future Work
Scope for Future Work
Support Netscape browser
Validate XML data in browser
Support writing data to database, even keep a user session
Support other databases
Thank You !