Download presentation
Presentation is loading. Please wait.
Published byMoris Douglas Modified over 8 years ago
1
Programming with Amazon, Google, and eBay Chunju Tseng (Lu) chunju@u.arizona.edu http://www.u.arizona.edu/~chunju/age.ppt
2
Outline 9/13 (Tuesday) Web Services in a nutshell Overview of Amazon, Google, and eBay APIs Lab Session: Web Services Programming 9/15 (Thursday) Back to World Wide Web 101 Lab Session: Java Web Programming
3
What is Web Services? Web Services: A new way of reuse/integrate third party softwre or legacy system No matter where the software is, what platform it residents, or which language it was written in Based on XML and Internet protocols (HTTP, SMTP … ) Benefits: Ease of integration Develop applications faster
4
Web Services Architecture Simple Object Access Protocol (SOAP) Web Service Description Language (WSDL) Universal Description, Discovery and Integration (UDDI)
5
New Breeds of Web Services Representational State Transfer (REST) Use HTTP Get method to invoke remote services (not XML) The response of remote service can be in XML or any textual format Benefits: Easy to develop Easy to debug (with standard browser) Leverage existing web application infrastructure We will focus on REST services programming in the lab session Really Simple Syndication (RSS) Designed for news-oriented websites to “ Push ” content to readers Excellent to monitor new content from websites
6
Amazon Web Services (AWS) Amazon E-Commerce Service Search catalog, retrieve product information, images and customer reviews Retrieve wish list, wedding registry … Search seller and offer Alexa Web Information Service Retrieve information such as page rank, related sites given a target URL Amazon Simple Queue Service A distributed resource manager to store web services results
7
Google Web APIs Programmatically search web pages using Google Get information about search result including URL, snippet, title and directory category Spell-checking and suggestion
8
eBay API Buyers: Get the current list of eBay categories View information about items listed on eBay Display eBay listings on other sites Leave feedback about other users at the conclusion of a commerce transaction Sellers: Submit items for listing on eBay Get high bidder information for items you are selling Retrieve lists of items a particular user is currently selling through eBay Retrieve lists of items a particular user has bid on
9
Other Free Web Services Google Maps API http://www.google.com/apis/maps/ Crime mapping: http://www.chicagocrime.org/http://www.chicagocrime.org/ Fine cheap gas: http://www.mywikimap.com/http://www.mywikimap.com/ Reuters News http://www.microsite.reuters.com/rss/topNews Shopping Deals http://techbargains.com/rss.xml MSN Search Engine http://beta.search.msn.com/results.aspx?q=FMD&format=rss Yahoo Highest-rated News http://rss.news.yahoo.com/rss/highestrated Yahoo Financial News Search http://news.search.yahoo.com/news/rss?p=YHOO World Weather RSS Feed http://www.rssweather.com/ XMethods.net http://xmethods.com/
10
Lab Session: Amazon, Google, EBay APIs Required Software: NetBeans IDE Amazon API ( http://www.amazon.com/gp/aws/landing.html ) Google API (http://www.google.com/apis/) Registered with Amazon and Google Topics: Setup NetBeans Execute Amazon Samples REST with Browser REST with Jakarta HttpClient Programming Google API
11
Setup NetBeans with Amazon Assume NetBeans 4.1 is installed http://www.netbeans.org/ Register Amazon subscription ID http://www.amazon.com/gp/aws/landing.html Download Amazon Java sample Create NetBeans project Install necessary libraries Execute Amazon code sample Main.java
12
Retrieve Customer Information CustomerContentSearch Give name to retrieve customer ID CustomerContentLookup Give customer ID Request WishList information ResponseGroup=CustomerInfo, CustomerLists Receive WishList ID Use Amazon API Reference!!
13
Retrieve Customer WishList and Response Manipulation ListLookup Give list ID and type to retrieve WishList content with a simple browser (REST) ResponseGroup=ListItems,ListInfo Result shows in XML format ListLookup with xml-to-text XSLT Give custom XSL to manipulate response Style=http://www.u.arizona.edu/~chunju/text.xsl&C ontentType=text/plain ListLookup with xml-to-html XSLT ResponseGroup=ListItems,ListInfo,Images,SalesRank,ItemAttributes Style=http://www.u.arizona.edu/~chunju/html.xsl&C ontentType=text/html
14
Access Amazon REST Service with Jakarta HttpClient Download & install necessary libraries Jakarta HttpClient, Codec JUnit Write first Java program in NetBeans Use previous REST invocation strings Print Amazon response in console Resources: http://jakarta.apache.org/commons/index.html http://www.junit.org/ http://www.u.arizona.edu/~chunju/HttpClientMa in.java http://www.u.arizona.edu/~chunju/HttpClientMa in.java
15
Programming Google API Download Google Web API http://www.google.com/apis/ Install Google library Execute Google API demo Write Java codes to search Google Search Google Access cached pages Keyword suggestion Source:http://www.u.arizona.edu/~chunju/Goo gleMain.javahttp://www.u.arizona.edu/~chunju/Goo gleMain.java
16
Other Resources Java Web Services Developer Pack http://java.sun.com/webservices/downloads/we bservicespack.html http://java.sun.com/webservices/downloads/we bservicespack.html Consuming Web Services with NetBeans http://www.javapassion.com/planning/handsonb yol/netbeanswebservices/ http://www.javapassion.com/planning/handsonb yol/netbeanswebservices/ XSLT Tutorial http://www.w3schools.com/xsl/ Lab Session Step-by-step Snapshots http://www.u.arizona.edu/~chunju/mis531a/
17
See you next time! Questions are welcome
18
World Wide Web 101 Web Server Application Server ASP, JSP, PHP… Browser Renderer Script Engine Plug-ins HTML/ CSS JavaScript VBScript Flash/ Applets HTTP requestresponse (HTML)
19
Static Web Pages Browser Internet Explorer, Mozilla Firefox, Netscape Web Server Apache, IIS HTML Hypertext Markup Language HTTP Hypertext Transfer Protocol
20
Dynamic Web Pages Application Servers Tomcat, IIS, mod_php Server side programming languages ASP, JSP, PHP, cgi, ….. ROR Client side programming languages JavaScript, VBScript Dynamic HTML, XHTML, CSS Other dynamic contents Java Applets, ActiveX, Flash
21
Rich Interactivity Web - AJAX AJAX: Asynchronous JavaScript + XML AJAX incorporates: standards-based presentation using XHTML and CSS; dynamic display and interaction using the Document Object Model; data interchange and manipulation using XML and XSLT; asynchronous data retrieval using XMLHttpRequest; and JavaScript binding everything together. Examples: http://www.gmail.com http://www.kiko.com More info: http://www.adaptivepath.com/publications/essays/archives/000385.php
22
AJAX Application Model
23
Lab Session: Java Web Programming Required Software: JDK 1.4 or later Apache Tomcat NetBeans IDE (optional) Topics: Install JDK Install Tomcat First Java Server Page Servlet with NetBeans IDE
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.