Csci 6962 server side design and programming
1 / 30

CSCI 6962: Server-side Design and Programming - PowerPoint PPT Presentation

  • Uploaded on

CSCI 6962: Server-side Design and Programming. Course Introduction and Overview. Topics. Introduction to Client-Server Web Architectures Java Server Faces and Active Server Pages Problems and Topics in Server-side Programming Programming Assignments. Client-Server Web Architecture.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'CSCI 6962: Server-side Design and Programming' - etana

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Csci 6962 server side design and programming

CSCI 6962: Server-side Design and Programming

Course Introduction and Overview


  • Introduction to Client-Server Web Architectures

  • Java Server Faces and Active Server Pages

  • Problems and Topics in Server-side Programming

  • Programming Assignments

Client server web architecture
Client-Server Web Architecture

  • Client browser sends request for page to server

    • May contain form data and other information

  • Server sends response page and sends to client

  • May need to generate response page dynamically

    • Form parameters

    • Previous requests (such as items purchased so far)

    • Information in database

Focus of this course

Client server web architecture1
Client-Server Web Architecture

Request to

for Syllabus.html



john public_html




Response containing Syllabus.htm as a long string (<html><head><title>CSCI 6962 Syllabus</title> </head><body>…)

Dynamic form handling
Dynamic Form Handling

  • Form data appended to request string

    Generates the request:

<FORM NAME="purchaseform" METHOD=GET


Quantity: <INPUT TYPE="text" NAME="quantity" />

<BR /><BR />



Form handling
Form Handling

Server must:

  • Listen on port for requests

  • Parse request to determine values of parameters

  • Dynamically generate appropriate response page based on parameter values

  • Send response page back to client

Web containers
Web Containers

  • Program running continuously on server

  • Runs code to handle requests

  • Built-in methods for parsing requests, generating responses

  • Handles other important functions:

    • Session tracking

    • Database access

    • Email generation

    • Security and encryption

Web containers1
Web Containers





Web Container

Listen on port

Execute code in requested server page

Generate corresponding html page

Constantly running in background

Web containers2
Web Containers

  • Glassfish

    • Written in Java

    • Built on Apache Tomcat

    • NetBeans IDE

    • Acts as engine for Java servlets, Java Server Pages and Java Server Faces

  • Microsoft Internet Information Server (IIS)

    • Visual Basic/C#

    • Acts as engine for Active Server Pages

Server side evolution
Server-side Evolution

  • Servlets

    • Programmatically generating response page

  • Server pages

    • Inserting dynamically generated code into web page

    • Goal: separate web designand dynamic code

  • Server faces/Active server pages

    • Directly linking client-side form elements to server-side objects (JavaBeans)

    • Goal: separate web page development from underlying business logic

Java servlets
Java Servlets

Create output to response

Get quantity from request

Write response page as string to output with quantity inserted

Java server pages
Java Server Pages

Java code executed inside web page

Resulting value inserted into html

Java server faces
Java Server Faces

  • Use managed beans to control information

    • Data storage between pages

    • Computation methods (total bill, taxes, etc.)

    • Validation methods (positive quantity, items available)

    • Long-term storage (database read/write of orders)

JSF web page

JSF managed bean

Web design team

Business logic team

Java server faces1
Java Server Faces

Bean stores quantity

Getters and setters to allow access

Java server faces2
Java Server Faces

Input bound to quantity property of bean

XML tags specific to JSF

Java server faces3
Java Server Faces


quantity: 3


Active server pages
Active Server Pages

  • Active Server Page approach:Create “form” which is translated to html

Active server pages1
Active Server Pages

  • Server-side code manipulates “form elements”

    • Subroutine called when page submitted

    • Data read from elements (actually request string)

    • Used to set value of other elements

Active server pages2
Active Server Pages

  • Resulting form translated to response page

Why two platforms
Why Two Platforms

  • Both widely used in practice

    • Other platforms (Springs, Ruby, etc.) based on JSF model

  • Different approaches but common ideas

    • Same underlying representation

    • Same best practices for web site design

Other major topics
Other Major Topics

  • Session management

  • Modular web site design

  • Validation and error handling

  • Database manipulation

  • AJAX client-server communication

  • Security

Session handling
Session Handling

  • Most web transactions are sessions consisting of series of requests and responses

  • Must associate steps if multiple clients

Who submitted this request?

Modular w eb pages
Modular Web Pages

  • Most pages on same site have similar content,layout, etc.

  • Goal: Write once, include in all pages

  • Tools:

    • Facelets (Java)

    • Master Pages (ASP)

Form validation
Form Validation

  • Detecting user error

    • Built-in validation tools

  • Correcting user error

    • Providing information or how to correct error

  • Preventing user error

    • Field types/values

    • Error tolerance

Database manipulation
Database Manipulation

  • Database driver provides access to databases

  • Built-in tools to manipulate/display data

    • JDBC: classes to query/manipulate database

    • Java Persistence API beans

    • ASP Data Source objects

web container

database server


database driver



JPA bean



Csci 6962 server side design and programming

Asynchronous JavaScript and XML

Based on JavaScript running in browser

JavaScript code sends data to server, reads response

Response is simple data instead of entire page

JavaScript code then modifies page without re-rendering it completely

Method call

Web Page



Return value

Web site security
Web Site Security

  • SSL/TLS for encryption

  • Certificates for server authentication

  • Secure programming against attacks

    • SQL injection

    • Cross-site scripting



database server





Programming assignments
Programming Assignments

  • Introductory Assignments

    • Simple Java Server Faces web site

    • Simple Active Server Pages web site

  • Web Site Project (four parts)

    • Modular user interface design

    • Validation and error handling

    • Database access

    • Shopping cart and other support objects

Web site project
Web Site Project

  • “E-Commerce” site of your design

  • You choose platform (JSF or ASP)


etc. information

List of products

List of products

“Cart” of added products

List of products

List of products


Product pages with “add” option

\Database of products and orders

Background knowledge
Background Knowledge

  • Java or C++ (for JSP)

    • May want to get Java reference

    • I will cover basics in class

  • Visual Basic or C# (for ASP)

    • Basics covered in class

    • If more familiar with C# can get corresponding text

  • Basic html (including forms and tables)

  • Basic SQL