Web Design & Development
Lecture 1
Course Introduction
Modules
Introduction & Basic Programming in Java
Basic Syntax
OOP
Exception Handling
IO Streams
GUIs & Event Handling
Graphics (time dependent)
Data Base Connectivity
Network programming
Socket Based Client Server Programming
Remote Method Invocation
Course Introduction
Modules
Web Application Development
Introduction to basic web technologies
JSPs
Servlet
JSF
Java Beans
Other J2EE technologies
Web / Enterprise Application Design
Application Architecture Considerations
Design Strategies
Programming in Layers
Course Introduction
Modules
Others (Time dependent)
Web Services
XML and related stuff
Design Patterns
Comparison with .NET Architecture
Objectives & Outcome of the course
Students should be able to design and develop a
Web based Enterprise Application
Understand and appreciate various Web
Architectures, technologies and solutions that can be
used
Learn Java and other Allied Technologies as a by
product of the course
Course Material
Reference Books
Core Web Programming by Marty Hall
Java2 Complete Reference by Helbert
Advanced Java How To Program by Deitel
(Any good book on Java & J2EE will do)
A lot of material is available online. There are useful sites such
as
[Link]
[Link]
Handouts
Lecture CDs and possible demo AVIs
Learning Methodology
I hear and I forget,
I see and I remember,
I do and I understand
Chinese Proverb
Assignments
Assignments On
General Programming
GUI based
Graphics (small game)
Network Programming (chat / file sharing server / multi
user network game)
2-3 Assignments on simple WEB Applications to make
you comfortable with different technologies
One relatively large Project (Web based Application)
Talk about Plagiarism
World Wide Web
What Is the World Wide Web?
The internet is a network
of computer networks
worldwide
The web is a tool used to
retrieve information
published on the internet
To navigate the web we
use a browser i.E.
Netscape or internet
explorer
Brief History of the www
1968 - DARPA (Defense Advanced Research Projects
Agency) contracts with BBN (Bolt, Beranek & Newman)
to create ARPAnet
1970 - First five nodes:
UCLA
Stanford
UC Santa Barbara
U of Utah, and
BBN
1974 - TCP specification by Vint Cerf
1984 – On January 1, the Internet with its
1000 hosts converts en masse to using
TCP/IP for its messaging
Internet Protocols
HTTP
Original web communication protocol
Request-Response type
Client (browser) will open a connection to a server and
then send a request using a very specific format
Server will respond and close the connection
Stateless
Does not maintain any connection information between
transaction information
Feature
Negotiation of data representation, allowing systems to
build indepently of the data being transferred
TCP/IP
Transmission Control Protocol over Internet Protocol
IP ensures that data packets reach the destination from the
source of communication
Not necessarily data packets follow the same path
TCP keeps track of these packets, and manages the
assembling of these packets to form the original message
Thus, both TCP and IP work together to ensure that
effective transmission of data over the internet
WebSite (Web Brouchers)
vs
Web Application
Web Brochures vs. Web Applications
WebSite (Web Brochures ) Web Applications
Goal Information: Web interface to any
Text, graphics, tables application
Interaction: Data entry,
data selection, checking,
ordering
Emphasis Professional look, graphic Optimal support for the
design work flow
Implementation Few interaction steps, Usually interacts with data
mostly static pages (e.g. source
data entries)
Incorporates business logic
Navigation (browsing) -
May contain simple or
many integrated hyperlinks
complex navigation
with jumps to other pages
Dynamic behaviour
Web Brochures vs. Web Applications
Web Brochures Web Applications
Deployment WWW May present on
companies LAN or WWW
Examples Apps University Web Sites, [Link]
Personal Home Page etc. Purchasing System
Address Book etc
c
Advantages of Using
Web Applications
Allows you to browse a wide
variety of internet sources
Instantaneous connections to
internet sites world wide
Disadvantages of Using
Web Applications
Connections can be slow or
busy
No standard methods of
organization
Out-of -date materials may not
be removed
Contents can be (maliciously)
altered
Sites can simply be
moved/removed
Web Application
Architecture
Layers
Figure shows a simplified view of one application and its layers.
Layers
It is important to note that the layers are merely logical groupings of the
software components that make up the application or service.
They help to differentiate between the different kinds of tasks
performed by the components.
The make it easier to design reusability into the solution.
Each logical layer contains a number of discrete component types
grouped into sublayers, with each sublayer performing a specific kind of
task.
By identifying the generic kinds of components that exist in most
solutions, you can construct a meaningful map of an application or
service, and then use this map as a blueprint for your design.
Evolution of Enterprise
Application Framework for C/S Arc
Single tier
Two tier
Three tier
RPC based
Remote object based
Three tier (HTML browser and Web server)
Proprietary application server
Standard application server
N-Tier
Client-server architectures
1-tier Architecture
Entire application exists on single node
Installed on individual machines
Dumb terminals are directly connected to
mainframe
Centralized model (as opposed distributed
model)
Presentation, business logic, and data
access are intertwined in one monolithic
mainframe application
Types of systems
Standalone executable
Mainframe applications
Client-server architectures
1-tier Evaluation
Advantages
Simple to build
Natural
No client side management is required
Data consistency is easy to achieve
Disadvantages
Facilitates very little reuse
Maintenance can be expensive
Single point of failure
Scaling systems requires buying bigger, costly hardware
Client-server architectures
2-tier Architecture
Client Server Applications
The client and server can be heterogeneous
Different implementation languages
Different operating systems
The roles can be transient
Fat client – server only manages data
talk to back end database
SQL queries sent, raw data returned
Some Windows GUI based application
Thin Client – server manages data and business logic
Browser – server manages presentation too
Client-server architectures
2-Tier Thin and fat clients
Presentation
Server
Thin-client Data management
model Client
Application processing
Presentation
Application processing Server
Fat-client
model Client
Data management
A client-server system
c2 c3 c4
c12
c11
Server process
c1 s1 s4
c10
c5
Client process
s2 s3
c9
c6
c7 c8
Client-server architectures
2-tier Evaluation
Advantages
Modifications on server propagated to clients
Can distribute processing load
Better scalability by adding server nodes and clients
Database type independence
Disadvantages
Client nodes require more computing power
Development and maintenance more complex
Presentation, data model, business logic are intertwined (at client side), difficult
for updates and maintenance
Data Model is “tightly coupled” to every client: If DB Schema changes, all
clients break
Updates have to be deployed to all clients making System maintenance
nightmare
DB connection for every client, thus difficult to scale
Raw data transferred to client for processing causes high network traffic
A client-server ATM system
ATM
ATM Account server
Tele- Customer
processing account
monitor database
ATM
ATM
3-tier Architecture (General)
Applications are generally partitioned as Client, Control (business) and
Data Components
In 3-Tier
Each logical partition maps to a layer in the system
Modeling layers and software layers match 1-to-1
Each layer implemented with appropriate technologies
Layers have their own internal architectures
3-tier Evaluation
Advantages
Complete separation of concerns
Control logic can be reused by client applications
Caches results in the controller layer
Maximum flexibility for enterprise-wide applications
Disadvantages
Difficult to integrate legacy stovepipes which represent large
investment
Complexity
Speed decreases with levels of indirection and latency
Increases cost and development time
Lack of knowledgeable developers and managers
A 3-tier C/S architecture
Presentation
Server Server
Client Application Data
processing management
An internet banking system
Client HTTP interaction
Web server Database server
Client
SQL query
Account service Customer
SQL account
provision
database
Client
Client
N-tier (multi-tier & multi-layered) Architecture
Layers added for better separation of concerns
• Every layer does a specified task, which improves cohesion and lowers coupling
• Application can be divided among developers with well defined roles.
• Layers and Tiers need not have 1-1 mapping. 3-tier is popular as its maps to typical IT problems
• For example a fortune five company uses
• JSP-Servlet-Handler-Translator-EJB-DAO layers
• These layers are deployed on three physical tiers which are
• Thin client Web + Application server Database Tiers