Programming with Google_ Amazon and EBay.ppt by liningnvp


									Programming with Amazon,
Google, and eBay

  Chunju Tseng (Lu)
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
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,
 Benefits:
   Ease of integration
   Develop applications faster
Web Services Architecture
 Simple Object Access Protocol (SOAP)
 Web Service Description Language
 Universal Description, Discovery and
  Integration (UDDI)
New Breeds of Web Services
 Representational State Transfer (REST)
      Use HTTP Get method to invoke remote services (not
      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
 Really Simple Syndication (RSS)
      Designed for news-oriented websites to “Push” content
       to readers
      Excellent to monitor new content from websites
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
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
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
   Retrieve lists of items a particular user is
    currently selling through eBay
   Retrieve lists of items a particular user has bid
Other Free Web Services
   Google Maps API
       Crime mapping:
       Fine cheap gas:
   Reuters News
   Shopping Deals
   MSN Search Engine
   Yahoo Highest-rated News
   Yahoo Financial News Search
   World Weather RSS Feed
Lab Session:
Amazon, Google, EBay APIs
                Required Software:
                    NetBeans IDE
                    Amazon API
                    Google API
                    Registered with Amazon and
                Topics:
                    Setup NetBeans
                    Execute Amazon Samples
                    REST with Browser
                    REST with Jakarta HttpClient
                    Programming Google API
Setup NetBeans with Amazon
 Assume NetBeans 4.1 is installed
 Register Amazon subscription ID
   Download Amazon Java sample
   Create NetBeans project
   Install necessary libraries
   Execute Amazon code sample
Retrieve Customer Information
 CustomerContentSearch
   Give name to retrieve customer ID
 CustomerContentLookup
   Give customer ID
   Request WishList information
   ResponseGroup=CustomerInfo,
   Receive WishList ID
 Use Amazon API Reference!!
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=
 ListLookup with xml-to-html XSLT
   ResponseGroup=ListItems,ListInfo,Images,SalesRank
   Style=
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:
Programming Google API
 Download Google Web API
 Install Google library
 Execute Google API demo
 Write Java codes to search Google
     Search Google
     Access cached pages
     Keyword suggestion
     Source:
Other Resources
 Java Web Services Developer Pack
 Consuming Web Services with NetBeans
 XSLT Tutorial
 Lab Session Step-by-step Snapshots
See you next time!

  Questions are welcome
World Wide Web 101
Flash/     JavaScript   HTML/
            VBScript     CSS
                                                ASP, JSP, PHP…

Plug-ins          Renderer                      Application Server

           Browser                                 Web Server

                        request          response (HTML)
Static Web Pages
 Browser
   Internet Explorer, Mozilla Firefox,
 Web Server
   Apache, IIS
   Hypertext Markup Language
   Hypertext Transfer Protocol
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
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
       data interchange and manipulation using XML and XSLT;
       asynchronous data retrieval using XMLHttpRequest;
       and JavaScript binding everything together.

 Examples:

   More info:
AJAX Application Model
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

To top