Title: DT211/3 Internet Development Application
1DT211/3 Internet Development Application
Internet Development Application
2Lecturer
Cindy Liu Room K201 Kevin Street Ext
2868 Email cindy.liu_at_comp.dit.ie Website
www.comp.dit.ie/cliu
3Course
- To date, have looked at mostly static website
- HTML
- Client side javascript/ stylesheets etc
- This course focuses on enabling dynamic web
applications
4Learning outcomes
Learn the concepts and the principles of WWW Be
able to set up and maintain a web server Be
able to develop database-driven Web applications
using a formal design method
5Learning outcomes
Be able to construct and maintain a well designed
web site Be use the state-of-the-art web
application development tools and languages to
develop web applications Be familiar with
current issues and trends in web applications
development technologies.
6Course Outline
Web servers web servers in an internet
architecture installing and configuring a web
server servicing HTTP requests features
provided by a web server comparing and
contrasting different servers.
Server Pages developing a server side
application using markup language embedded with
programming code
7Course Outline
Accessing databases connecting to a database,
embedded SQL, available databases, database
features necessary in a web application
Server side technologies overview of available
server side technologies, CGI, Perl, PHP, Cold
Fusion, ASP, JSP, Java servlets contrasting
comparing capabilities and functionality
available for server side development recent
advances in server side technologies
8Schedule
Lecture and Lab
Tuesdays 15-17 in A308
9Course Assessment
100 continue assessment
4 assignments each will weight at 25
10Course Materials
Lectures Notes on http//www.comp.dit.ie/cliu/
Books Internet and the world wide web
2nd edition Deitel, Deitel Neito Java
server Pages 2nd edition Hans Bergsten,
OReilly Further book and web references
throughout course Zip disks/ keys
11DT211/3 Internet Development Application
WWW and Client server model
12World Wide Web (WWW)
- At a minimum, a website requires
- A set of files, e.g. HTML files
- A piece of software residing on a computer
connected to the internet which can display these
files .. Web server - Visitors computer called the client, which has
software capable of displaying the web files.
13WWW and Client-Server model
Request
e.g. Get me a webpage
Web Browser
Web Server
Resources Databases Application
Response
Server
Client
e.g. heres the web page
14WWW
- In early days of WWW, simple relationship between
the browser and a distant server - User requests a web page via the browser
- Server received request, server sent back the
page that you wanted - Web sites were often limited to brochureware
- static pages
- every user sees same pages
- Web sites heavily reliant on HTML to provide
functionality
15(No Transcript)
16(No Transcript)
17(No Transcript)
18WWW
- Requirement grew for more sophisticated websites
with dynamic content - e.g. search engines, bulletin boards, shopping
sites, personalisation ---? Users see different
pages,depending on user input - HTML and client technology insufficient
- Web pages need to be generated on the fly or
dynamically - A range of server-side technologies now
available, such as JSP, ASP, PHP, Cold Fusion, CGI
19WWW Client Server model
- World Wide Web uses Client Server Model
- Client (browser) sends request to server (web
server) for resource .. - Web server accesses resource
- Web server responds to client with resource
- Browser/ web server communication
- Need a protocol to communicate
- HTTP (Hyper Text Transfer Protocol)
20WWW and Client-Server model
Request
e.g. Get me a webpage
Web Browser
Web Server
Resources Databases Application
Response
Server
Client
e.g. heres the web page
21Client side versus server side processing
- Need to understand the difference as each one has
limitations and specific purposes - Client side processing occurs on the client
machine (i.e. machine that has requested the web
page) - Server side processing occurs on the server
22Client side processing
Can perform functions without revisiting server
e.g. validation of user input on a form
23Client technologies
- Client side technology (e.g. java script, HTML)
is run on the client machine - Used for
- Presentation (I.e. text/images etc)
- Validation of user input
- Enhanced interactivity e.g. graphics, buttons
- Reduces the number of visits to the server
(e.g. user input can be validated without having
to revisit the server)
24Client-side technologies
The following technologies are run on the client
machine by the web browser Markup Languagese.g.
HTML / XHTML /XML, Style Sheets Client Side
Scriptingse.g. JavaScript, VBScript /Jscript,
Dynamic HTML Java Applets ActiveX Controls Plug
Ins / Helpers
25Example
HTMLgt ltHEADgt ltTITLEgtExample error message
display lt/TITLEgt ltSCRIPTgt type
text/javascriptgt lt!- document writeln
(lth1gtyou have not entered your namelth1gt2)
// - -gt lt/SCRIPTgt lt/HEADgt ltBODYgt ltBODY
BGCOLOR"white"gt ltH1 align"center"gtSimple
Testlt/H1gt etc
26Limitations of client-side technologies
- Cannot implement functionality that requires
returns customised information to the user e.g.
database searches - Client machine/device must be sufficiently
powerful (mobile devices) - Need to ensure browser support client software
- Source code is visible
27Server-Side functionality
- Server-side functionality needed to
- generate dynamic content from a database (as
opposed to static HTML pages) - Process user requests/interactivity
- Retrieve information from users
- Manage sessions.. and more.
28Server side processing
29Common Server Technologies
Server Side Technologies are those that run at
the server side. Includes the following
- CGI Common Gateway Interface
- Java Servlets
- ASP Active Server pages
- JSP Java Server pages
- PHP Personal Home page
- Cold Fusion
- SSJS - Server side javascript
- Server extension APIs
Server side Scripting
30Server-Side scripting
- Servers-side technologies include a range of
scripting technologies - Scripting Where HTML is mixed with program code
- Only a small portion of the page is generated and
templates or skeleton contain the headers,
footers and other format information. - The page contains scripting information - the
web server has built-in interpreter to make the
modifications to the page based on the scripting
information - Common sever-side scripting technologies are
- Active Server Pages (microsoft), Java Server
Pages (sun) - PHP, Cold Fusion
31Server-Side scripting
- Scripts Reside on server
- Greater flexibility/functionality supported (e.g.
database access - Runs exclusive on server -gt not concerned with
client browser support. Result is sent over the
network to the client - Script/code not visible to client only HTML and
client-side scripts sent to client machine
32Active Server Page Example HTMl page
lthtmlgt
ltheadgt
HTML Form Calls ASP page (on next page)
lttitlegtASP Example 2lt/titlegt
lt/headgt
ltbodygt
ltform method"POST" action"resultofexample2.asp"gt
ltpgtA ltinput type"text" name"ValueofA"
size"20"gtlt/pgt
ltpgtB ltinput type"text" name"ValueofB"
size"20"gtlt/pgt
ltpgtltinput type"submit" value"Calculate"
name"B1"gtlt/pgt
lt/formgt
lt/bodygt
lt/htmlgt
33ASP Example ASP page
htmlgt
ltheadgt
lttitlegtResults of Example 2 ASP Pagelt/titlegt
lt/headgt
ltbodygt
ltpgtExample Page lt_at_ language"vbscript" gt
lt dim A, B
Script (Not sent to client Not visible in
view source)
ARequest.form("ValueofA")
BRequest.form("ValueofB") gt lt/pgt
ltpgtAB lt eval(A)eval(B) gt lt/pgt
ltpgtA-B lt eval(A)-eval(B) gt lt/pgt
ltpgtAB lt eval(A)eval(B) gt lt/pgt
lt/bodygtlt/htmlgt