• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Gwt - relief from ajax pain
 

Gwt - relief from ajax pain

on

  • 521 views

GWT - Relief from AJAX pain

GWT - Relief from AJAX pain

Statistics

Views

Total Views
521
Views on SlideShare
514
Embed Views
7

Actions

Likes
0
Downloads
2
Comments
0

1 Embed 7

http://www.linkedin.com 7

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Gwt - relief from ajax pain Gwt - relief from ajax pain Presentation Transcript

    • GWT Relief from ajax pain 1
    • About me Prayag Upd Sr JVM Platform Programmer Zazzercode Inc 2
    • Agenda 1. invention of ajax /ˈeɪdʒæks/ 2. pain in ajax 3. GWT to the rescue 4. GWT dev tools 5. GWT app architecture 6. Who is using GWT 7. QA 3
    • 1. invention of ajax 2004 - Gmail first most interactive web based email client to use XMLHttpRequest 4
    • 1. invention of ajax XMLHttpRequest a JavaScript object easy way to retrieve data from a URL without having to do a full page refresh. XMLHttpRequest URL 5
    • 1. invention of ajax XMLHttpRequest var xhr = new XMLHttpRequest(); xhr.open('GET', 'http://api.twitter.com/', false); xhr.onreadystatechange = function (aEvt) { if (xhr.readyState == 4) { if(xhr.status == 200) dump(xhr.responseText); else dump("Error loading pagen"); } }; xhr.send(null); 6
    • 1. invention of ajax 2004 - Rediffmail announced the use of XMLHttpRequest. 7
    • 1. invention of ajax Google Suggest May 2005 - Google Personlize(iGoogle) drag and drop aspect of JavaScript and a seamless integration with the async behavior of XMLHttpRequest. 8
    • 1. invention of ajax Google’s orkut feature like star rating 2005 - Google map allowing users to locate and view places on any point across the world all in the same browser 9
    • 1. invention of ajax Google’s stand with XMLHttpRequest has truly laid out the foundation for how AJAX is being used today. 10
    • 1. invention of ajax 2005, Jesse James Garrett coined a term AJAX 11
    • 1. invention of ajax AJAX incorporates HTML/CSS Presentation 12
    • 1. invention of ajax AJAX incorporates HTML/CSS Presentation DOM dynamic display 13
    • 1. invention of ajax AJAX incorporates HTML/CSS Presentation DOM dynamic display XML/JSON 14
    • 1. invention of ajax AJAX incorporates HTML/CSS XMLHttpRequest Presentation XML/JSON DOM dynamic display 15
    • 1. invention of ajax AJAX incorporates HTML/CSS XMLHttpRequest Presentation XML/JSON DOM dynamic display Server JS 16
    • 1. invention of ajax 17
    • 1. invention of ajax 18
    • 2. Pain in AJAX Programming time 19
    • 2. Pain in AJAX Programming time JS HTML crossbrowser quirks CSS XML 20
    • 2. Pain in AJAX क मा े स नु ? Programming time JS HTML crossbrowser quirks CSS XML 21
    • 2. Pain in AJAX debugging is not easier 22
    • 2. Pain in AJAX debugging is not easier अ घ मा च लरा कोड का ो लेम ् आयो फर े ? 23
    • 2. Pain in AJAX RPC Overhead a connection needs to be established and HTTP headers (cookies etc.) are passed with every request. 24
    • 3. GWT to the rescue 25
    • 3. GWT to the rescue GWT /ˈɡwɪt/ 26
    • 3. GWT to the rescue program and debug AJAX-based apps in Java us in g common Java dev tools 27
    • 3. GWT to the rescue deploy the same apps as client-side HTML and JS, and server-side Java. de pl oy tomcat 28
    • 3. GWT to the rescue provides JRE emulation library (a subset of the java.lang and java.util packages) 29
    • 3. GWT to the rescue Java2JavaScript compiler 30
    • 3. GWT to the rescue Java2JavaScript compiler Zazzercode.java AddUserView.java GWT compiler zazzercode.js AddUserPresenter.java User.java 31
    • 3. GWT to the rescue Hosted Web browser 32
    • 3. GWT to the rescue Hosted Web browser Zazzercode.java AddUserView.java runs as Java bytecode JVM AddUserPresenter.java User.java 33
    • 3. GWT to the rescue Web UI class library 34
    • 3. GWT to the rescue Web UI class library 35
    • 3. GWT to the rescue Web UI class library - DatePicker example import com.google.gwt.user.datepicker.client.DatePicker; DatePicker datePicker = new DatePicker(); 36
    • 3. GWT to the rescue Web UI class library - DatePicker example import com.google.gwt.user.datepicker.client.DatePicker; DatePicker datePicker = new DatePicker(); // Set the default value datePicker.setValue(new Date(), true); VerticalPanel panel = new VerticalPanel(); panel.add(datePicker); RootPanel.get("gwtContainer").add(panel); 37
    • 3. GWT to the rescue GWT simplifies typical AJAX-style RPC conversations between client-side(JavaScript) and server-side (Java). 38
    • 3. GWT to the rescue 39
    • 4. GWT dev tools 1. GWT SDK, http://www.gwtproject.org/download.html 2. Eclipse for JavaEE developers, http://www.eclipse.org/downloads/packages/eclipse-ide-javaee-developers/indigosr2 3. Google Plugin for Eclipse, https://developers.google. com/eclipse/docs/install-from-zip 40
    • 5. GWT app architecture 41
    • 5. GWT app architecture server layer shared layer client layer 42
    • 5. GWT app architecture server layer -Spring,JDBC, Hibernate shared layer-common shared objects client layer -GWT views 43
    • server layer -Spring,JDBC, Hibernate GW T RP C 5. GWT app architecture shared layer-common shared objects client layer -GWT views 44
    • 5. GWT app architecture 45
    • 5. GWT app architecture Screencast available at gwt rpc using eclipse plugin, http://www.youtube.com/watch? v=-rDe0PiUkaI 46
    • 6. Who is using GWT google adwords 47
    • 6. Who is using GWT orkut 48
    • 6. Who is using GWT evernote 49
    • 6. Who is using GWT chrome.angrybirds.com/ 50
    • 7. QA ? 51
    • Thank You
    • References [1] The birth of AJAX – an amazing story, http://techtracer. com/2007/03/12/the-birth-of-ajax-an-amazing-story/ [2] Ajax: A New Approach to Web Applications, http://www.adaptivepath.com/ideas/ajax-new-approachweb-applications
    • References [3] GWT relief from ajax pain, https://docs.google. com/presentation/d/1jtH27L_tkf7CKWz8h8lPnQKMTdvvixqBo ALvbaxQwNk/edit [4] Ease AJAX development with the Google Web Toolkit, http://www.javaworld.com/javaworld/jw-12-2006/jw-1213-gwt. html
    • References [5] AJAX: JQuery, Google Web ToolKit or RichFaces, http: //germanescobar.net/2009/10/ajax-jquery-google-web-toolkitor.html/ [6] What are the downsides of AJAX apps hosted in a single HTML page?, http://www.quora.com/AJAX-1/What-are-thedownsides-of-AJAX-apps-hosted-in-a-single-HTML-page
    • References [7] Be aware of AJAX's drawbacks, http://www.techrepublic. com/blog/software-engineer/be-aware-of-ajaxs-drawbacks/ [8] What is the disadvantage of using websocket/socket.io where ajax will do?, http://stackoverflow.com/a/6829575/432903
    • References [9] What is the disadvantage of DWR?, http://stackoverflow.com/a/1006625/432903 [10] Is GWT's RPC different from AJAX?, http://stackoverflow.com/a/13736656/432903
    • References [11] GWT - Showcase of Features, http://ongwt.googlecode.com/svn/trunk/com.google.gwt. sample.showcase.Showcase/Showcase.html [12] Is GWT's RPC different from AJAX?, http://stackoverflow.com/a/13736656/432903
    • References [13] Using XMLHttpRequest, https://developer.mozilla. org/es/docs/XMLHttpRequest/Usar_XMLHttpRequest [14] Is GWT's RPC different from AJAX?, http://stackoverflow.com/a/13736656/432903