Download 764_8_Web

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
CIS 764 Database Systems Design
L8. Web ….
Fall 2008
http://www.cis.ksu.edu
1
CIS 764 Database Systems Design
class status:
19 persons
( 7 off campus, 12 in class )
… not checked all home pages yet
… homework index … done
off campus may run 3-7 days behind the in-class
(part delay in posting)
next week … review of reverse engineering,
(then forward engineering exercise)
Fall 2008
http://www.cis.ksu.edu
2
CIS 764 Database Systems Design
ejb tutorial …
is that an effective way give programming assignment?
Fall 2008
http://www.cis.ksu.edu
3
CIS 764 Database Systems Design
ejb tutorial …
is that an effective way give programming assignment?
SE answer: No … missing design documents (diagrams)
(later)
Fall 2008
http://www.cis.ksu.edu
4
CIS 764 Database Systems Design
next logical topic: Object-Relational Mapping
but … skip that for now
used implicitly in tables  classes
Fall 2008
http://www.cis.ksu.edu
5
CIS 764 Database Systems Design
CIS 726 WWW Technologies
Spring 2009
Fall 2008
http://www.cis.ksu.edu
6
CIS 764 Database Systems Design
web issues / topics:
dynamic pages …. user interaction, generated data
page control / design
db aware components
usability
testing
Fall 2008
http://www.cis.ksu.edu
7
CIS 764 Database Systems Design
web issues / topics:
dynamic pages …. user interaction, generated data
JavaScript …
JSP …
page control / design
Struts .. Page flow model
db aware components
JSF, ADF components
usability … later
testing
Fall 2008
… later (performance vs functional )
http://www.cis.ksu.edu
8
CIS 764 Database Systems Design
dynamic web pages:
http://en.wikipedia.org/wiki/Dynamic_web_page
* client side scripting: e.g.
JavaScript (not really Java), VBScript, PHP, …
* server side: e.g. ASP, JSP, PHP,….
** AJAX … a bit of both
Fall 2008
http://www.cis.ksu.edu
9
CIS 764 Database Systems Design
http://en.wikipedia.org/wiki/JavaServer_Pages
scriptlets (old, embedded code)
<% int localStackBasedVariable = 1;
out.println(localStackBasedVariable); %>
vs
tags
<jsp:forward page="subpage.jsp" >
<jsp:param name="forwardedFrom" value="this.jsp" />
</jsp:forward>
Fall 2008
http://www.cis.ksu.edu
10
CIS 764 Database Systems Design
http://en.wikipedia.org/wiki/JavaServer_Pages
tag libraries :
components, logic, sql, actions, custom tags
Standard Tag Library (JSTL)
primer
http://www.ibm.com/developerworks/java/library/j-jstl0211.html
Quick reference sheet
http://bellsouthpwp.net/b/i/billsigg/jstl-quick-reference.pdf
Fall 2008
http://www.cis.ksu.edu
11
CIS 764 Database Systems Design
JSP … several tutorials: http://www.jsptut.com/
(or http://www.visualbuilder.com/jsp/tutorial/ )
Getting familiar with your JSP server
Your first JSP
Adding dynamic content via expressions
Scriptlets
Mixing Scriptlets and HTML
Directives
Declarations
Tags
Sessions
Beans and Forms Processing
Tag Libraries
Form Editing
Log-in pages
Further learning
Fall 2008
http://www.cis.ksu.edu
12
CIS 764 Database Systems Design
Fall 2008
http://www.cis.ksu.edu
13
CIS 764 Database Systems Design
Struts: a (well structured) framework for JSP development,
with tag libraries
“Model-View-Control” framework
JSP is the view,
Struts is the view-controller
ejb-beans are the model
but …. Separate controllers in the model ,
JSP page attributes defined in “beans” (not ejbs)
Fall 2008
http://www.cis.ksu.edu
14
CIS 764 Database Systems Design
Struts: a (well structured) framework for JSP development,
with tag libraries
Ref:
also:
Struts Survival Guide: Basics to Best Practices,
S. Shenoy, N. Mallya
Object Source, Austin, TX 2004
Apache , Jakarta project
http://www.visualbuilder.com/jsp/struts/tutorial/
Fall 2008
http://www.cis.ksu.edu
15
CIS 764 Database Systems Design
Fall 2008
http://www.cis.ksu.edu
16
CIS 764 Database Systems Design
Fall 2008
http://www.cis.ksu.edu
17
CIS 764 Database Systems Design
Fall 2008
http://www.cis.ksu.edu
18
Fall 2008
http://www.cis.ksu.edu
19
Fall 2008
http://www.cis.ksu.edu
20
CIS 764 Database Systems Design
Fall 2008
http://www.cis.ksu.edu
21
CIS 764 Database Systems Design
struts-config.xml
web.xml
servlets
mapping
session parms
listeners
tag libs
defaults
MIME
filters
Fall 2008
http://www.cis.ksu.edu
22
CIS 764 Database Systems Design
Fall 2008
http://www.cis.ksu.edu
23
CIS 764 Database Systems Design
Attribute
Fall 2008
description
.
Path
URL (either full or suffix) which triggers this mapping
Type
the full class name of the Action
Name
name of the form bean
Scope
session or request
Validate
boolean: true => call validate method on the input data
Input
actually, the page (or other Action) for error response
Forward
page (or other Action) when ActionForward in exected
http://www.cis.ksu.edu
24
CIS 764 Database Systems Design
Fall 2008
http://www.cis.ksu.edu
25
CIS 764 Database Systems Design
Oracle tutorials:
“Creating an Input Form JSP Page Using the Struts Validator to Validate Data…”
http://www.oracle.com/technology/obe/obe_as_1012/j2ee/develop/client/strutsvalidator/validator.htm
Assignment (not homework to be collected):
View the validator tutorial … preparation for next ADF assignment.
http://people.cis.ksu.edu/~hankley/d764/JDev/struts/Validator_Tut/validator.htm
Fall 2008
http://www.cis.ksu.edu
26
CIS 764 Database Systems Design
JSF
“JavaServer Faces (JSF) is a Java-based Web application framework
intended to simplify development of user interfaces for Java EE applications.
Unlike other traditional request-driven MVC web frameworks, JSF uses a
component-based approach. The state of UI components is saved when the
client requests a new page and then is restored when the request is returned. “
http://en.wikipedia.org/wiki/JavaServer_Faces#JSF_versions
Fall 2008
http://www.cis.ksu.edu
27
CIS 764 Database Systems Design
ADF Faces
“Oracle ADF Faces is a rich set of user interface components based on the
JavaServer Faces JSR (JSR-127). The Oracle ADF Faces Components provide
various user-interface components with built-in functionality - such as data
tables, hierarchical tables, and color and date pickers - that can be customized
and re-used in your application. “
http://www.oracle.com/technology/products/adf/adffaces/index.html
Fall 2008
http://www.cis.ksu.edu
28
CIS 764 Database Systems Design
ADF Faces components
http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/excha
nge/jsf/doc/tagdoc/core/imageIndex.html
Fall 2008
http://www.cis.ksu.edu
29
CIS 764 Database Systems Design
end
Fall 2008
http://www.cis.ksu.edu
30
Related documents