Streamlining Python Development: A Guide to a Modern Project Setup
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
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
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