Title: Computer Science 397 Database Programming
1Computer Science 397Database Programming
2Alsos Search for Niels Bohr
3AtomicArchive.Com Article on Niels Bohr
4AtomicArchive.Com Article on Niels Bohr (cont.)
Produces Alsos Search
5Alsos Search for Niels Bohr
6A specific reference
7Thats what they get, not what they want!
- We are providing them with a mechanism, dynamic
links that enable them to do live searches
into Alsos not just link to the Alsos home
page, but - The user ends up in Alsos site, not Atomic
Archives. - They would like a way to get data (annotations)
from Alsos that they could format within their
pages.
8What if we wanted to provide this
- Suppose we wanted to provide a mechanism for
developers to get data from us for use on their
web pages. - We would not want them to access our database
with SQL statements - Might change database
- Want control of the kind of data we let them have
- Would not want to restrict to platform, .NET,
Linux, etc.
9What if we wanted to provide this(cont.)
- We would need a platform independent means of
sharing data - Thats exactly what XML is all about its text
based, marked up data. - Web service software component that you call
over the web. - Accepts and returns XML data
10Example Google Service
11Search Button
private void btnSearch_Click (Object sender,
System.EventArgs e) GoogleSearchResult
result null GoogleSearchService
google ResultElement re google new
GoogleSearchService() this.lstURLs.get_Items().
Clear() for (int i 0 i lt 20 i 10) //
get first 20 hits total result
google.doGoogleSearch("4a8/TvZQFHID0WIWnL1CMmMx0sN
qhG8H", this.txtSearch.get_Text(), i, 10,
false, "", false, "", "", "") for (int j
0 jlt result.resultElements.length j)
re result.resultElementsj
this.lstURLs.get_Items().Add(re.URL)
this.lstURLs.Refresh() //for-n-hits
this.lblHits.set_Text( String.valueOf(result.esti
matedTotalResultsCount) ) MessageBox.Show("Sea
rch complete, first 20 hits are shown!")
12Item Selected
private void lstURLs_SelectedIndexChanged
(Object sender, System.EventArgs
e) java.lang.Object a, b, c, d a b c
d null // optional parameters //
navigate to selected site! this.axWebBrowser1.Na
vigate(this.lstURLs.get_Text(), a, b, c, d)
13Terra Service
14Stock Ticker