SlideShare a Scribd company logo
1 of 110
Download to read offline
MOBILE JAVA
              (GWT, MGWT, PHONEGAP)
                        Still “Write Once Run Everywhere”



                     Murat YENER


Friday, May 25, 12
MOBILE JAVA
              (GWT, MGWT, PHONEGAP)
                        Still “Write Once Run Everywhere”



                     Murat YENER


Friday, May 25, 12
MURAT YENER
                Java/JavaEE, GWT, Flex,
                Android, iOS, Node.js...
                       Developer

            Google Developer Group
                    Istanbul

                     Eclipsist 2008/2009,
                      EclipseCon 2010,
                        JavaOne 2011




Friday, May 25, 12
This talk is highly inspired by Matt Raible’s talk at Devoxx
                   http://www.parleys.com/#st=5&id=2925&sl=0


Friday, May 25, 12
MOBIL APPS




Friday, May 25, 12
MOBIL APPS
             •   Android




Friday, May 25, 12
MOBIL APPS
             •   Android

             •   iPhone




Friday, May 25, 12
MOBIL APPS
             •   Android

             •   iPhone

             •   Blackberry




Friday, May 25, 12
MOBIL APPS
             •   Android

             •   iPhone

             •   Blackberry

             •   Windows Phone




Friday, May 25, 12
MOBIL APPS
             •   Android

             •   iPhone

             •   Blackberry

             •   Windows Phone

             •   Tablets?!?



Friday, May 25, 12
MOBIL APPS
             •   Android

             •   iPhone

             •   Blackberry

             •   Windows Phone

             •   Tablets?!?



Friday, May 25, 12
HTML
                        HTML2
                            CSS+JS                                                                                                      Eclair
         1991                  HTML4                                                                                                  Donut
                                                                                                                           Android Cupcake
              1992
                   1993           CSS2                                                                                                            Honeycomb
                     1994                                             XHTML                WM 2003                           Beta Android 1.1
                            1995
                                                                                                                                 Android 1.0 Gingerbread
                                   1996
                                          1997                                      Tableless            WM 5                           iPad Froyo ICS
                                                                                                                       iPhone
                                                                                      Web                                        iPhone3GS iPad2
                                                 1998
                                                        1999                                                           WM 6
                                                               2000                                      AJAX               iPhone3G           iPhone4S
                                                                      2001                                                            iPhone4
                                                                             2002
                                                                                    2003                                              WinPhone7
                                                                                           2004
                                                                                                  2005
                                                                                                                                       HTML5

        WEB & MOBILE
                                                                                                         2006

                                                                                                                2007

                                                                                                                       2008

                                                                                                                              2012
                                                                                                                                2009
                                                                                                                                         2010
                                                                                                                                       2011
                                                                                                                                                  2011
                                                                                                                                                2012
                                                                                                                                                         2012


Friday, May 25, 12
+ Blackberry
                                                                                                                                           Symbian
                                                                                                                                              ...
                HTML
                        HTML2
                            CSS+JS                                                                                                      Eclair
         1991                  HTML4                                                                                                  Donut
                                                                                                                           Android Cupcake
              1992
                   1993           CSS2                                                                                                            Honeycomb
                     1994                                             XHTML                WM 2003                           Beta Android 1.1
                            1995
                                                                                                                                 Android 1.0 Gingerbread
                                   1996
                                          1997                                      Tableless            WM 5                           iPad Froyo ICS
                                                                                                                       iPhone
                                                                                      Web                                        iPhone3GS iPad2
                                                 1998
                                                        1999                                                           WM 6
                                                               2000                                      AJAX               iPhone3G           iPhone4S
                                                                      2001                                                            iPhone4
                                                                             2002
                                                                                    2003                                              WinPhone7
                                                                                           2004
                                                                                                  2005
                                                                                                                                       HTML5

        WEB & MOBILE
                                                                                                         2006

                                                                                                                2007

                                                                                                                       2008

                                                                                                                              2012
                                                                                                                                2009
                                                                                                                                         2010
                                                                                                                                       2011
                                                                                                                                                  2011
                                                                                                                                                2012
                                                                                                                                                         2012


Friday, May 25, 12
Friday, May 25, 12
Web Apps: Teaching the old dog new tricks?

Friday, May 25, 12
Web Apps: Teaching the old dog new tricks?

Friday, May 25, 12
Web Apps: Teaching the old dog new tricks?

Friday, May 25, 12
HTML MOBILE FRAMEWORKS


                • Sencha

                • Titanium

                • ...




Friday, May 25, 12
HTML5
               • Storage, WebSQL, Application       Cache, Web Workers,
                     WebSocket, Notifications, Drag&Drop, GeoLocation,
                     Speech, Audio, Video, Canvas, SVG...

               • New      tags!!! <article> <aside> <section> <header>
                     <footer> <nav> <audio> <video> <datalist>
                     <details>...

               • Gone!!!   <applet> <center> <font> <frame>
                     <frameset>
                         •   http://www.w3schools.com/html5/html5_reference.asp

Friday, May 25, 12
CSS3
        • Animated Transitions

        • Rounded         Corners

        • Drop        Shadows

        • Gradient       Colors

        • Background           Decoration

        • Text       Effects

        • Web        Fonts
Friday, May 25, 12
JAVASCRIPT

         • IDE?

         • Debugging?




Friday, May 25, 12
JAVASCRIPT

         • IDE?

         • Debugging?




Friday, May 25, 12
Friday, May 25, 12
Friday, May 25, 12
GOOGLE WEB TOOLKIT

          • Write     Java, compile Javascript

          • Eclipse   integration

          • Debug     Javascript on Java

          • Browser     compability (from IE6 to mobile!!!)




