ITCS 6010 DATA INTEGRATION Krishna Kant Sri Harsha Pokala Vamsi Krishna Jamulapati
What is a Mashup? A website or web application which basically combines contents from different websites. Formally: A mashup is a Web page or application that uses and combines data, presentation or functionality from two or more sources to create new services.
Characteristics Combination, visualization, and aggregation. Existing data is made more useful for personal and professional use.
Mashups Types Business (or enterprise) Mashups. Consumer Mashups Data Mashups
Questions Which type of Mashups are more secure? a.Business(enterprise) Mashups b.Consumer Mashups c.Data Mashups d. All
Mashup types… Directly interacting with a web service from inside a browser script (e.g., reading an RSS feed) Display control delegation (Google gadgets: Google as integrator) Display control delegation + two-way browser side communication (Google maps, Google search: Google as provider)
Example Mashup User Mashup website What are the available flats near John kirk dr.? Real estate website Google Map Request for available flat list Flat list Request for area map Area map Map with available flats marked
Building Mashups Planning API sign up Coding
Questions Building a mashup requires ? a.Planning b.API signup c.Coding d.All of the above
Planning Pick a subject A Mashup of What? Map + Real Estate? Bookshop + Library Catalog? More sources of data More complicated Decide your data sources Who is your data provider? Maps: Google maps, Yahoo maps, etc.. Online shopping: Amazon, EBay, etc.. Usually language agnostic Varying complexity
Sign-up for API Sign-up for the API Visit the homepage of your data source and sign up Example:
Coding User Mashup website User Request Website 1 Website 2 API CallDataAPI Call Data Data presentation Data Manipulation
Coding… API Call Data manipulation Web Programming
Questions Coding has ? a.API call b.API call, Data manipulation c.API call, Manipulation, Web programming d.None
API Call Types of API – How to call? REST XML-PRC SOAP Javascript Functions of API – What to call? API specific
REST Request in HTTP and Response in XML Example: Google Geocoder q – The address that you want to geocode Key – Your API key Output – The output format Sample request: are+mtn+view+ca&key=***&output=xml
REST Sample response: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA , ,0
XML-RPC Request/Response in XML via HTTP Example: MSN Blogging API XmlRpcClient in Apache Sample Request: getStateName 4
XML-RPC Sample Response South Dakota
SOAP Request/Reply in SOAP format via SMTP/HTTP Example: MSN Search API HttpURLConnection in Java Post the XML to the target URL Sample request:
SOAP Sample Response Toptimate
JAVA SCRIPT Request/Reply embedded in a stub object XML not required unless data needed explicitly Example: Gogglemap GMAP2 in Googlemap API Var map = new GMAP2(document.getElementById(“map”)) map.setCenter(new GLatLng( , ),13));
Data manipulation Purpose: To generate API requests To process API responses To represent data internally Two components Data schema Tools for manipulation
Questions What is the purpose of Data Manipulation? a.To generate API requests b.To process API responses c.To represent data internally d.All of the above
Data Schema (XML) Purpose: To generate API requests To process API responses To represent data internally Two components Data schema Tools for manipulation
Tools for Manipulation Basic level Parser, Modifier, Writer Available online Higher level Filter, Converter, Generator Need to write on your own
Web Programming UI Design
Combining Everything Your Mashup = API calls + Data Manipulation + UI User Mashup website User Request Website 1 Website 2 API CallDataAPI Call Data Data presentation Data Manipulation
Security Issues Need User Input Security Session Fixation CSRF Attack iframe Security
Questions What HTTP method has to be avoided to prevent CSRF attack? a. GETb. POST c. NEXTc. SET What Coding language is to be used to prevent iframe attacks? a. Java scriptb. Ruby c. PHPd. none
Examples Housing Maps JavaScript mashup of Google Maps and rental data from Craig’s List Map Your Buddies Google Flight Simulator Flash mashup of Google Maps and an airplane video game Thousands of other Google Maps Mashups:
Housing Maps
Google Flight Simulator
Map your Buddies
Thank You!
References Reference: Wikipedia: Tutorial from IBM ultimashup1.html ultimashup1.html mashupsecure/index.html mashupsecure/index.html Resources: List of Mashups, APIs: