Your SlideShare is downloading. ×
0
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
China Science Challenge
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

China Science Challenge

1,260

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,260
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Developer Network<br />INTRODUCTION<br />
  • 2. Developer Network<br />Elsevier and SciVerse<br />Elsevier publishes 25% of the world’s Scientific, Technical and Medical (STM) content: <br /><ul><li>more than 10 million full-text articles from 2600 journals in ScienceDirect,
  • 3. more than 40 million abstracts and author, affiliation information in Scopus.
  • 4. all content from Elsevier and scientific world wide web in Hub. </li></ul>SciVerse embeds applications within scientific content, giving developers and apps access via framework and content APIs. <br />SciVerse is an extension of Apache Shindig, an implementation of OpenSocial. Sciverse apps can access content via open APIs.<br />
  • 5. Developer Network<br />2011 The WAR of the INTERNETS<br />
  • 6. Developer Network<br />Social Apps Web<br />Both Facebook and Google are the same type of social network with applications. Facebook owns the social network, Google owns search. <br />Elsevier’s SciVerse is social apps for scientific search. <br />OpenSocial<br />SciVerse uses OpenSocial standards. OpenSocial is a specification for creating an app-based social network. This spec is originally based on iGoogle by Google. SciVerse extends Apache Shindig, making apps contextual.<br />The OpenSocial standard is worldwide used by sites with around 900 million users (Facebook has 500 million users):<br /><ul><li>Hi5
  • 7. MySpace
  • 8. Orkut
  • 9. Friendster
  • 10. ZDNet
  • 11. RenRen
  • 12. LinkedIn
  • 13. Ning
  • 14. SalesForce
  • 15. Hyves
  • 16. Imeem
  • 17. Yahoo
  • 18. Net
  • 19. SciVerse</li></li></ul><li>Developer Network<br />Elsevier SciVerse – science, there’s an app for that<br />Browser Apps <br />iPhone Apps<br />1 billion downloads<br />350,000 apps<br />Facebook Apps<br />500 million users<br />
  • 20. Developer Network<br />2011 – Social Apps based Business<br />
  • 21. Developer Network<br />
  • 22. Developer Network<br />STM Publishing<br />Elsevier publishes 25% of the world’s Science, Technology and Medical (STM) Publications<br />ScienceDirect: 10 million full text articles in 2,500 journals <br />Scopus: 42 million abstracts, citations, authors and affiliations <br />Hub: plus web content covering 18,000 titles from over 5,000 publishers<br />And META-DATA <br />
  • 23. Developer Network<br />A list of search results with facets in SciVerse Hub<br />
  • 24. Developer Network<br />Elsevier | Developer Network<br />With SciVerse APPS (search result analysis app)<br />
  • 25. Developer Network<br />an abstract for a scientific article with tables and references <br />
  • 26. Developer Network<br />Elsevier | Developer Network<br />With SciVerse APPS (genome viewer and protein network viewer)<br />
  • 27. Developer Network<br />Full text article in ScienceDirect with popup APP (related content by nextbio)<br />
  • 28. Developer Network<br />PART 1 – TECHNOLOGY PLATFORM <br />
  • 29. Developer Network<br />OpenSocial Architecture<br />IFRAME<br />http request<br />HTTP SERVER<br />Shindig Server<br />Gadget Renderer Servlet<br />Data Service Servlet<br />Apache Shindig is an implementation of the OpenSocial specification.<br />Gadget Server<br />Data Handler<br />Container<br />People<br />Activities<br />Gadget <br />App Data<br />DB1<br />DB2<br />Javascript Libraries<br />Gadget.xml<br />
  • 30. Developer Network<br />SciVerse Architecture<br />SciVerse extends Apache Shindig. SciVerse gadgets can access the context of the page in which they appear via so called Framework APIs.<br />
  • 31. Developer Network<br />SciVerse – Integration Points<br />Apps appear as iframes in so-called views or integration points in the webpage.<br />17<br />
  • 32. Developer Network<br />What is a Gadget? The IFRAME Revolution<br />OpenSocial Gadgets<br />A gadget is a client-side application in the form of an HTML iFrame that appears in the context of a webpage and uses client-side scripting languages like JavaScript.<br />IFRAME<br />&lt;iframesrc=&quot;iframe1.html&quot; width=“400&quot; height=“200&quot;&gt;<br />Hello World!<br />&lt;/iframe&gt;<br />GADGET.XML (example 1)<br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />&lt;Module&gt;<br /> &lt;ModulePrefs title=“HellowWorld1&quot; author_email=“me@mine.com&quot;&gt;<br /> &lt;Require feature=&quot;opensocial-0.9&quot; /&gt;<br /> &lt;/ModulePrefs&gt;<br /> &lt;Content type=&quot;html&quot; view=&quot;profile&quot;&gt;&lt;![CDATA[<br /> &lt;script type=‘text/javascript’&gt; <br />function fnWrite() {<br />getElementById(‘content-div’).innerHTML = “Hello World”;<br />}<br /> &lt;/script&gt;<br /> &lt;div id=‘content-div’&gt;&lt;/div&gt;<br /> ]]&gt;&lt;/Content&gt;<br />&lt;/Module&gt;<br />
  • 33. Developer Network<br />Example 1 – OpenSocial Definition File or gadget.xml<br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />&lt;Module&gt;<br /> &lt;ModulePrefs title=&quot;SciVerseExamples-ContentAPICall1&quot; author_email=&quot;CaprioR@your.domain&quot;&gt;<br /> &lt;Require feature=&quot;opensocial-0.9&quot; /&gt;<br /> &lt;Require feature=&quot;sciverse&quot; /&gt;<br /> &lt;Require feature=&quot;hub&quot; /&gt;<br /> &lt;Require feature=&quot;org.jquery.core-1.4.2&quot; /&gt;<br /> &lt;/ModulePrefs&gt;<br /> &lt;Content type=&quot;html&quot; view=&quot;canvas&quot;&gt;&lt;![CDATA[<br />&lt;!-- The code for Canvas view is here. --&gt;<br />]]&gt;&lt;/Content&gt;<br /> &lt;Content type=&quot;html&quot; view=&quot;profile&quot;&gt;&lt;![CDATA[<br />Profile View<br />]]&gt;&lt;/Content&gt;<br /> &lt;Content type=&quot;html&quot; view=&quot;sciverseResultsView&quot;&gt;&lt;![CDATA[<br />&lt;!-- The code for SciverseResultsViewview is here. --&gt;<br />&lt;div&gt;Sciverse Results View view for SciVerseExamples-ContentAPICall1.&lt;/div&gt;<br /> ]]&gt;&lt;/Content&gt;<br />&lt;/Module&gt;<br />
  • 34. Developer Network<br />Object Oriented JavaScript<br />JavaScript originally mainly added dynamic features to an otherwise static HTML page, creating DHTML. But with the advent of DOM, AJAX and gadget programming, JavaScript is now more than a simple client side scripting language, and has become a sophisticated application programming language. <br />Therefore, follow Object Oriented design principles and create ‘un-obtrusive’ code:<br /><ul><li> Model View Control (MVC): separate data from model (JavaScript) and view (HTML).
  • 35. Where possible create Object Oriented code that you can re-use
  • 36. Create packages to separate namespaces to avoid naming conflicts
  • 37. Create re-usable libraries for common code</li></ul> In addition test, debug and compress your code to improve performance and increase stability.<br />
  • 38. Developer Network<br />Example 2 – Object Oriented JavaScript<br />// create a class for SciVerseSearch<br />function SciverseSearch() {<br /> …<br />}<br />// create a static class variable<br />SciverseSearch.View = {<br /> STANDARD: &apos;STANDARD&apos;,<br /> COMPLETE: &apos;COMPLETE&apos;<br />}<br />// create a method instance for a query method<br />SciverseSearch.prototype.execute = function(query) {<br /> …<br />}<br />// create a setter for the view variable<br />SciverseSearch.prototype.setView = function(view) {<br />this.view = view;<br />}<br />// Now instantiate the class and call its method<br />varsciverse = new SciverseSearch();<br />sciverse.setView(SciverseSearch.View.COMPLETE); <br />sciverse.execute(query);<br />
  • 39. Developer Network<br />Debugging JavaScript <br />Opera DragonflyOpera Browser has Dragonfly built-in.Firefox FirebugFor FireFox you can install the Firebug add-on. Safari Web Inspector On a Mac, there is Web Inspector for Safari. Chrome Developer ToolsGoogle Chrome comes with Developer Tools.<br />The Developer Blog has an article with a <br />Complete overview of debuggers for the main<br />4 browsers at http://developer.sciverse.com/blog<br />Blog Post:<br />Complete Overview: Debugging JavaScript and SciVerse Apps in FireFox, <br />Opera, Safari, Chrome, IE<br />
  • 40. Developer Network<br />PART 2 – GADGET PROGRAMMING<br />
  • 41. Developer Network<br />SciVerse APIs<br />There are two main APIs for SciVerse:<br />Framework API – with access to context and methods on the page<br />Content API – for search and retrieval of articles, authors and affiliations<br />
  • 42. Developer Network<br />SciVerse – Framework API<br />The Framework API allows the app to access context and methods of the page. <br />http://developer.sciverse.com/frameworkapi<br />
  • 43. Developer Network<br />
  • 44. Developer Network<br />SciVerse – Framework API - ContextInfo<br />Most of the information visible on the page, is accessible by the gadget via the Framework API. The ContextInfo object returns among other the following information:<br />accountId, artNum, au1, au1First, au1Init, au1Suffix, au1Sur, auCorp, <br />authorKeywords, date, docTitle, doi, entitlement, genre, <br />indexTerms, individualUser, isbn, issn, issue, keywords, offset, originPage, <br />otherKeywords, pageContentDivTagName, pages, pageType, part, partTitle, <br />partValue, pii, platform, scDocId, scopusFlag, searchQuery, searchTerms, <br />secureAuthtoken, sortOrder, sPage, srcTitle, ssn, timestamp, volume, year<br />// retrieving the authtokenvia the GetContextInfo method’s callback<br />function getContextInfoCallback(result){<br /> // get authtoken for content API call<br />varauthtoken = result.secureAuthtoken;<br />varsearchterm = result.searchTerms;<br />}<br />// retrieving the authToken via the gadget preferences<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />varprefs = new gadgets.Prefs();<br />varauthtoken= prefs.getString(&quot;secureAuthtoken&quot;);                               <br />&lt;/script&gt;<br />
  • 45. Developer Network<br />Example - How to retrieve the authToken for the Content API call?<br />function init(){<br />gadgets.sciverse.getContextInfo(getContextInfoCallback); // this parameter is the callback method<br />}<br />function getContextInfoCallback(result){<br /> // get authtoken for content API call<br />varauthtoken = result.secureAuthtoken;<br />varsearchterm = result.searchTerms;<br />}<br />// after pageload finishes, this executes the init method, which will trigger following functions<br />gadgets.util.registerOnLoadHandler(init);<br />OR <br />&lt;UserPref name=&quot;contentApiKey&quot; datatype=&quot;hidden&quot; default_value=&quot;your-api-key-here&quot; /&gt; <br />&lt;UserPref name=&quot;secureAuthtoken&quot; datatype=&quot;hidden&quot; /&gt; <br />…<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />varprefs = new gadgets.Prefs();<br />varauthToken = prefs.getString(&quot;secureAuthtoken&quot;); <br />&lt;/script&gt;<br />Also, see the example code at <br />https://github.com/sciversedev/examples/<br />
  • 46. Developer Network<br />SciVerse Content API<br />The Content API provides access to ScienceDirect and Scopus data. This is the backbone of the Elsevier content. The Content API can be accessed via building the query URL as follows:<br />
  • 47. Developer Network<br />Example - Content API - search<br />Hub Search<br />http://api.elsevier.com/content/search/index:HUB?query=heart+attack<br />Searches for documents in Hub that mention the term ‘heart attack’ <br />ScienceDirect Search<br />http://api.elsevier.com/content/search/index:SCIDIR?query=TITLE(decay)&amp;date=2007<br />Searches for documents in ScienceDirect that have ‘decay’ in the title and that were published in 2007 <br />Scopus search http://api.elsevier.com/content/search/index:SCOPUS?query=AUTHLASTNAME(mckinley)%20AND%20SUBJAREA(CHEM)<br />Searches for documents in Scopus in the area of chemistry written by people with last name “McKinley” <br />Author search <br />http://api.elsevier.com/content/search/index:AUTHOR?query=af-id(60032114)%20AND%20authlast(smith)<br />Searches for authors that are affiliated with the institute that has affiliationID ‘60032114’ and whose last name is ‘smith’ <br />Affiliation search <br />http://api.elsevier.com/content/search/index:AFFILIATION?query=affil(rotterdam)<br />Searches for affiliation profiles (i.e. institutes) with Rotterdam in their name or description <br />
  • 48. Developer Network<br />Example - Content API - retrieval<br />Full-text retrieval (ScienceDirect) <br />http://api.elsevier.com/content/article/DOI:10.1016/0092-8674(93)90500-P?view=FULL<br />Retrieves the full-text version of the ScienceDirect document with DOI ‘10.1016/0092-8674(93)90500-P’ <br />Abstract retrieval (Scopus) <br />http://api.elsevier.com/content/abstract/SCOPUS_ID:0027359827<br />Retrieves the Scopus document with Scopus ID ‘0027359827’ <br />Author retrieval <br />http://api.elsevier.com/content/author/AUTHOR_ID:44372231200?view=STANDARD<br />Retrieves a ‘standard’ view of the author profile with Scopus author ID ‘44372231200’ <br />Affiliation retrieval <br />http://api.elsevier.com/content/affiliation/AFFILIATION_ID:60016849?view=COMPLETE<br />Retrieves a ‘complete’ view of the profile of the institute that has Scopus affiliationID ‘60016849’ <br />Serial title information <br />http://api.elsevier.com/content/serial/title?ISSN=07400551<br />Searches for/retrieves information about the journal of which the ISSN is ‘07400551’<br />
  • 49. Developer Network<br />VIEWS and FIELDS<br />A request to retrieve information can specify the fields that you want to retrieve. You can use a view with predefined fields or you can specify which particular fields you seek to return. Which views and which fields are available depends on the content-category: article (full text), abstract, author, or affiliation.<br />http://developer.sciverse.com/sciversecontentapiretrievalviews<br />
  • 50. Developer Network<br />VIEWS and FIELDS<br />The {content-category} identifies the type of content. This is divided into:<br />article–Serial and non-serial full text documents from journals and books published by Elsevier<br />abstract– Abstracts from Scopus<br />author– Author profiles generated from Scopus data.<br />affiliation – Affiliation profiles generated from Scopus data.<br />The {identifier_label} distinguishes the type of identifier :<br />DOI - for full-text documents, <br />SCOPUS_ID, <br />AUTHOD_ID - Elsevier identifier tied to an individual author, AFFIL_ID -Elsevier identifier tied to an institution (for use as an affiliation)<br />Other available unique identifiers available for use:<br />PII - Publisher Item Identifier , <br />PUBMED_ID<br />
  • 51. Developer Network<br />Search Facets<br />
  • 52. Developer Network<br />SciVerse – Mashup<br />&lt;script type=‘text/javascript’&gt;<br />varmyapikey = ‘aaaass223ssss’;<br />function fnCreateMashup(){<br />gadgets.sciverse.getContextInfo(fnContextInfoCallback);<br />}<br />funtionfnContentInfoCallback(response){<br />var search = response.searchQuery;<br />varurl = ‘http://api.nytimes.com/svc/search/v1/article?query=‘+search+’&amp;api-key=‘+myapikey+<br /> ‘format=json’;<br />varparams = {<br /> ‘href’ : url,<br /> ‘format’ : ‘json’,<br /> ‘authz’ : ‘none’<br /> };<br />osapi.http.get(params1).execute(fnNyTimesCallback);<br />}<br />function fnNyTimesCallback(nytimesResponse) {<br />var output = ‘’;<br /> // using jquery<br /> $.each(nytimesResponse.content.results, function(I, result){<br /> output = output + result.data + ‘ – ‘ + result.title;<br /> }<br />}<br />gadgets.util.registerOnLoadHandler(fnCreateMashup);<br />&lt;/script&gt;<br />

×