Friday, May 25, 12
GOOGLE WEB TOOLKIT

          • Write     Java, compile Javascript

          • Eclipse   integration

          • Debug     Javascript on Java

          • Browser     compability (from IE6 to mobile!!!)




Friday, May 25, 12
GOOGLE WEB TOOLKIT

          • Write     Java, compile Javascript

          • Eclipse   integration

          • Debug     Javascript on Java

          • Browser     compability (from IE6 to mobile!!!)




Friday, May 25, 12
GOOGLE WEB TOOLKIT

          • Write     Java, compile Javascript

          • Eclipse   integration

          • Debug     Javascript on Java

          • Browser     compability (from IE6 to mobile!!!)




Friday, May 25, 12
GWT, MOBILE?

     • Style?        (CSS?)

     • Native Widgetlar (Button,
          Combo, Checkbox...)

     • Online/Offline

     • APIs   (Camera, GPS,
          Contacts...)



Friday, May 25, 12
GWT, MOBILE?

     • Style?        (CSS?)

     • Native Widgetlar (Button,
          Combo, Checkbox...)

     • Online/Offline

     • APIs   (Camera, GPS,
          Contacts...)



Friday, May 25, 12
UI




Friday, May 25, 12
UI




Friday, May 25, 12
UI




Friday, May 25, 12
UI




Friday, May 25, 12
LOOKING NATIVE
           • gwt-mobile-webkit: database, storage,
                geolocation, widgets(?) http://code.google.com/p/
                gwt-mobile-webkit/


           • gwtmobile: GwtMobile-UI, Gwtmobile-
                Persistence, GwtMobile-PhoneGap(!)
                http://code.google.com/p/gwtmobile/


           • touch4j: Sencha, $$                http://www.emitrom.com/
                gwt4touch


           • mgwt: UI Widgets, GWT-Phonegap                               http://
                code.google.com/p/mgwt/


Friday, May 25, 12
LOOKING NATIVE
           • gwt-mobile-webkit: database, storage,
                geolocation, widgets(?) http://code.google.com/p/
                gwt-mobile-webkit/


           • gwtmobile: GwtMobile-UI, Gwtmobile-
                Persistence, GwtMobile-PhoneGap(!)
                http://code.google.com/p/gwtmobile/


           • touch4j: Sencha, $$                http://www.emitrom.com/
                gwt4touch


           • mgwt: UI Widgets, GWT-Phonegap                               http://
                code.google.com/p/mgwt/


Friday, May 25, 12
LOOKING NATIVE
           • gwt-mobile-webkit: database, storage,
                geolocation, widgets(?) http://code.google.com/p/
                gwt-mobile-webkit/


           • gwtmobile: GwtMobile-UI, Gwtmobile-
                Persistence, GwtMobile-PhoneGap(!)
                http://code.google.com/p/gwtmobile/


           • touch4j: Sencha, $$                http://www.emitrom.com/
                gwt4touch


           • mgwt: UI Widgets, GWT-Phonegap                               http://
                code.google.com/p/mgwt/


Friday, May 25, 12
LOOKING NATIVE
           • gwt-mobile-webkit: database, storage,
                geolocation, widgets(?) http://code.google.com/p/
                gwt-mobile-webkit/


           • gwtmobile: GwtMobile-UI, Gwtmobile-
                Persistence, GwtMobile-PhoneGap(!)
                http://code.google.com/p/gwtmobile/


           • touch4j: Sencha, $$                http://www.emitrom.com/
                gwt4touch


           • mgwt: UI Widgets, GWT-Phonegap                               http://
                code.google.com/p/mgwt/


Friday, May 25, 12
MGWT

      • Standard       GWT (Java)

      • JavaScript     via JSNI

      • Native       looking widgets

      • iOS, Android, Blackberry...

      • Phones       & Tablets

      • Online       &Offline

Friday, May 25, 12
MGWT

      • Standard       GWT (Java)

      • JavaScript     via JSNI

      • Native       looking widgets

      • iOS, Android, Blackberry...

      • Phones       & Tablets

      • Online       &Offline

Friday, May 25, 12
MGWT

      • Standard       GWT (Java)

      • JavaScript     via JSNI

      • Native       looking widgets

      • iOS, Android, Blackberry...

      • Phones       & Tablets

      • Online       &Offline

Friday, May 25, 12
MGWT

      • Standard       GWT (Java)

      • JavaScript     via JSNI

      • Native       looking widgets

      • iOS, Android, Blackberry...

      • Phones       & Tablets

      • Online       &Offline

Friday, May 25, 12
MGWT

      • Standard       GWT (Java)

      • JavaScript     via JSNI

      • Native       looking widgets

      • iOS, Android, Blackberry...

      • Phones       & Tablets

      • Online       &Offline

Friday, May 25, 12
MGWT

      • Standard       GWT (Java)

      • JavaScript     via JSNI

      • Native       looking widgets

      • iOS, Android, Blackberry...

      • Phones       & Tablets

      • Online       &Offline

Friday, May 25, 12
MGWT

      • Standard       GWT (Java)

      • JavaScript     via JSNI

      • Native       looking widgets

      • iOS, Android, Blackberry...

      • Phones       & Tablets

      • Online       &Offline

Friday, May 25, 12
MGWT

      • Standard       GWT (Java)

      • JavaScript     via JSNI

      • Native       looking widgets

      • iOS, Android, Blackberry...

      • Phones       & Tablets

      • Online       &Offline

Friday, May 25, 12
Friday, May 25, 12
Friday, May 25, 12
PROJECT :)
          • Chronometer      + map
              (location, maps)

          • MP3      player (audio)

          • Friend   List(contacts,
              http request, social
              login)

          • History    (storage)


