1 Web-Centric Projects in Computer Science Courses Kwok-Bun Yue University of Houston - Clear Lake ...

Preview:

Citation preview

1

Web-Centric Projects in ComputerScience Courses

Kwok-Bun Yue

University of Houston - Clear Lake

http://dcm.cl.uh.edu/yue/

yue@cl.uh.edu

@copyright 2002

April 12, 2002

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 2

Introduction

Web-Centric applications development is becoming critical.

Challenges exist for offering Web-Centric Projects.

This talk presents: Our experience, and Some recommendations.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 3

Contents

Web-Centric Software Architecture Web-Centric Projects Teaching Experience Recommendations Conclusions

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 4

Web-Centric Software Architecture

Software architectures have changed through the years.

A very coarse evolution: Phase 1: Mainframe. Phase 2: Traditional 2-tiered Client-

Server. Phase 3: Web-Based N-tiered Client-

Server Phase 4: Web-Centric.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 5

Phase 1: Mainframe

Highly centralized. Very thin clients: dumb terminals. Largely disconnected to outside of the

organization.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 6

Phase 2: Traditional 2-tiered Client-Server

Fat clients: PC. Proprietary protocols. Many dedicated servers. Still largely within the organization.

clients serversservices

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 7

Phase 3: Web-Based N-tiered Client-Server (1)

clients

servers

services

ApplicationServer

Web Server

intranet

clients

Internet

Major flow of services

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 8

Phase 3: Web-Based N-tiered Client-Server (2)

Open Web protocols. Middle layer for definition of business

logic: better software development. Serving clients outside of the organization:

Internet. The browser has become the universal

client. Thinner clients.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 9

Phase 4: Web-Centric (1)

clients

servers

services

ApplicationServer

Web Server

intranet

clients

Internet

Major flow of services

Organization

XMLServers

XMLservers

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 10

Phase 4: Web-Centric (2)

Potentially thin clients. Clients and servers can be blurred Data/services in and out of the

organization. Data/services from many servers, inside

and outside of the organization. No single organization can provide

'everything.'

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 11

Contents

Web-Centric Software Architecture

Web-Centric Projects Teaching Experience Recommendations Conclusions

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 12

Web-Centric Projects

In our university, web-centric projects are assigned in: CSCI 4230 Internet Application

Development CSCI 5733 XML Application Development

Some examples follow.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 13

Weather Report (1)

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 14

Weather Report (2)

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 15

Weather Report (3)

Assigned in Spring 2000. Wrote ASP program to retrieve weather

information in 'XML' format. External source:

http://zowie.metnet.navy.mil/cgi‑bin/oleg/get‑obs.

Use MS XML parser.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 16

Language Interest (1)

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 17

Language Interest (2)

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 18

Language Interest (3)

Assigned in Fall 2000. Wrote CGI-Perl programs to retrieve

various indexed page numbers by Google of different languages.

External source: http://www.google.com. Use CGI-Perl, LWP and regular expressions.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 19

WML Newsfeed (1)

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 20

WML Newsfeed (2)

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 21

WML Newsfeed (3)

Assigned in Spring 2002: http://dcm.cl.uh.edu/yue/courses/xml/spring2002/h3.asp

Wrote programs to fetch newsfeed and deliver it to mobile phones.

External source: http://www.moreover.com.

Use JSP, WML (Wirelss Markup Language) and SAX (an API).

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 22

Contents

Web-Centric Software Architecture Web-Centric Projects

Teaching Experience Recommendations Conclusions

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 23

Teaching Experience

Highly relevant project assignments. Students excited about the projects. Posted many technical questions. Found good jobs because of the course. Rated consistently as one of the best

computer courses.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 24

Challenges

No control on the the external sites on: Availability Quality of services Format consistence.

Beginner students will make many programming mistakes.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 25

Challenge Example

"Denial of Services" attack to Google:

“Someone at UH has been spamming Google with repetitive queries this weekend, from (ip and dsn omitted), in violation of our terms of service: http://www.google.com/terms_of_service.html

 

We saw over 60,000 such queries yesterday (Saturday), and over 45,000 in the first two hours today (Pacific time). These queries (over six per second) are consuming a significant amount of our bandwidth, and constitute a borderline denial-of-service attack, since it is adversely affecting response times for our users.

 

Most of the queries have been one of the following:

 

PERL , PERL Rules, PERL Sucks, HTML, HTML sucks, HTML rules

 

We obviously do not want to have to shut off Google access to UH, but if this attack continues, we may have no choice.

 

Can you please investigate this immediately and update us on the situation? Thank you.”

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 26

Contents

Web-Centric Software Architecture Web-Centric Projects Teaching Experience

Recommendations Conclusions

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 27

Recommendations (1)

Select the external Web site sources carefully: Study the responsiveness, availability and

format stability of the sources. Read the terms of usage and privacy policy

carefully.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 28

Recommendations (2)

Select the external Web sites carefully: XML sources much better than HTML

sources. XML DTD (Document Type Definition)

with industry-wise support is usually more stable.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 29

Recommendations (3)

Consider using local caching of external resources.

Examples: Local caching of Google's search

language interest pages. Local caching for the newsfeed: http://dcm

.cl.uh.edu/yue/courses/xml/notes/general/news.pl?topic=China

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 30

Advantages of Local Caching

Instructors have full control on the cached pages. Reduced risks. Improved availability and quality of

services. May change cache contents for testing

and grading. Examples: Freeze contents for grading. Add "$" for WML testing.

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 31

Problems of Local Caching

Local caching requires programming. Examples: approximately 2 hours of

programming for each of the Google's language interest cache the newsfeed cache the stock quote cache

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 32

A Caching Tool for Web-Centric Projects A Web-based tool for caching instructor

selected pages: using JSP/MySQL. Allow definitions of

external site URL and HTTP parameters Cache refresh method Snapshot taking Password Protection Statistics

In progress!

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 33

Contents

Web-Centric Software Architecture Web-Centric Projects Teaching Experience Recommendations

Conclusions

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 34

Conclusions

More difficult to set up Web-Centric Project Assignments.

Efforts are worthy. Challenges are mostly solvable. Working on a cache tool for Web-centric

projects. Further research: Web services will

provide challenges to the cache tool!

April 7, 2002 http//dcm.cl.uh.edu/yue;

yue@cl.uh.edupage 35

Questions?

Thank you!!

Recommended