dt211/3 internet development application internet development application

33
DT211/3 Internet Development Application Internet Development Application

Post on 21-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DT211/3 Internet Development Application Internet Development Application

DT211/3 Internet Development Application

Internet Development Application

Page 2: DT211/3 Internet Development Application Internet Development Application

Lecturer

Cindy Liu

Room K201 Kevin Street

Ext: 2868

Email: [email protected]

Website: www.comp.dit.ie/cliu

Page 3: DT211/3 Internet Development Application Internet Development Application

Course

To date, have looked at mostly “static” website

• HTML

•Client side javascript/ stylesheets etc

This course focuses on enabling dynamic web applications

Page 4: DT211/3 Internet Development Application Internet Development Application

Learning 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

Page 5: DT211/3 Internet Development Application Internet Development Application

Learning 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.

Page 6: DT211/3 Internet Development Application Internet Development Application

Course 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

Page 7: DT211/3 Internet Development Application Internet Development Application

Course 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

Page 8: DT211/3 Internet Development Application Internet Development Application

Schedule

Lecture and Lab

Tuesdays 15-17 in A308

Page 9: DT211/3 Internet Development Application Internet Development Application

Course Assessment

100% continue assessment

4 assignments –each will weight at 25%

Page 10: DT211/3 Internet Development Application Internet Development Application

Course MaterialsLectures 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, O’Reilly

Further book and web references throughout course

Zip disks/ keys

Page 11: DT211/3 Internet Development Application Internet Development Application

DT211/3 Internet Development Application

WWW and Client server model

Page 12: DT211/3 Internet Development Application Internet Development Application

World 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

• Visitor’s computer called the client, which has software capable of displaying the web files.

Page 13: DT211/3 Internet Development Application Internet Development Application

Resources:DatabasesApplication

e.g. “Get me a webpage”

Request

e.g. “here’s the web page”

Response

Web Brows

er

Client

Web Serve

r

Server

WWW and Client-Server model

Page 14: DT211/3 Internet Development Application Internet Development Application

WWW

 

• 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

Page 15: DT211/3 Internet Development Application Internet Development Application
Page 16: DT211/3 Internet Development Application Internet Development Application
Page 17: DT211/3 Internet Development Application Internet Development Application
Page 18: DT211/3 Internet Development Application Internet Development Application

WWW• 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

Page 19: DT211/3 Internet Development Application Internet Development Application

WWW – 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)

Page 20: DT211/3 Internet Development Application Internet Development Application

Resources:DatabasesApplication

e.g. “Get me a webpage”

Request

e.g. “here’s the web page”

Response

Web Brows

er

Client

Web Serve

r

Server

WWW and Client-Server model

Page 21: DT211/3 Internet Development Application Internet Development Application

• 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

Client side versus server side processing

Page 22: DT211/3 Internet Development Application Internet Development Application

Client side processing

Can perform functions without revisiting server – e.g. validation of user input on a form

Page 23: DT211/3 Internet Development Application Internet Development Application

Client 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)

Page 24: DT211/3 Internet Development Application Internet Development Application

The following technologies are run on the client machine by the web browser

Markup Languages:e.g. HTML / XHTML /XML, Style Sheets

Client Side Scriptings:e.g. JavaScript, VBScript /Jscript, Dynamic HTML

Java Applets

ActiveX Controls

Plug Ins / Helpers

Client-side technologies

Page 25: DT211/3 Internet Development Application Internet Development Application

HTML> <HEAD> <TITLE>Example error message display </TITLE> <SCRIPT> type = “text/javascript”>

<!—- document writeln (“<h1>you have not entered your name”<h1>2); // - -></SCRIPT> </HEAD><BODY> <BODY BGCOLOR="white"> <H1 align="center">Simple Test</H1> … etc

Example

Page 26: DT211/3 Internet Development Application Internet Development Application

•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

Limitations of client-side technologies

Page 27: DT211/3 Internet Development Application Internet Development Application

Server-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.

Page 28: DT211/3 Internet Development Application Internet Development Application

Server side processing

Page 29: DT211/3 Internet Development Application Internet Development Application

•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

Common Server Technologies

Server Side Technologies are those that run at the server side. Includes the following:

ServersideScripting

Page 30: DT211/3 Internet Development Application Internet Development Application

Server-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

Page 31: DT211/3 Internet Development Application Internet Development Application

•Scripts Reside on server

•Greater flexibility/functionality supported (e.g. database access

•Runs exclusive on server -> 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

Server-Side scripting

Page 32: DT211/3 Internet Development Application Internet Development Application

<html> <head><title>ASP Example 2</title></head> <body> <form method="POST" action="resultofexample2.asp"><p>A= <input type="text" name="ValueofA" size="20"></p><p>B= <input type="text" name="ValueofB" size="20"></p><p><input type="submit" value="Calculate" name="B1"></p></form></body></html>

Active Server Page Example – HTMl page

HTML FormCallsASP page(on next page)

Page 33: DT211/3 Internet Development Application Internet Development Application

html> <head><title>Results of Example 2 ASP Page</title></head> <body> <p>Example Page <%@ language="vbscript" %> <% dim A, BA=Request.form("ValueofA")B=Request.form("ValueofB") %> </p> <p>A+B= <%= eval(A)+eval(B) %> </p> <p>A-B= <%= eval(A)-eval(B) %> </p> <p>A*B= <%= eval(A)*eval(B) %> </p></body></html>

ASP Example – ASP page

Script(Not sent to client…Not visiblein “viewsource”)