Friday, May 25, 12
PROJECT :)
          • Chronometer      + map
              (location, maps)

          • MP3      player (audio)

          • Friend   List(contacts,
              http request, social
              login)

          • History    (storage)


Friday, May 25, 12
PROJECT :)
          • Chronometer      + map
              (location, maps)

          • MP3      player (audio)

          • Friend   List(contacts,
              http request, social
              login)

          • History    (storage)


Friday, May 25, 12
PROJECT :)
          • Chronometer      + map
              (location, maps)

          • MP3      player (audio)

          • Friend   List(contacts,
              http request, social
              login)

          • History    (storage)


Friday, May 25, 12
STARTING MGWT

          • Eclipse   GWT plugin

          • MGWT

          • Model-View-Presenter

          • Maven Archetype




Friday, May 25, 12
STARTING MGWT

          • Eclipse   GWT plugin

          • MGWT

          • Model-View-Presenter

          • Maven Archetype




Friday, May 25, 12
STARTING MGWT

          • Eclipse   GWT plugin

          • MGWT

          • Model-View-Presenter

          • Maven Archetype




Friday, May 25, 12
STARTING MGWT

          • Eclipse   GWT plugin

          • MGWT

          • Model-View-Presenter

          • Maven Archetype




Friday, May 25, 12
MAPS

    • Google             Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/

    • Google             Maps Ver 3.0: http://code.google.com/p/gwt-google-maps-v3/

    • No             Javascript so far!
    •   <inherits name='com.google.gwt.maps.GoogleMaps' />




Friday, May 25, 12
MAPS

    • Google             Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/

    • Google             Maps Ver 3.0: http://code.google.com/p/gwt-google-maps-v3/

    • No             Javascript so far!
    •   <inherits name='com.google.gwt.maps.GoogleMaps' />




Friday, May 25, 12
MAPS

    • Google             Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/

    • Google             Maps Ver 3.0:lpha
                                        a
                                      http://code.google.com/p/gwt-google-maps-v3/

    • No             Javascript so far!
    •   <inherits name='com.google.gwt.maps.GoogleMaps' />




Friday, May 25, 12
LOCATION




               • HTML5       Geolocation

               • Still   no Javascript!!




Friday, May 25, 12
LOCATION
               UserLocation.getLocation(new UserLocationCallback() {
               	 @Override
               	 public void onLocationFound(Coordinates coords) {
               	 	 getMap(coords);	 	 	 	
               	 }
               });




               • HTML5       Geolocation

               • Still   no Javascript!!




Friday, May 25, 12
LOCATION
               UserLocation.getLocation(new UserLocationCallback() {
               	 @Override
               	 public void onLocationFound(Coordinates coords) {
               	 	 getMap(coords);	 	 	 	
               	 }
               });




               • HTML5       Geolocation

               • Still   no Javascript!!




Friday, May 25, 12
FIRST TRY

     • HTML5             Geolocation not accurared


     • Just          a straight line instead of a route


     • The           app stops when the device is locked




Friday, May 25, 12
FIRST TRY

     • HTML5             Geolocation not accurared


     • Just          a straight line instead of a route


     • The           app stops when the device is locked




Friday, May 25, 12
FIRST TRY

     • HTML5             Geolocation not accurared


     • Just          a straight line instead of a route


     • The           app stops when the device is locked




Friday, May 25, 12
FIRST TRY

     • HTML5             Geolocation not accurared
                     enableHighAccuracy: True
     • Just          a straight line instead of a route


     • The           app stops when the device is locked




Friday, May 25, 12
FIRST TRY

     • HTML5             Geolocation not accurared
                     enableHighAccuracy: True
     • Just          a straight line instead of a route
                     Google Maps Polylines
     • The           app stops when the device is locked




Friday, May 25, 12
FIRST TRY

     • HTML5             Geolocation not accurared
                     enableHighAccuracy: True
     • Just          a straight line instead of a route
                     Google Maps Polylines
     • The           app stops when the device is locked
                     PhoneGap?



