Web technology and web service (ppt) - School of Information ...

nervousripSecurity

Nov 5, 2013 (4 years and 4 days ago)

85 views

Web Technology

Web Programming

Course Content


Web technology


Web Engineering


Java Web Technology


.NET Web Technology


PHP & Other open source technology


Lab:

Web Server installation & Tools for
created web

Web Programming

:Web technology


WWW History


WWW Component


WWW Architecture


Client Side Script


Server Side Script


Web services


Portal Technology


Web 2.0

Web Programming

::WWW History


1989
-
1990


Tim Berners
-
Lee invents the
World Wide Web at CERN


1994


Mark
Andreesen

invents MOSAIC
at National Center for Super Computing
Applications (NCSA)


First graphical browser


1995 (approx.)


Web traffic becomes
dominant


Exponential growth


E
-
commerce


Web infrastructure companies


World Wide Web Consortium


Web Programming

::WWW Component


Structural Components


Clients/browsers


to dominant implementations


Servers


run on sophisticated hardware


Caches


many interesting implementations


Internet


the global infrastructure which facilitates
data transfer


Semantic Components


Hyper Text Transfer Protocol (HTTP)


Hyper Text Markup Language (HTML)


eXtensible Markup Language (XML)


Uniform Resource Identifiers (URIs)

Web Programming

:::Web Browser


PC Browser


IE, Netscape, Firefox, Opera


Mobile Browser


Tablet PC


Web Client Application


Java Web Client

Web Programming

:::Web Server


Apache (Open Source)


PHP, Perl


IIS (Microsoft)


ASP, ASP.NET


Tomcat (Open Source)


Servlet, JSP

Web Programming

Source: Netcraft Server Survey, 2001

::WWW Architecture

Web Programming

:::Client Side Script


VB Script (.
vbs
)


Microsoft Technology


Use VB Engine


Look like VB


Java Script (.
js
)


Netscape Technology


When run on IE we call “Jscript”


Look like Java


AJAX


JAVA Script + XML to call Server side
technology

Web Programming

:::Ajax Component


Web Programming

[Morgan Kaufmann, Unleashing Web 2.0. 2007.P46]

::Server Side Script


Perl, PHP
(Open Source on Linux &
Windows)


Perl
-
> CGI Script


PHP
-
> Insert <? ….. ?> tag in html


ASP/ASP.NET

(Microsoft only Windows)


ASP
-
> use VB Script


ASP.NET
-
> use VB.NET or C#.NET


Servlet
, JSP
(SUN
opensource

cross
platform)


Servlet

-
> Java Class that printout HTML tag


JSP
-
> Insert <% …. %> tag in html

Web Programming

::Web services


Any thing can work as a
Services


Web Services Component


Service Application


WSDL files


SOAP Message


UDDI Server


Example Application


Collaborative web
-
> e
-
Tourism, e
-
Hotel

Web Programming

:::Web Service Paradigm


Web Programming

[Morgan Kaufmann, Unleashing Web 2.0. 2007.P47]

::Portal Technology


Portlet

technology (JSR168)


Integrate Multiple web application into
single front end


Portal Server


Web Sphere Portal (IBM)


Share Point Web Portal (MS)


Oracle Portal (Oracle)


Related Technology


Meta data system , Identity Management
System, Single Sign On (SSO)

Web Programming

::Web 2.0


Key Principle


The web as a platform


Data as the driving force


Lightweight business models


A rich, Interactive, user
-
friendly interface
based on Ajax, Flex


Example adopt Web 2.0


Blog, RSS Feed, Web APIs, Wiki


Web Programming

:::Web 2.0 Mind Map


Web Programming

::Java Servlet


Create Servlet class that extends
HTTPServlet


Override doGet or doPost method and
using Request and Response.


Compile to .class and deploy to Server.


Client call servlet and servlet run on
server side. (Generate to HTML Syntax)

Web Programming

:::Java Servlet Code

Web Programming

import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

public class HelloServlet
extends

HTTPServlet

{


public void
doGet
(HttpServletRequest req, HttpServletResponse res)


throws IOException, ServletException {


res.setContentType("text/html");


PrintWriter out = res.getWriter();



out.println("<html><body>");


out.println("<h1>Hello World!</h1>");


out.println("</body></html>");


}

}

::Java Server Page (JSP)


Create HTML by using Web Design tools.


Save as HTML to .jsp


Insert <% ….. %> tag for jsp code (Java
code)


Deploy .jsp file to server.


Open file as html .jsp will be convert to
servlet .java and compiled to servlet class.


Compiled servlet run on server side.

Web Programming

:::JSP Code

Web Programming

<!


HelloJSP.jsp
--
>

<HTML>


<BODY>


<%
out.println
(“Hello Test”) %>


<% for(
int

i
=0;i<10;i++){ %>



Hello Test
<%= I %>


<% } %>



</BODY>

</HTML>