Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Intro on GWT & Google APIs (Vikram Rangnekar, COO of


Published on

Talk 2: Intro on GWT & Google APIs (Vikram Rangnekar, COO of
Description: Google Web Toolkit is a Java toolkit used for developing rich and standards compliant web-application interfaces. GWT requires you to develop your web interface in Java which is then compiled into optimized javascript. GWT makes your web GUI instantly work across the entire range of browsers (IE6, IE8, Webkit and Mozilla). We will understand rapid interface design / creation using GWT and how your applications can benefit from all the web-development best practices that Google has incorporated into the toolkit.
Google API are all based on GData, there are a whole collection of API's that google made available. We will understand how to authenticate with google and go on to use a few of these API's.

Published in: Technology
  • Login to see the comments

  • Be the first to like this

Intro on GWT & Google APIs (Vikram Rangnekar, COO of

  1. 1. Introduction to  Google Web Toolkit & Google APIs
  2. 2. What can I do with GWT
  3. 3. What is GWT <ul><ul><li>Write web-interfaces in Java </li></ul></ul><ul><ul><li>Seemless and flexible development model </li></ul></ul><ul><ul><li>Cross browser compatibility: IE6/7/8, FF, Chrome, Safari </li></ul></ul><ul><ul><li>Compiled and optimized standalone Javascript files </li></ul></ul><ul><ul><li>Gain from Googles years of domain expertise </li></ul></ul><ul><ul><li>Localization support </li></ul></ul>
  4. 4. GWT Hello World (HTML) <ul><li><!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;> <html> <head> <script type=&quot;text/javascript&quot; src=&quot;hw/hw.nocache.js&quot;></script> </head> <body> <iframe src=&quot;javascript:''&quot; id=&quot;__gwt_historyFrame&quot; tabIndex='-1' style=&quot;position:absolute;width:0;height:0;border:0&quot;></iframe> </body> </html> </li></ul>
  5. 5. GWT Hello World (Java) <ul><li>package com.socialwok.samples; import; import; public class HelloWorld implements EntryPoint { private VerticalPanel mainPanel; private Label text1;   public void onModuleLoad() {     mainPanel = new VerticalPanel();     text1 = new Label(&quot;Hello World&quot;); </li></ul><ul><li>    mainPanel.add(text1); </li></ul><ul><li>    RootPanel.get().add(mainPanel);   } </li></ul>
  6. 6. GWT and Ajax <ul><ul><li>Support for GTW-RPC, JSON and XML </li></ul></ul><ul><ul><li>GWT RPC is quite sophisticated, too. It can handle polymorphic class hierarchies, object graph cycles, and you can even throw exceptions across the wire </li></ul></ul><ul><ul><li>  Easily support the browser's back button and history </li></ul></ul>
  7. 7. Google AJAX API's <ul><li>Search </li></ul><ul><ul><ul><li>Can be used for image, news, web, social web and other searches. </li></ul></ul></ul><ul><ul><li>Visualization </li></ul></ul><ul><ul><ul><li>Used to graphically represent data. Google Finance and Google Analytics makes extensive use of it. </li></ul></ul></ul><ul><ul><li>Maps </li></ul></ul><ul><ul><ul><li>Includes the static and dynamic maps. </li></ul></ul></ul><ul><ul><li>Language </li></ul></ul><ul><ul><ul><li>Detect and translate text and webpages. </li></ul></ul></ul><ul><ul><li>Many more </li></ul></ul>
  8. 8. Google Data APIs <ul><ul><li>Calendar </li></ul></ul><ul><ul><ul><li>Create calendars, events, fetch agendas. </li></ul></ul></ul><ul><ul><li>Contacts </li></ul></ul><ul><ul><ul><li>Add or retrieve contacts. </li></ul></ul></ul><ul><ul><li>Docs </li></ul></ul><ul><ul><ul><li>Create and mange spreadsheets, docs and presentations. </li></ul></ul></ul><ul><ul><li>Gmail </li></ul></ul><ul><ul><ul><li>Create applications to easily upload photos from devices, desktop applications, and other web services </li></ul></ul></ul>
  9. 9. Data API <ul><ul><li>  Authentication - OAuth and Authsub </li></ul></ul><ul><ul><ul><li>Recommend using OAuth (Popular web standard)  </li></ul></ul></ul><ul><ul><ul><li>Both are based on callback  / request tokens </li></ul></ul></ul><ul><ul><li>  Libraries available in popular languages </li></ul></ul><ul><ul><ul><li>Java, PHP, .NET, Javascript and Python </li></ul></ul></ul><ul><ul><li>Use the Atom (XML) syndication standard </li></ul></ul><ul><ul><ul><li>Google's atom schema is called GData </li></ul></ul></ul><ul><ul><li>Each type of entry (docs, calendar, etc) has its own URL to retrieve and create.    </li></ul></ul><ul><li>  </li></ul><ul><ul><li>Example: Default Calendar List URL </li></ul></ul><ul><ul><li> </li></ul></ul>
  10. 10. Javascript Data API <ul><li><head> <script type=&quot;text/javascript&quot; src=&quot;;></script> </head> <body>  </li></ul><ul><li><script type=&quot;text/javascript&quot;> </li></ul><ul><li>google.load(&quot;gdata&quot;, &quot;1&quot;); google.setOnLoadCallback(logMeIn); function logMeIn() {         scope = &quot;;;         var token = google.accounts.user.login(scope);  </li></ul><ul><li>} </li></ul>
  11. 11. Create a Calendar Event <ul><ul><li>Using a raw atom message: </li></ul></ul><ul><ul><li><entry xmlns=''     xmlns:gCal=''>      <content type=&quot;html&quot;>Tennis with John April 11 3pm-3:30pm</content>      <gCal:quickadd value=&quot;true&quot;/> </entry> </li></ul></ul><ul><ul><li>Using the Java Calender API Library: </li></ul></ul><ul><ul><li>CalendarEventEntry myEntry = new CalendarEventEntry(); myEntry.setContent(     new PlainTextConstruct(&quot;Tennis with John April 11 3pm-3:30pm&quot;) ); myEntry.setQuickAdd(true); // Send the request and receive the response: CalendarEventEntry insertedEntry = myService.insert(postUrl, myEntry); </li></ul></ul><ul><li>  </li></ul><ul><li>  </li></ul>
  12. 12. Q & A