Friday, May 25, 12
PHONEGAP


    • or        the new Cordova

    • iOS            Plugin (http://phonegap.com/start#ios-x4)

    • Android             Plugin (http://phonegap.com/start#android)

    • and            others...



Friday, May 25, 12
PHONEGAP


    • or        the new Cordova

    • iOS            Plugin (http://phonegap.com/start#ios-x4)

    • Android             Plugin (http://phonegap.com/start#android)

    • and            others...



Friday, May 25, 12
PHONEGAP


    • or        the new Cordova

    • iOS            Plugin (http://phonegap.com/start#ios-x4)

    • Android             Plugin (http://phonegap.com/start#android)

    • and            others...



Friday, May 25, 12
BUT WHERE IS THE MAP?!?




Friday, May 25, 12
URL PERMISSIONS

               • maps.gstatic

               • mt1.googleapis

               • mt0.googleapis

               • maps.google.com




Friday, May 25, 12
URL PERMISSIONS

               • maps.gstatic

               • mt1.googleapis

               • mt0.googleapis

               • maps.google.com




Friday, May 25, 12
URL PERMISSIONS

               • maps.gstatic

               • mt1.googleapis

               • mt0.googleapis

               • maps.google.com




Friday, May 25, 12
SECOND TRY


     • Stillwhen the location updates stop
         when the device is locked!




Friday, May 25, 12
SECOND TRY


     • Stillwhen the location updates stop
         when the device is locked!




Friday, May 25, 12
SECOND TRY
                     Ph
                        on
                           e   Ga stop
                                   p!!
     • Still when the location updates
       when the device is locked!      !



Friday, May 25, 12
PHONEGAP SETTINGS




Friday, May 25, 12
MP3 PLAYER


             • Local   vs Streaming

             • HTML5     <Audio>

             • com.phonegap.audiohandler




Friday, May 25, 12
MP3 PLAYER


             • Local   vs Streaming

             • HTML5     <Audio>

             • com.phonegap.audiohandler




Friday, May 25, 12
HISTORY


    • LocalStorage, Javascript   wrapper             public native static void setItem(String key, String value) /*-{
                                                     	     $wnd.localStorage.setItem(key, value);
                                                     }-*/;

                                                     public native static String getItem(String key) /*-{
                                                     	     return $wnd.localStorage.getItem(key);
                                                     }-*/;



    • WebSQL


    • Cookies!!                   public static String getItem(String key){
                                  	    return Cookies.getCookie(key);
                                  }
                                  	    	
                                  public static void setItem(String key, String value){
                                  	    Cookies.setCookie(key, value, new Date(2050, 1, 1), "", "", true);
                                  }




Friday, May 25, 12
MY FRIENDS
      • Getting         contacts
                     phoneGap.getContacts()

      • Social         login

                               gwt-google-apis

                               &     OAuth



Friday, May 25, 12
MY FRIENDS
                     PLUS.initialize(new SimpleEventBus(), new GoogleApiRequestTransport(APPLICATION_NAME, API_KEY));

                   final Button b = new Button("Authenticate to get public activities");

      • Getting                contacts
                   b.addClickHandler(new ClickHandler() {
                     @Override
                     public void onClick(ClickEvent e) {
                       OAuth2Login.get().authorize(CLIENT_ID, PlusAuthScope.PLUS_ME, new Callback<Void, Exception>() {
                          @Override
                        phoneGap.getContacts()
                          public void onSuccess(Void v) {
                            PLUS.people().get("me").to(new Receiver<Person>() {
                               @Override

      • Social              login
                               public void onSuccess(Person person) {
                                 println("Hello " + person.getDisplayName());
                               }
                             }).fire();
                          }

                   
                   
                           @Override     gwt-google-apis
                           public void onFailure(Exception e) {
                             println(e.getMessage());
                           }
                         });
                 }
               });
                                      &                 OAuth



Friday, May 25, 12
MY FRIENDS
      • Getting         contacts
                     phoneGap.getContacts()

      • Social         login

                               gwt-google-apis

                               &     OAuth



Friday, May 25, 12
MY FRIENDS
      • Getting         contacts
                     phoneGap.getContacts()

      • Social         login

                               gwt-google-apis

                               &     OAuth                  lug in
                                                   browser p
                                        egap child
                                   Phon

Friday, May 25, 12
PHONEGAP PLUGIN


    • Android                 http://wiki.phonegap.com/w/page/43708611/How%20to%20Install%20a%20PhoneGap%20Plugin%20for%20Android



                     plugins.xml               <plugin name="BatteryLevelPlugin" value="com.example.BatteryLevelPlugin" />



    • iOS            http://wiki.phonegap.com/w/page/43708792/How%20to%20Install%20a%20PhoneGap%20Plugin%20for%20iOS



                     plugins folder: .m .h files
                     phonegap.plist:
                     www folder: javascript files

Friday, May 25, 12
SWIPE PANEL

    • Google+

    • Built in widget in
        Sencha and other
        frameworks

    • not            in mGWT!?!

    • Wrapping            Javascript
        with JSNI?

Friday, May 25, 12
SWIPE PANEL

    • Google+

    • Built in widget in
        Sencha and other
        frameworks

    • not            in mGWT!?!

    • Wrapping            Javascript
        with JSNI?

Friday, May 25, 12
JSNI




Friday, May 25, 12
JSNI




Friday, May 25, 12
JSNI




Friday, May 25, 12
MGWT GROUPS




              https://groups.google.com/forum/?fromgroups#!forum/mgwt
Friday, May 25, 12
MGWT GROUPS




              https://groups.google.com/forum/?fromgroups#!forum/mgwt
Friday, May 25, 12
MGWT GROUPS




              https://groups.google.com/forum/?fromgroups#!forum/mgwt
Friday, May 25, 12
MGWT GROUPS




              https://groups.google.com/forum/?fromgroups#!forum/mgwt
Friday, May 25, 12
MGWT GROUPS




              https://groups.google.com/forum/?fromgroups#!forum/mgwt
Friday, May 25, 12
MGWT GROUPS




              https://groups.google.com/forum/?fromgroups#!forum/mgwt
Friday, May 25, 12
MGWT GROUPS




              https://groups.google.com/forum/?fromgroups#!forum/mgwt
Friday, May 25, 12
OK THEN...




Friday, May 25, 12
OK THEN...




Friday, May 25, 12
OK THEN...




Friday, May 25, 12
LATEST NEWS!!!




Friday, May 25, 12
LATEST NEWS!!!




Friday, May 25, 12
LATEST NEWS!!!




Friday, May 25, 12
PHONEGAP - CORDOVA


    • Apache          Cordova Incubator

    • 1.3<problem<1.7

    • Cordova          1.7 - GwtPhonegap 1.7 + mGWT 1.1 (Snapshot)




Friday, May 25, 12
DEBUGGING

    • Desktop: First                 Class Java Debugging

    • Mobil: Gwt               Pretty Compile!

                     iOS: Remote debugging of HTML and JS on device
                         - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
                         {
                         !   [NSClassFromString(@"WebView") _enableRemoteInspector];




                     Android: Chrome Beta? Most probably will be
                     available soon

Friday, May 25, 12
LOCATION DEBUG

    • Go             out!!!

    • Also            only on iOS :(




Friday, May 25, 12
CONCLUSION
    • MGWT              + PhoneGap works! Not a silverbullet but sill great!

    • Only           way to connect backend JSONP (JSON with Padding)

    • JSNI   is very easy... BUT! be careful when touch events are
        involved!

    • Browse            Phonegap plugins before going native!

    • Test           location on field.

    • Don’t           forget to add urls to permissions list

Friday, May 25, 12
Like the talk... A Hall14:30
     and Matt Raible Devoxx 2011



                     </PRESENTATION>
                        murat@muratyener.com

                         blogs.eteration.com
                         devchronicles.com

                              @yenerm
                       114028338330916709688


Friday, May 25, 12

More Related Content

Similar to Mobile Java with GWT, Still Write Once Run Everywhere (mGWT+Phonegap)

Convergence: From Desktop to Web to Mobile
Convergence: From Desktop to Web to MobileConvergence: From Desktop to Web to Mobile
Convergence: From Desktop to Web to Mobileaccount inactive
 
MT5で実現するマルチデバイス、クロスプラットフォーム
MT5で実現するマルチデバイス、クロスプラットフォームMT5で実現するマルチデバイス、クロスプラットフォーム
MT5で実現するマルチデバイス、クロスプラットフォームSix Apart KK
 
The History of HTML5
The History of HTML5The History of HTML5
The History of HTML5Mike Wilcox
 
Leadership Anderson 2013 - Digital Media Presentation
Leadership Anderson 2013 - Digital Media PresentationLeadership Anderson 2013 - Digital Media Presentation
Leadership Anderson 2013 - Digital Media PresentationBobby Rettew
 
Mobile Apps - The Business & Technology
Mobile Apps - The Business & TechnologyMobile Apps - The Business & Technology
Mobile Apps - The Business & TechnologyAndri Yadi
 
"Converged Communications -- Impact and Requirements on future handsets
"Converged Communications -- Impact and Requirements on future handsets"Converged Communications -- Impact and Requirements on future handsets
"Converged Communications -- Impact and Requirements on future handsetsJohn Loughney
 

Similar to Mobile Java with GWT, Still Write Once Run Everywhere (mGWT+Phonegap) (6)

Convergence: From Desktop to Web to Mobile
Convergence: From Desktop to Web to MobileConvergence: From Desktop to Web to Mobile
Convergence: From Desktop to Web to Mobile
 
MT5で実現するマルチデバイス、クロスプラットフォーム
MT5で実現するマルチデバイス、クロスプラットフォームMT5で実現するマルチデバイス、クロスプラットフォーム
MT5で実現するマルチデバイス、クロスプラットフォーム
 
The History of HTML5
The History of HTML5The History of HTML5
The History of HTML5
 
Leadership Anderson 2013 - Digital Media Presentation
Leadership Anderson 2013 - Digital Media PresentationLeadership Anderson 2013 - Digital Media Presentation
Leadership Anderson 2013 - Digital Media Presentation
 
Mobile Apps - The Business & Technology
Mobile Apps - The Business & TechnologyMobile Apps - The Business & Technology
Mobile Apps - The Business & Technology
 
"Converged Communications -- Impact and Requirements on future handsets
"Converged Communications -- Impact and Requirements on future handsets"Converged Communications -- Impact and Requirements on future handsets
"Converged Communications -- Impact and Requirements on future handsets
 

More from Murat Yener

Design patterns with Kotlin
Design patterns with KotlinDesign patterns with Kotlin
Design patterns with KotlinMurat Yener
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Murat Yener
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsMurat Yener
 
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)Murat Yener
 
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)Murat Yener
 
Android WebView, The Fifth Element
Android WebView, The Fifth ElementAndroid WebView, The Fifth Element
Android WebView, The Fifth ElementMurat Yener
 
JavaOne 2012, OSGi for the Earthlings: Meet Eclipse Libra
JavaOne 2012, OSGi for the Earthlings: Meet Eclipse LibraJavaOne 2012, OSGi for the Earthlings: Meet Eclipse Libra
JavaOne 2012, OSGi for the Earthlings: Meet Eclipse LibraMurat Yener
 
Eclipsist2009 Rich Client Roundup
Eclipsist2009 Rich Client RoundupEclipsist2009 Rich Client Roundup
Eclipsist2009 Rich Client RoundupMurat Yener
 

More from Murat Yener (8)

Design patterns with Kotlin
Design patterns with KotlinDesign patterns with Kotlin
Design patterns with Kotlin
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
 
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
Eclipse Orion: The IDE in the Clouds (JavaOne 2013)
 
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
 
Android WebView, The Fifth Element
Android WebView, The Fifth ElementAndroid WebView, The Fifth Element
Android WebView, The Fifth Element
 
JavaOne 2012, OSGi for the Earthlings: Meet Eclipse Libra
JavaOne 2012, OSGi for the Earthlings: Meet Eclipse LibraJavaOne 2012, OSGi for the Earthlings: Meet Eclipse Libra
JavaOne 2012, OSGi for the Earthlings: Meet Eclipse Libra
 
Eclipsist2009 Rich Client Roundup
Eclipsist2009 Rich Client RoundupEclipsist2009 Rich Client Roundup
Eclipsist2009 Rich Client Roundup
 

Recently uploaded

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Recently uploaded (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

Mobile Java with GWT, Still Write Once Run Everywhere (mGWT+Phonegap)

  • 1. MOBILE JAVA (GWT, MGWT, PHONEGAP) Still “Write Once Run Everywhere” Murat YENER Friday, May 25, 12
  • 2. MOBILE JAVA (GWT, MGWT, PHONEGAP) Still “Write Once Run Everywhere” Murat YENER Friday, May 25, 12
  • 3. MURAT YENER Java/JavaEE, GWT, Flex, Android, iOS, Node.js... Developer Google Developer Group Istanbul Eclipsist 2008/2009, EclipseCon 2010, JavaOne 2011 Friday, May 25, 12
  • 4. This talk is highly inspired by Matt Raible’s talk at Devoxx http://www.parleys.com/#st=5&id=2925&sl=0 Friday, May 25, 12
  • 6. MOBIL APPS • Android Friday, May 25, 12
  • 7. MOBIL APPS • Android • iPhone Friday, May 25, 12
  • 8. MOBIL APPS • Android • iPhone • Blackberry Friday, May 25, 12
  • 9. MOBIL APPS • Android • iPhone • Blackberry • Windows Phone Friday, May 25, 12
  • 10. MOBIL APPS • Android • iPhone • Blackberry • Windows Phone • Tablets?!? Friday, May 25, 12
  • 11. MOBIL APPS • Android • iPhone • Blackberry • Windows Phone • Tablets?!? Friday, May 25, 12
  • 12. HTML HTML2 CSS+JS Eclair 1991 HTML4 Donut Android Cupcake 1992 1993 CSS2 Honeycomb 1994 XHTML WM 2003 Beta Android 1.1 1995 Android 1.0 Gingerbread 1996 1997 Tableless WM 5 iPad Froyo ICS iPhone Web iPhone3GS iPad2 1998 1999 WM 6 2000 AJAX iPhone3G iPhone4S 2001 iPhone4 2002 2003 WinPhone7 2004 2005 HTML5 WEB & MOBILE 2006 2007 2008 2012 2009 2010 2011 2011 2012 2012 Friday, May 25, 12
  • 13. + Blackberry Symbian ... HTML HTML2 CSS+JS Eclair 1991 HTML4 Donut Android Cupcake 1992 1993 CSS2 Honeycomb 1994 XHTML WM 2003 Beta Android 1.1 1995 Android 1.0 Gingerbread 1996 1997 Tableless WM 5 iPad Froyo ICS iPhone Web iPhone3GS iPad2 1998 1999 WM 6 2000 AJAX iPhone3G iPhone4S 2001 iPhone4 2002 2003 WinPhone7 2004 2005 HTML5 WEB & MOBILE 2006 2007 2008 2012 2009 2010 2011 2011 2012 2012 Friday, May 25, 12
  • 15. Web Apps: Teaching the old dog new tricks? Friday, May 25, 12
  • 16. Web Apps: Teaching the old dog new tricks? Friday, May 25, 12
  • 17. Web Apps: Teaching the old dog new tricks? Friday, May 25, 12
  • 18. HTML MOBILE FRAMEWORKS • Sencha • Titanium • ... Friday, May 25, 12
  • 19. HTML5 • Storage, WebSQL, Application Cache, Web Workers, WebSocket, Notifications, Drag&Drop, GeoLocation, Speech, Audio, Video, Canvas, SVG... • New tags!!! <article> <aside> <section> <header> <footer> <nav> <audio> <video> <datalist> <details>... • Gone!!! <applet> <center> <font> <frame> <frameset> • http://www.w3schools.com/html5/html5_reference.asp Friday, May 25, 12
  • 20. CSS3 • Animated Transitions • Rounded Corners • Drop Shadows • Gradient Colors • Background Decoration • Text Effects • Web Fonts Friday, May 25, 12
  • 21. JAVASCRIPT • IDE? • Debugging? Friday, May 25, 12
  • 22. JAVASCRIPT • IDE? • Debugging? Friday, May 25, 12
  • 25. GOOGLE WEB TOOLKIT • Write Java, compile Javascript • Eclipse integration • Debug Javascript on Java • Browser compability (from IE6 to mobile!!!) Friday, May 25, 12
  • 26. GOOGLE WEB TOOLKIT • Write Java, compile Javascript • Eclipse integration • Debug Javascript on Java • Browser compability (from IE6 to mobile!!!) Friday, May 25, 12
  • 27. GOOGLE WEB TOOLKIT • Write Java, compile Javascript • Eclipse integration • Debug Javascript on Java • Browser compability (from IE6 to mobile!!!) Friday, May 25, 12
  • 28. GOOGLE WEB TOOLKIT • Write Java, compile Javascript • Eclipse integration • Debug Javascript on Java • Browser compability (from IE6 to mobile!!!) Friday, May 25, 12
  • 29. GWT, MOBILE? • Style? (CSS?) • Native Widgetlar (Button, Combo, Checkbox...) • Online/Offline • APIs (Camera, GPS, Contacts...) Friday, May 25, 12
  • 30. GWT, MOBILE? • Style? (CSS?) • Native Widgetlar (Button, Combo, Checkbox...) • Online/Offline • APIs (Camera, GPS, Contacts...) Friday, May 25, 12
  • 35. LOOKING NATIVE • gwt-mobile-webkit: database, storage, geolocation, widgets(?) http://code.google.com/p/ gwt-mobile-webkit/ • gwtmobile: GwtMobile-UI, Gwtmobile- Persistence, GwtMobile-PhoneGap(!) http://code.google.com/p/gwtmobile/ • touch4j: Sencha, $$ http://www.emitrom.com/ gwt4touch • mgwt: UI Widgets, GWT-Phonegap http:// code.google.com/p/mgwt/ Friday, May 25, 12
  • 36. LOOKING NATIVE • gwt-mobile-webkit: database, storage, geolocation, widgets(?) http://code.google.com/p/ gwt-mobile-webkit/ • gwtmobile: GwtMobile-UI, Gwtmobile- Persistence, GwtMobile-PhoneGap(!) http://code.google.com/p/gwtmobile/ • touch4j: Sencha, $$ http://www.emitrom.com/ gwt4touch • mgwt: UI Widgets, GWT-Phonegap http:// code.google.com/p/mgwt/ Friday, May 25, 12
  • 37. LOOKING NATIVE • gwt-mobile-webkit: database, storage, geolocation, widgets(?) http://code.google.com/p/ gwt-mobile-webkit/ • gwtmobile: GwtMobile-UI, Gwtmobile- Persistence, GwtMobile-PhoneGap(!) http://code.google.com/p/gwtmobile/ • touch4j: Sencha, $$ http://www.emitrom.com/ gwt4touch • mgwt: UI Widgets, GWT-Phonegap http:// code.google.com/p/mgwt/ Friday, May 25, 12
  • 38. LOOKING NATIVE • gwt-mobile-webkit: database, storage, geolocation, widgets(?) http://code.google.com/p/ gwt-mobile-webkit/ • gwtmobile: GwtMobile-UI, Gwtmobile- Persistence, GwtMobile-PhoneGap(!) http://code.google.com/p/gwtmobile/ • touch4j: Sencha, $$ http://www.emitrom.com/ gwt4touch • mgwt: UI Widgets, GWT-Phonegap http:// code.google.com/p/mgwt/ Friday, May 25, 12
  • 39. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &Offline Friday, May 25, 12
  • 40. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &Offline Friday, May 25, 12
  • 41. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &Offline Friday, May 25, 12
  • 42. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &Offline Friday, May 25, 12
  • 43. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &Offline Friday, May 25, 12
  • 44. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &Offline Friday, May 25, 12
  • 45. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &Offline Friday, May 25, 12
  • 46. MGWT • Standard GWT (Java) • JavaScript via JSNI • Native looking widgets • iOS, Android, Blackberry... • Phones & Tablets • Online &Offline Friday, May 25, 12
  • 49. PROJECT :) • Chronometer + map (location, maps) • MP3 player (audio) • Friend List(contacts, http request, social login) • History (storage) Friday, May 25, 12
  • 50. PROJECT :) • Chronometer + map (location, maps) • MP3 player (audio) • Friend List(contacts, http request, social login) • History (storage) Friday, May 25, 12
  • 51. PROJECT :) • Chronometer + map (location, maps) • MP3 player (audio) • Friend List(contacts, http request, social login) • History (storage) Friday, May 25, 12
  • 52. PROJECT :) • Chronometer + map (location, maps) • MP3 player (audio) • Friend List(contacts, http request, social login) • History (storage) Friday, May 25, 12
  • 53. STARTING MGWT • Eclipse GWT plugin • MGWT • Model-View-Presenter • Maven Archetype Friday, May 25, 12
  • 54. STARTING MGWT • Eclipse GWT plugin • MGWT • Model-View-Presenter • Maven Archetype Friday, May 25, 12
  • 55. STARTING MGWT • Eclipse GWT plugin • MGWT • Model-View-Presenter • Maven Archetype Friday, May 25, 12
  • 56. STARTING MGWT • Eclipse GWT plugin • MGWT • Model-View-Presenter • Maven Archetype Friday, May 25, 12
  • 57. MAPS • Google Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/ • Google Maps Ver 3.0: http://code.google.com/p/gwt-google-maps-v3/ • No Javascript so far! • <inherits name='com.google.gwt.maps.GoogleMaps' /> Friday, May 25, 12
  • 58. MAPS • Google Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/ • Google Maps Ver 3.0: http://code.google.com/p/gwt-google-maps-v3/ • No Javascript so far! • <inherits name='com.google.gwt.maps.GoogleMaps' /> Friday, May 25, 12
  • 59. MAPS • Google Maps Ver 2.0: http://code.google.com/p/gwt-google-apis/ • Google Maps Ver 3.0:lpha a http://code.google.com/p/gwt-google-maps-v3/ • No Javascript so far! • <inherits name='com.google.gwt.maps.GoogleMaps' /> Friday, May 25, 12
  • 60. LOCATION • HTML5 Geolocation • Still no Javascript!! Friday, May 25, 12
  • 61. LOCATION UserLocation.getLocation(new UserLocationCallback() { @Override public void onLocationFound(Coordinates coords) { getMap(coords); } }); • HTML5 Geolocation • Still no Javascript!! Friday, May 25, 12
  • 62. LOCATION UserLocation.getLocation(new UserLocationCallback() { @Override public void onLocationFound(Coordinates coords) { getMap(coords); } }); • HTML5 Geolocation • Still no Javascript!! Friday, May 25, 12
  • 63. FIRST TRY • HTML5 Geolocation not accurared • Just a straight line instead of a route • The app stops when the device is locked Friday, May 25, 12
  • 64. FIRST TRY • HTML5 Geolocation not accurared • Just a straight line instead of a route • The app stops when the device is locked Friday, May 25, 12
  • 65. FIRST TRY • HTML5 Geolocation not accurared • Just a straight line instead of a route • The app stops when the device is locked Friday, May 25, 12
  • 66. FIRST TRY • HTML5 Geolocation not accurared enableHighAccuracy: True • Just a straight line instead of a route • The app stops when the device is locked Friday, May 25, 12
  • 67. FIRST TRY • HTML5 Geolocation not accurared enableHighAccuracy: True • Just a straight line instead of a route Google Maps Polylines • The app stops when the device is locked Friday, May 25, 12
  • 68. FIRST TRY • HTML5 Geolocation not accurared enableHighAccuracy: True • Just a straight line instead of a route Google Maps Polylines • The app stops when the device is locked PhoneGap? Friday, May 25, 12
  • 69. PHONEGAP • or the new Cordova • iOS Plugin (http://phonegap.com/start#ios-x4) • Android Plugin (http://phonegap.com/start#android) • and others... Friday, May 25, 12
  • 70. PHONEGAP • or the new Cordova • iOS Plugin (http://phonegap.com/start#ios-x4) • Android Plugin (http://phonegap.com/start#android) • and others... Friday, May 25, 12
  • 71. PHONEGAP • or the new Cordova • iOS Plugin (http://phonegap.com/start#ios-x4) • Android Plugin (http://phonegap.com/start#android) • and others... Friday, May 25, 12
  • 72. BUT WHERE IS THE MAP?!? Friday, May 25, 12
  • 73. URL PERMISSIONS • maps.gstatic • mt1.googleapis • mt0.googleapis • maps.google.com Friday, May 25, 12
  • 74. URL PERMISSIONS • maps.gstatic • mt1.googleapis • mt0.googleapis • maps.google.com Friday, May 25, 12
  • 75. URL PERMISSIONS • maps.gstatic • mt1.googleapis • mt0.googleapis • maps.google.com Friday, May 25, 12
  • 76. SECOND TRY • Stillwhen the location updates stop when the device is locked! Friday, May 25, 12
  • 77. SECOND TRY • Stillwhen the location updates stop when the device is locked! Friday, May 25, 12
  • 78. SECOND TRY Ph on e Ga stop p!! • Still when the location updates when the device is locked! ! Friday, May 25, 12
  • 80. MP3 PLAYER • Local vs Streaming • HTML5 <Audio> • com.phonegap.audiohandler Friday, May 25, 12
  • 81. MP3 PLAYER • Local vs Streaming • HTML5 <Audio> • com.phonegap.audiohandler Friday, May 25, 12
  • 82. HISTORY • LocalStorage, Javascript wrapper public native static void setItem(String key, String value) /*-{ $wnd.localStorage.setItem(key, value); }-*/; public native static String getItem(String key) /*-{ return $wnd.localStorage.getItem(key); }-*/; • WebSQL • Cookies!! public static String getItem(String key){ return Cookies.getCookie(key); } public static void setItem(String key, String value){ Cookies.setCookie(key, value, new Date(2050, 1, 1), "", "", true); } Friday, May 25, 12
  • 83. MY FRIENDS • Getting contacts phoneGap.getContacts() • Social login gwt-google-apis & OAuth Friday, May 25, 12
  • 84. MY FRIENDS PLUS.initialize(new SimpleEventBus(), new GoogleApiRequestTransport(APPLICATION_NAME, API_KEY));     final Button b = new Button("Authenticate to get public activities"); • Getting contacts     b.addClickHandler(new ClickHandler() {       @Override       public void onClick(ClickEvent e) {         OAuth2Login.get().authorize(CLIENT_ID, PlusAuthScope.PLUS_ME, new Callback<Void, Exception>() {       @Override phoneGap.getContacts()       public void onSuccess(Void v) {         PLUS.people().get("me").to(new Receiver<Person>() {       @Override • Social login       public void onSuccess(Person person) {         println("Hello " + person.getDisplayName());       }     }).fire();       }           @Override gwt-google-apis   public void onFailure(Exception e) {         println(e.getMessage());       }     });       }     }); & OAuth Friday, May 25, 12
  • 85. MY FRIENDS • Getting contacts phoneGap.getContacts() • Social login gwt-google-apis & OAuth Friday, May 25, 12
  • 86. MY FRIENDS • Getting contacts phoneGap.getContacts() • Social login gwt-google-apis & OAuth lug in browser p egap child Phon Friday, May 25, 12
  • 87. PHONEGAP PLUGIN • Android http://wiki.phonegap.com/w/page/43708611/How%20to%20Install%20a%20PhoneGap%20Plugin%20for%20Android plugins.xml <plugin name="BatteryLevelPlugin" value="com.example.BatteryLevelPlugin" /> • iOS http://wiki.phonegap.com/w/page/43708792/How%20to%20Install%20a%20PhoneGap%20Plugin%20for%20iOS plugins folder: .m .h files phonegap.plist: www folder: javascript files Friday, May 25, 12
  • 88. SWIPE PANEL • Google+ • Built in widget in Sencha and other frameworks • not in mGWT!?! • Wrapping Javascript with JSNI? Friday, May 25, 12
  • 89. SWIPE PANEL • Google+ • Built in widget in Sencha and other frameworks • not in mGWT!?! • Wrapping Javascript with JSNI? Friday, May 25, 12
  • 93. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwt Friday, May 25, 12
  • 94. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwt Friday, May 25, 12
  • 95. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwt Friday, May 25, 12
  • 96. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwt Friday, May 25, 12
  • 97. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwt Friday, May 25, 12
  • 98. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwt Friday, May 25, 12
  • 99. MGWT GROUPS https://groups.google.com/forum/?fromgroups#!forum/mgwt Friday, May 25, 12
  • 106. PHONEGAP - CORDOVA • Apache Cordova Incubator • 1.3<problem<1.7 • Cordova 1.7 - GwtPhonegap 1.7 + mGWT 1.1 (Snapshot) Friday, May 25, 12
  • 107. DEBUGGING • Desktop: First Class Java Debugging • Mobil: Gwt Pretty Compile! iOS: Remote debugging of HTML and JS on device - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ! [NSClassFromString(@"WebView") _enableRemoteInspector]; Android: Chrome Beta? Most probably will be available soon Friday, May 25, 12
  • 108. LOCATION DEBUG • Go out!!! • Also only on iOS :( Friday, May 25, 12
  • 109. CONCLUSION • MGWT + PhoneGap works! Not a silverbullet but sill great! • Only way to connect backend JSONP (JSON with Padding) • JSNI is very easy... BUT! be careful when touch events are involved! • Browse Phonegap plugins before going native! • Test location on field. • Don’t forget to add urls to permissions list Friday, May 25, 12
  • 110. Like the talk... A Hall14:30 and Matt Raible Devoxx 2011 </PRESENTATION> murat@muratyener.com blogs.eteration.com devchronicles.com @yenerm 114028338330916709688 Friday, May 25, 12

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n