1 / 53

Info Dissemination over the WEB

Info Dissemination over the WEB. I502 Lecture 8. Outline. Web based IM systems Oracle structure and data manipulation Usability Analysis Exam Review. WWW as C/S Platform. Why?

emmly
Download Presentation

Info Dissemination over the WEB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Info Dissemination over the WEB I502 Lecture 8

  2. Outline • Web based IM systems • Oracle structure and data manipulation • Usability Analysis • Exam Review

  3. WWW as C/S Platform • Why? • Can easily serve the needs of local and remote users (wide-spread availability of client tools) - both intranet and Internet needs • WWW provides a cheap & easy way to maintain client software • Alternative to installing expensive client software (half the client is there already!)

  4. WWW as C/S Platform • How? • Need to acquire web server software • Need to develop scripts based on Common Gateway Interface (CGIs), or use some other middleware • Need to develop user interfaces using HTML, extended tags, or JAVA / JAVA-like codes

  5. WWW as C/S Platform • Limitations • Security becomes challenging if Internet accessibility is supported • Client-tools supported by third party and separate from actual content served • Client-tool technology varies and changes...

  6. Communicating with a DBMS over WWW client HTTP over TCP/IP WWW server CGI or DLLs using server APIs Middleware Service e.g. CF ODBC/JDBC Back-end Service e.g. Oracle

  7. Database Drivers • Hides native data types and other DB system specific features from clients • Provides clients with the independence to query using a standard language (SQL)

  8. JDBC • Java Database Connectivity is a standard set of functions known as an Application Programming Interface (API) used by clients or middleware services to communicate with diverse database environments using Java

  9. JDBC • Operational View of Client-JDBC Sybase driver1 Java Code Oracle driver2

  10. Oracle – DB Structure • Oracle DB structure is made up several logical units: • A Database contains: • Several Tablespaces, each containing • One or more Datafiles, each containing • One or more Tables

  11. Oracle DB Logical Structure Doe, Jane A Line (Data) A Page (Table) Drawer (Tablespace) Folders (Datafiles) Filing Cabinet (database)

  12. Oracle DB Physical Structure Database System tablespace User tablespace data1.ora 1 MB data2.ora 1 MB data3.ora 4 MB datafile Each datafile is associated with a single tablespace Total storage capacity of the database is 6 MB

  13. Oracle Basic Data Types • Variable length character • VARCHAR2 • Maximum is 4000 bytes and minimum is 1 • Date • from January 1, 4712 BC to December 31, 9999 AD

  14. Oracle Data Types Contd. • Number • Binary data • BLOB (binary large object) • Can contain 4 gigabytes -84 127 number – 10 – 10 with precision up to 38 decimal places

  15. Oracle – Creating a Database • Database creation commands • create database webtraffic • Tablespace • CREATE TABLESPACE tabspace_5 DATAFILE'diskb:tabspace_file1.dat' SIZE 500K REUSE AUTOEXTEND ON NEXT 500K MAXSIZE 10M;

  16. Oracle – Creating Tables • Creating tables with constraints: • CREATE TABLE emp • (empno NUMBER PRIMARY KEY, • ename VARCHAR2(10) NOT NULL, • job VARCHAR2(9), • mgr NUMBER CONSTRAINT fk_mgr • REFERENCES emp(empno), • hiredate DATE DEFAULT SYSDATE, • sal NUMBER(10,2) CONSTRAINT ck_sal CHECK (sal > 500), • comm NUMBER(9,0) DEFAULT NULL, • deptno NUMBER(2) NOT NULL, • CONSTRAINT fk_deptno REFERENCES dept(deptno) ) tablespace users;

  17. Oracle – Creating Tables • Creating table in an existing database (default tablespace) • create table staff ( ssn varchar2(11), last_name varchar2(30), first_name varchar2(30), mid_name varchar2(1), date_emp date, salary number );

  18. Oracle – Data Dictionary Query • To show the content of a table: • SQL> describe staff • Name Null? Type • ------------------------------- -------- ---- • SSN NOT NULL VARCHAR2(11) • LAST_NAME VARCHAR2(30) • FIRST_NAME VARCHAR2(30) • MID_NAME VARCHAR2(1) • DATE_EMP DATE • SALARY NUMBER

  19. Viewing the Tables from the Data Dictionary SQL> select table_name from user_tables; TABLE_NAME ------------------------------ ASSIGNMENT BUILDING WORKER

  20. Oracle - Insert • To insert records: • SQL> insert into staff values ( '223-45-7896', 'Tribso', 'Daniel', 'J', '4-Dec-1995', 4568.50);

  21. Case of commands and content • Note that Oracle is case insensitive to SQL commands • But, case sensitive to actual content of fields

  22. Oracle - Update • To add a new column to a table: • Alter table staff add (date_dep date); • To modify a column data type: • Alter table staff modify (date_dep number); • To drop a table: • DROP TABLE test_data;

  23. Oracle - Update • To update record/s in a table: • update staff set salary=999 where ssn='111-22-3333';

  24. Oracle - Delete • To delete record: • delete from staff where ssn='111-22-3333';

  25. Oracle - Retrieve • To retrieve records: • Select * from staff; • Will show all records and all fields • Select ssn, salary from staff; • Will only show two fields

  26. Oracle – Formatted Retrieval • select to_char(start_date, 'yyyy') "year" from assignment;

  27. Oracle – Making Changes Permanent • Must use commit command to finalize the actual update • SQL> commit;

  28. Servlets • Java’s servlet architecture aid in designing applications that run on the network • Servlets can be used to create applications that take advantage of the server machine’s resources

  29. Servlets Server Apache Servlet Client Store files Retrieve files Explorer

  30. Servlets • Servlets are currently supported by the following web servers: • Netscape web servers • Microsoft’s IIS • Jigsaw by W3C • Apache

  31. DB Server Oracle Web Server Apache Servlet Client Conduct database manipulation over the WWW Explorer

  32. Servlets • Can be used to create multi-tiered applications • Client to - WWW server to - Database

  33. Servlets • Servlet architecture also allows for the creation of “thin clients” – requires no VM on the client side • Servlets can generate dynamic HTML output based on user’s demands/requests

  34. Creating Servlets • 1) Create the HTML “front-end” • Keep track of variables that you used with the form elements • 2) Create the servlet/s to be invoked when the submit button is clicked

  35. HTML Front-End

  36. Servlet Structure – Relevant Packages • Need to use the two main servlet packages: • javax.servlet and javax.servlet.http

  37. Servlet Structure • The HTTPServlet class is extended • When a request arrives at the server (WWW) the server creates a “HTTPServletRequest object” and passes that on to the servlet’s service method • The service method – part of the superclass HTTPServlet – calls the doGet or doPost methods

  38. Servlet Structure • doGet • Information sent from the client to the server is minimal … part of the URL • doPost • Information sent from the client when the user fills out large amount of information on a form … not appended to the URL • The service method of the superclass calls doGet or doPost accordingly

  39. Servlet Structure – Basic Process • Basic steps in the servlet program • doGet or doPost method • Process input • Generate HTML output • The servlet overrrides the doGet or doPost method

  40. HTML Front-End <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><title>BookStore</title><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"></head> <body> <p align="center"><img src="title.gif" width="645" height="53"> </p> <center> <table width="650" border="0" cellspacing="5" cellpadding="10"> <tr> <td width="200" bgcolor="#99CC99"> <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Search by Title:</strong></font> <form method="post" action="http://mentor.ucs.indiana.edu:10713/servlet/TitleServlet"> <input name="title" value=""> <input name="submit" type="submit" value="Submit"> </form> <form name="form1" method="post" action=""> <strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <a href="search.html">Advanced Search:</a> </font></strong> </form> <p> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Search by Category:</strong></font> <form method="post" action="http://mentor.ucs.indiana.edu:10713/servlet/CategoryServlet"> <select name="category"> <option value="java" SELECTED>Java</option> <option value="perl">Perl</option> <option value="javascript">JavaScript</option> <option value="web_server">Web Server</option> <option value="html">HTML</option> </select> <input type="submit" name="Submit" value="Submit"> </form>

  41. Servlet Code Fragment: TitleServlet import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; import java.sql.*; public class TitleServlet extends HttpServlet { /** * Initialize global variables */ public void init(ServletConfig config) throws ServletException { super.init(config); } /** * Process the HTTP Post request */ /** * Process the HTTP Post request */ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String title = request.getParameter("title"); response.setContentType("text/html"); PrintWriter out = new PrintWriter (response.getOutputStream()); out.println("<html>"); out.println("<head><title>Title Search</title></head>"); out.println("<body><table border=1 cellpadding = 5 cellspacing = 0>"); try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@dbserv.uits.indiana.edu:1521:oed1","username","password"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT pict, year, title, author FROM book where title like '%" + title + "%'"); ResultSetMetaData rsmd = rs.getMetaData(); int nCols = rsmd.getColumnCount(); int i; for (i=0; i<nCols; i++) out.println("<th>"+rsmd.getColumnName(i+1)+"</th>"); out.println("</tr>"); while (rs.next()) …

  42. Usability Analysis • HCI  Usability • Usability is a sub-field of HCI: Relates to methodologies for establishing utility of a system

  43. Why Conduct Usability? • Designers can become so entranced with their creations that they may fail to evaluate them adequately. • Experienced designers have attained the wisdom and humility to know that extensive testing is a necessity. • The range of costs might be from 10% of a project down to 1%. • Sheneiderman, B. DTUI

  44. Usability Plan • The determinants of the evaluation plan include: • stage of design (early, middle, late) • novelty of project (well defined vs. exploratory) • number of expected users • criticality of the interface (life-critical medical system vs. museum exhibit support) • costs of product and finances allocated for testing • time available • experience of the design and evaluation team

  45. Different Levels of Usability Evaluation • Expert Reviews • Usability Lab • Evaluation During Active Use • Formal experiments • Long-term use - surveys

  46. Specific Criteria for Usability • The goals of usability evaluation generally are: • Establish user efficiency: time, errors, completions • Establish user satisfaction

  47. Conducting Usability • To collect data on efficiency and satisfaction use two types of instruments: • Efficiency: Benchmark comparison • Satisfaction: Set of specific criteria • Shneiderman Chapters: • http://www.awl.com/DTUI/webres/ch4.html • http://www.awl.com/DTUI/toc.html

  48. Establishing Efficiency Benchmark • Create a set of questions/tasks that “exercise” all the major features of your interface • Time yourself: How long does it take to accurately complete each task and answer the questions. • Also establish number of steps involved (if appropriate)

  49. Collecting data before and during sessions • Select subjects with varied background • Collect appropriate demographic/background information: age, gender, academic background, level system experience • Ask subjects to conduct the benchmark tasks and collect data (time, errors, completions, and steps)

  50. Collecting data after the session • Using online QUIS • After the tasks are completed by the subject display the QUIS form in a browser • Help the user fill up name of the system and the email • Ask them to complete the rest of the form and click on “mail data” button • Collect the data from the email account and tally it

More Related