Web Applications Engineering: Wrap-up

Transcription

Web Applications Engineering: Wrap-up
Web Applications Engineering:
Wrap-up
Dr. Moshe Chai Barukh
Service Oriented Computing Group, CSE, UNSW
Week 12
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
1 / 55
Acknowledgements
Contents from this slides has been reused from Dr. H. Paik.
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
2 / 55
Internet: IP (the address); TCP (communication, port numbers); DNS (Domain names);
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
3 / 55
Web: HTTP (hypertext transport); URL (Uniform Addressing); HTML
(hypertext markup);
Web Browsers and Web Servers
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
4 / 55
Web Applications: Dynamic interactions, changing states, getting things done!!
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
5 / 55
Developing a Web application
Client-side programming - HTML/CSS, JavaScripts
Server-side programming - Many solutions. Essentially it is a programming
framework for processing HTTP dynamically.
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
6 / 55
Separating Data from Presentation: XML
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="staffcard.xsl" ?>
<staff>
<name>Helen Paik</name>
<title>Lecturer, UNSW</title>
<email>hpaik@cse</email>
<extension>54095</extension>
<photo src="me.gif" />
</staff>
e.g., http://www.csszengarden.com/
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
7 / 55
Also worth mentioning that XML ...
is a well-supported standard data format (W3 standard)
has free and standard parser support (SAX and DOM interfaces)
has definition and validation support (e.g., Document Type
Definition)
has standard query languages (XPath, XQuery)
has standard transformation language (XSLT)
has many applications (SVG, MathML, CML, etc.)
In many ways, Web applications and XML are inseparable.
e.g, think of configuration files, development languages themselves, data
exchange formats, and more.
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
8 / 55
Servlets
Java-based solution for server-side programming. Servlet Container
manages the life-cycle of servlets (servlet config and context objects).
does not
exist
Container
Servlet Class
Servlet Object
load class
constructor,
init()
destroy()
Servlet
(initialised)
Instantiate (constructor runs)
service()
init()
called once in the servlet's life
service()
handle client requests
doGet(), doPost(), etc.
Each request runs
in a separate thread.
destroy()
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
9 / 55
Servlets: Web application contains ...
addressbook Web application:
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
10 / 55
Servlets: Parameter Data and Query Strings
http://www.ecample.com/servlet/PrintThis?arg=aString&color=red
Query string?
Parameters?
Does order of parameters matter?
How do you pass ’a String’ (including space and quotes) as arg’s
value?
HttpServletRequest methods for accessing parameter data?
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
11 / 55
Servlets: Forms
HTML forms elements are used to send parameters.
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
12 / 55
Servlets: HTTP GET and POST
POST (implications on the server-side?)
GET (implications on the server-side?)
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
13 / 55
Servlets: Sessions
HTTP is stateless ...
Issue
Welcome
Start
Session
Welcome
Servlet
Create
a Journey object
for the user
Display
Choices
Menu
Servlet
Add Choice
to Journey
Show
Journey
so far
Control
Servlet
Close
Session
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Enough
Servlet
Week 12
14 / 55
Servlets: Sessions
Use of Cookies (JSESSIONID), URL re-writing ...
User
Travel-Application
request
response
request
response (sessID=50)
WelcomeServlet
MenuServlet
request (sessID=50)
response (sessID=50)
ControlServlet
request (sessID=50)
response
EnoughServlet
Memory
(In the servlet container)
SessionTable
user1
s25
user2
s29
user3
s36
user4
s50
SessionData
address
id
attribute
s25
"JourneyFlag"
s29
"Queue"
s36
"Patron"
s50 "JourneyFlag"
new entry for the new user
jny2 obj
jny obj
SA
WA
Note: Cookies have more generic usage than just for sessions!
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
15 / 55
Servlets: Attributes
(HeadFirst, p.187)
Context Attributes
Servlet
read
DB
Connection
AdminEmail
xx@xxxx
read
read
Servlet
ConcurrentUsers
42
write
JSP
read
Everyone in the application has access
Session Attributes
Servlet
Servlet
Shopping
Cart A
read
write
read
UserName
Helen
JSP
Accessible to only those with access to a specific HttpSession
Request Attributes
Servlet
write
OptionChoice
Dark Beer
JSP
read
Accessible to only those with access to a specific (Http)ServletRequest
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
16 / 55
JSP
Presentation layer technology - should not be used for coding business logic.
page
directive
elements
include
taglib
scripting
declaration
scriptlet
expression
action
standard
JSP
custom
template (HTML bits ...)
Use less scripting more ’actions’ (e.g., using beans), EL (expression language),
standard libraries like JSTL.
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
17 / 55
DB layer (Data is important!)
JDBC:
java.sql.*
SQL Query
Java
Program
JVM
M. C. Barukh, H. Paik (CSE, UNSW)
DBMS
Driver
Results
JDBC
COMP9321, 15s1
Week 12
18 / 55
DB layer: DAO Patterns
DAO implementation:
CarDTO
Cars
----------------------------------CarNr
Make Cost
----------------------------------YPZ400 Ford
50
YPZ412 Ford
80
YPZ600 Mazda 80
WPZ600 BMW 100
WPZ610 BMW 200
WPZ620 BMW 250
PPZ410 Benz 250
PPZ420 Benz 350
PPZ430 Ford
150
YPZ420 Honda 150
------------------------------------
M. C. Barukh, H. Paik (CSE, UNSW)
// plus Setter and Getter methods for
these properties
carnr
make
cost
CarDAOImpl.
List findAll() {
JDBC connect
select * from cars
create CarDTOs
return CarDTO list
}
COMP9321, 15s1
<<interface>>
CarDAO
List findAll()
- Client Code CarDAO.findAll()
Loop
display individual CarDTO
Week 12
19 / 55
DB layer: ORM Mapping
ORM (Object-Relational Mapping):
Various paradigm mismatch problems (object world vs. relational/entity
world)
We want to call car.save(), rather than writing ’insert into’ statement
Database
JDBC
Mappings
Hibernate
Configuration
Java Objects
Client Code
What does Hibernate do for you?
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
20 / 55
MVC pattern
It is ’the’ design pattern that glues your application together.
response
Container
Browser
1
request
Servlet
(Controller)
4
2
JSP
(View)
3
5
JavaBean
(Model)
Data
request
Server
Key: having a controller
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
21 / 55
A scenario: Building ShipFast.com
Say you own a delivery service company and want to go online.
Your business partners are online retail companies.
Purpose of moving the operation online is (roughly)
to allow your business partners to send the delivery requests online,
calculate the quote and send it back to your partner
notify the shipment to your partner when it is done
KennyCD.com
Customer
KennyCD.com
Site
Internet
M. C. Barukh, H. Paik (CSE, UNSW)
Business
System
COMP9321, 15s1
ShipFast.com
Internet
Business
System
Week 12
22 / 55
A Generic e-Commerce Architecture
Presentation
Layer
Firewall
HTTP/
HTML
Firewall
A system typically consists of three layers and security layers.
Proprietary
Component
Protocol
Business
Layer
Database
Access API
Database
Layer
Each “layer” in the diagram has a purpose, architecture and an API.
There are two leaders among the providers of this architecture and
development frameworks: J2EE and Microsoft.NET
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
23 / 55
A Typical e-Commerce Architecture
Presentation Tier: responsible for working with clients (accepts
HTTP request, returns HTML as response). Different browsers have
different display capabilities. Presentation tier should deal with
tailoring HTML to the specific client browser type (including mobile
devices)
Business Tier: responsible for business logic, typically this layer has
packaged components working through well-defined interfaces (J2EE:
EJB, .NET:COM+). It requires resources such as database
connections, transaction management, etc. These resource
requirements normally make it difficult to support a large number of
clients. The presentation layer communicates with the business tier
through a method transport protocol (eg., J2EE: RMI/IIOP, .NET:
DCOM or SOAP)
Database Tier: responsible for storing data. Communication
between Database Tier and Business Tier use a specific API (J2EE:
JDBC, .NET: ADO.NET)
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
24 / 55
ShipFast.com with .NET
Compare this to the generic architecture previously shown:
ASP.NET
business
layer
Firewall
HTTP/
HTML
Firewall
presentation
layer
DCOM, MSMQ
or SOAP
COM+
using Visual
Studio.NET
ADO.NET
.NET
enterprise
servers
SQL
Server or other
ADO.NET
compliant DB
database
layer
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
25 / 55
ShipFast.com with J2EE
Compare this to the generic architecture and .NET previously shown:
JSP
Firewall
HTTP/
HTML
Firewall
presentation
layer
RMI / IIOP
JMS
or SOAP
business
layer
EJB or
JavaBeans
JDBC
J2EE services
Any JDBC
compliant DB
database
layer
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
26 / 55
Why Web Services?
Companies rely on technologies to create efficiencies and expand market
opportunities.
More and more companies collaborate with a wider circle of suppliers,
service providers and strategic partners.
These companies must integrate their disparate applications.
eg., Amazon.com Web services
E-commerce services (third party suppliers): integrated through
Amazon.com’s ecommerce API which is based on Web Services
http://aws.amazon.com/fws/#functionality
Coding for Fun (an implementation example): http://blogs.msdn.
com/coding4fun/archive/2006/10/31/912260.aspx
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
27 / 55
Going back to ShipFast.com
KennyCD.com
Site
KennyCD
.com
Customer
Business
System
(.NET)
KennyCD
.com
Customer
TomBooks.com
Site
Internet
TomBooks
.com
Customer
ShipFast.com
Business
System
(PHP)
Internet
Business
System
(J2EE)
Some Other Site
Business
System
(J2EE)
how can you communicate with KennyCD.com and many others?
integration of heterogeneous business layers that talk different
protocols and have different data type representation
should be able to access remote functionality without being tied to
specific languages or platforms
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
28 / 55
Existing technologies for accessing remote functionality
Traditional Remote Procedure Calls (RPC):
.NET Distributed COM (Component Object Model)
J2EE Enterprise JavaBeans
Java RMI
and the list goes on ...
Need one idea to rule them all.
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
29 / 55
Web Services
Key concept:
Allow applications to share data and invoke capabilities from other
applications
I
Without regard to how those applications were built, what operating
system or platform they run on, and what devices are used to access
them.
Can be called across platforms and operating systems, regardless of
programming language.
Key facts:
A standardised way of application-to-application communication
based on XML open standards (ie., SOAP, WSDL and UDDI) over an
Internet protocol backbone.
Major developers include: Apache, IBM, HP, Sun and Microsoft
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
30 / 55
A bit about SOAP
In late 1990, Microsoft started to think that their remote object
access technology COM/DCOM is weak and that they need
something that is cross-platform – and naturally integrated with the
Internet environment.
With their .Net initiative, they started developing a data transmit
protocol called SOAP (Simple Object Access Protocol).
The protocol is based on XML and uses HTTP, FTP and SMTP
(Simple Mail Transfer Protocol) as a data transfer protocol.
Microsoft perfected the SOAP standard, they open-sourced this by
giving it to W3C.
W3C made SOAP an official standard for XML messasging
With other vendors following this standard, the way we access remote
objects may finally become standardised ...
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
31 / 55
SOAP and Web Services
SOAP is a protocol for moving data across the Internet.
Web services are the remote objects. They use SOAP to transmit data to
and from client (client can also be a Web service)
So, SOAP is a part of what makes Web Services possible, but that is not
the complete picture of Web Services.
Web service implementation platform providers:
Microsoft .NET (locked with one Web server, IIS)
Various Java implementations
I
I
J2EE platforms (Jboss, Websphere, WebLogic)
Apache Axis
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
32 / 55
Web Services Conceptual Architecture (IBM)
http://www-4.ibm.com/software/solutions/webservices/pdf/WSCA.pdf
Service
Description
Service
Registry
Find
Publish
Service
Provider
Service
Requestor
Bind
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Service
Service
Description
Week 12
33 / 55
Web Services Conceptual Architecture (IBM)
Three roles:
service provider: develops an electronic service and registers its
description at a publicly accessible service registry.
service registry: hosts web services
service requestor: query the registry to find an electronic service
that meets his or her requirements. A binding occurs between the
service provider and the service requestor.
Main Web Services Standards:
For service registry: UDDI, Universal Description, Discovery and
Integration (www.uddi.org/)
For service description: WSDL, Web-services Description Language (
www.w3.org/TR/wsdl/)
For messages: SOAP, Simple Object Access Protocol
(www.w3.org/TR/SOAP/)
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
34 / 55
Interactions between WS and Client
The web service provider declares his services within the UDDI register.
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
35 / 55
Interactions between WS and Client
The client looks for a Web service in the UDDI register
Downloads the Web service’s WSDL to build or generate a proxy
(stub) for the web service
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
36 / 55
Interactions between WS and Client
The client invokes the Web service through the user of the proxy via SOAP
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
37 / 55
XML Messaging Using SOAP
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
38 / 55
Simple Object Access Protocol (SOAP)
A SOAP message is an XML document with predefined elements
It also defines data encoding rules
<?xml version=’1.0’ encoding=’UTF-8’?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<key xsi:type="xsd:string">00000000000000000000000000000000</key>
<q xsi:type="xsd:string">shrdlu winograd maclisp teletype</q>
<start xsi:type="xsd:int">0</start>
<maxResults xsi:type="xsd:int">10</maxResults>
</ns1:doGoogleSearch>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Specification:http://www.w3.org/TR/2000/NOTE-SOAP-20000508/
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
39 / 55
Binding SOAP with a Transfer Protocol
SOAP binding describes how a SOAP message is carried in a transport
protocol (eg., HTTP, SMTP or FTP). For example, to bind SOAP to
HTTP:
A SOAP request is wrapped inside an HTTP POST
The HTTP POST request specifies at least two HTTP headers:
Content-Type and Content-Length.
Content-Type: defines the MIME type for the SOAP message and the
character encoding (optional) used
Content-Length: specifies the number of bytes in the body of the
SOAP request or response.
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
40 / 55
An example of SOAP Binding over HTTP
Here is a request to a web service for the current price of stock DIS:
POST /StockQuote HTTP/1.1
Host: www.stockquoteserver.com
Content-Type: text/xml; charset="utf-8"
Content-Length: nnnn
SOAPAction: "Some-URI"
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<m:GetLastTradePrice xmlns:m="Some-URI">
<symbol>DIS</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
41 / 55
An example of SOAP Binding over HTTP
And here is the response from the service:
HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
Content-Length: nnnn
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<SOAP-ENV:Body>
<m:GetLastTradePriceResponse xmlns:m="Some-URI">
<Price>34.5</Price>
</m:GetLastTradePriceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
42 / 55
An example of SOAP Binding over SMTP
To: <[email protected]>
From: <[email protected]>
Reply-To: <[email protected]>
Date: Tue, 15 Nov 2001 23:27:00 -0700
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: text/xml; charset=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle=3D"http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC=3D"http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<m:echoString xmlns:m=3D"http://soapinterop.org/">
<inputString>get your SOAP over SMTP here !</inputString>
</m:echoString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
43 / 55
Web Services Description
Web Service Description is a machine-processable specification of the Web
service’s interface, written in Web Service Description Language (WSDL).
Specification: http://www.w3.org/TR/wsdl
The Web Services Description Language (WSDL) uses XML syntax. It
describes a service in terms of the operations that make up the service, the
messages that each operation requires, and the parts from which each
message is composed.
WSDL is used by the client to generate a proxy (stub) to the Web service.
The proxy is then acts as a go-between between the WS and the client.
This is usually done by a tool.
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
44 / 55
Web Services Description
Definition
Types
Element
Messages
Part
PortType
Operation
Input
Output
Binding
soap:binding
soap:operation
operation
Input
Service
documentation
Output
port
soap:address
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
45 / 55
Google Web Service
Google offers a web service that enables programmatic access to its search
engine Three individual operations are provided:
portType of the Web service
<portType name="GoogleSearchPort">
<operation name="doGetCachedPage">
<input message="typens:doGetCachedPage"/>
<output message="typens:doGetCachedPageResponse"/>
</operation>
<operation name="doSpellingSuggestion">
<input message="typens:doSpellingSuggestion"/>
<output message="typens:doSpellingSuggestionResponse"/>
</operation>
<operation name="doGoogleSearch">
<input message="typens:doGoogleSearch"/>
<output message="typens:doGoogleSearchResponse"/>
</operation>
</portType>
How could we make use of these operations?
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
46 / 55
Google Web Service
Suppose we want to produce an html file that provides an information link
to each city whenever a city name is found in a document. The
endElement() method in an SAX implementation.
public void endElement(String uri, String localName, String qName)
throws SAXException {
try {
if (localName.equals("Person")) {
Person = ec.toString();
out.write("<tr><td>"+Person+"</td>");
holCount = 0; }
if (localName.equals("Year")) {
Year = ec.toString();
if (holCount==0)
out.write("<td>"+Year+"</td>");
else
out.write("<tr><td>&nbsp;</td><td>"+Year+"</td>");
holCount++; }
if (localName.equals("City")) {
City = ec.toString();
out.write("<td>"+City+"</td>");
String cityRef = cityGoogle.findCityRef(City);
out.write("<td><a href=’"+cityRef+"’>"
+cityRef+"</a></td></tr>"); }
}
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
47 / 55
Google Web Service
This code performs a Google search for the city.
import com.google.soap.search.*;
public class cityGoogle {
public static String findCityRef(String City) {
try {
GoogleSearch s = new GoogleSearch();
s.setKey("fQZJXY+RQQO7D0hYnWAY+Xqn5kEahFpL");
s.setQueryString(City);
GoogleSearchResult r = s.doSearch();
GoogleSearchResultElement[] elements
= r.getResultElements();
if(r.getStartIndex() > 0) {
return (elements[0].getURL());// first URL from Google
}
else {
return ("No results.");
}
} catch(Exception e) {
return ("Problem searching: " + e.getMessage());
}
} // End of findCityRef
}
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
48 / 55
Going back to ShipFast.com
Application integration using SOAP as a common message format.
KennyCD.com
Site
KennyCD
.com
Customer
Business
System
(.NET)
ShipFast.com
SOAP/HTML
KennyCD
.com
Customer
TomBooks.com
Site
Internet
TomBooks
.com
Customer
Business
System
(PHP)
Some Other Site
Internet
SOAP/HTML
Business
System
(J2EE)
SOAP/HTML
Business
System
(J2EE)
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
49 / 55
Web2.0
Defining Web 2.0 (Tim O’Reilly, http://www.oreillynet.com/lpt/a/6228)
Web 2.0 is about using the Web as platform for:
delivering software as a continually-updated service that gets better
the more people use it,
consuming and remixing data from multiple sources, including
individual users, while providing their own data and services in a form
that allows remixing by others,
creating network effects through an “architecture of participation”,
and going beyond the page metaphor of Web 1.0 to deliver rich user
experiences
Web 1.0
DoubleClick
Ofoto
e.g.,
Britannica Online
personal websites
screen scraping
M. C. Barukh, H. Paik (CSE, UNSW)
→
→
→
→
→
COMP9321, 15s1
Web 2.0
Google AdSense
Flickr
Wikipedia
blogging
web services
Week 12
50 / 55
Mashup
Mashup is one of the good examples of Web2.0 in action ...
A Web application building technique that combines content from
more than one source into an integrated experience
Frequently implemented with Ajax from existing Web services
(Google, Google Maps, Yahoo, Flickr, YouTube, etc.)
Users can mix many services for “unexpected/creative” usages
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
51 / 55
Mashup - examples
http://www.housingmaps.com/
- Uses Google Map API and Property Data
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
52 / 55
Mashup
http://www.madhusudhan.info/YahooHackDay/SmartEditor.html
This mashup uses APIs from: Amazon eCommerce, Flickr, Yahoo Search,
Yahoo Term Extraction
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
53 / 55
Mashup
http://www.vdiddy.com
APIs: Grouper Video + Yahoo Video Search + YouTube
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
54 / 55
Mashup Widgets
http://www.netvibes.com or http://www.facebook.com/apps/
M. C. Barukh, H. Paik (CSE, UNSW)
COMP9321, 15s1
Week 12
55 / 55