SlideShare uma empresa Scribd logo
1 de 46
Taking Your GWTApps to Tablets with GXT
4.0
David Chandler
Developer Advocate - GXT
CONFIDENTIAL • Sencha
Inc. ©2015
We can build this
CONFIDENTIAL • Sencha
Inc. ©2015
Something has changed
CONFIDENTIAL • Sencha
Inc. ©2015
The Tablets are coming…
CONFIDENTIAL • Sencha
Inc. ©2015
…to work
Source: http://itmanagementstudy.blogspot.com/2014/05/byod-issues-challenges.html
CONFIDENTIAL • Sencha
Inc. ©2015
users expect
CONFIDENTIAL • Sencha
Inc. ©2015
in a browser?
TouchEvent
touchstart
touchmove
touchend
touchcancel
CONFIDENTIAL • Sencha
Inc. ©2015
GWT events
• touchstart
• touchmove
• touchend
• touchcancel
Logical events
• TapGestureEvent
• LongPressEvent
• DragGestureStart
/Move/End/Cancel
• RotateGestureEvent
but wait, we need
CONFIDENTIAL • Sencha
Inc. ©2015
gesture
jes-cher
noun
1. a movement of a finger, stylus, or
other pointing device to express an
intended action
CONFIDENTIAL • Sencha
Inc. ©2015
GWT events
• touchstart
• touchmove
• touchend
• touchcancel
GestureRecognizers
• TapGR
• LongPressOrTapGR
• DragGR
• PinchAndRotateGR
GXT events
• TapGestureEvent
• LongPressEvent
• DragGestureStart
/Move/End/Cancel
• RotateGestureEvent
Touch support in GXT 4
CONFIDENTIAL • Sencha
Inc. ©2015
GXT 4 Touch Demo
11
CONFIDENTIAL • Sencha
Inc. ©2015
GXT 4 Triton Theme
12
CONFIDENTIAL • Sencha
Inc. ©2015
GXT 4 Triton Theme
13
CONFIDENTIAL • Sencha
Inc. ©2015
GXT 4 Executive Dashboard App
14
Getting started with touch in GXT 4
CONFIDENTIAL • Sencha
Inc. ©2015
Set the viewport
• Avoid conflict with system gestures like double-tap to zoom
• Option 1: lock the viewport
• Option 2: limit scaling
CONFIDENTIAL • Sencha
Inc. ©2015
3 ways to enable touch
• ButtonCell
• SliderCell, …
Use a Widget
• LongPressOrTapGR
• DragGestureGR, …
Use a Gesture
Recognizer
• LongPressEvent
• DragGestureStartEvent
Listen for an
event
CONFIDENTIAL • Sencha
Inc. ©2015
1. Use a widget
• Most widgets automatically respond to touch
• Buttons fire SelectEvent
• Expand / collapse works without delay
• Editable cells respond to single or double tap based on setClicksToEdit()
• etc.
• If you’ve implemented onMouseClick/Up/Down
• *may* also need to override onTap/onTouchStart/onTouchEnd
• Many widgets expose new methods for touch
• SliderCell example
CONFIDENTIAL • Sencha
Inc. ©2015
1. Use a Widget
public SliderCell sliderCell = new SliderCell() {
@Override
protected void onTap(…) {
super.onTap(t, context, parent, value, valueUpdater);
}
@Override
protected void onTouchMove(…) {
super.onTouchMove(t, context, parent, value,
valueUpdater);
}
};
CONFIDENTIAL • Sencha
Inc. ©2015
2. Use a GestureRecognizer
addCellGestureAdapter(new
LongPressOrTapGestureRecognizer.CellLongPressOrTapGestureRecognizer<Contact>() {
@Override
protected void onLongPress(…) {
Window.alert(“I’m feeling pressed.”);
}
});
CONFIDENTIAL • Sencha
Inc. ©2015
2. Use a GestureRecognizer
• addGestureRecognizer(…)
extend
Component
• addCellGestureAdapter(…)extend
AbstractEventCell
AbstractEventInputCell
• new Adapter(Widget w, GR…)
instantiate
TouchEventToGestureAdapter
CONFIDENTIAL • Sencha
Inc. ©2015
2. Use a GestureRecognizer
Where to call addGestureRecognizer(…)
1. Widget constructor (if all vars available)
• Example: SliderCell, Tree, …
2. as soon as you can
• Example: LiveGridView.onAfterRenderView()
CONFIDENTIAL • Sencha
Inc. ©2015
2. Use a GestureRecognizer
• Example: in Tree constructor
CONFIDENTIAL • Sencha
Inc. ©2015
3. Listen for an event
• Each GR defines events such as TapGestureEvent
• By default, GR fires events to the Component, Cell, or Widget which registered it*
• Listen using Widget.addHandler()
* you can change this by calling GR.setDelegate() after registering
CONFIDENTIAL • Sencha
Inc. ©2015
Under the covers
• Two pieces required for GestureRecognizers to work
1. must listen for the raw DOM events
2. forward events to the GestureRecognizer
• We’ve wired this for you in Component and AbstractEventCell
1. addGestureRecognizer() sinks the events
2. onBrowserEvent() => recognizer.handle()
• You only have to call addGestureRecognizer/Adapter()
CONFIDENTIAL • Sencha
Inc. ©2015
Understanding JS touch events
• https://developer.mozilla.org/en-US/docs/Web/Events/touchstart
• touches vs. changedTouches
• gotcha: target property will always be the element where touch began
• events bubble up through the DOM until stopped
• to stop bubbling, call event.stopPropagation()
• at the top level, the browser will handle in its default way
• example: right click shows context menu
• can prevent this using event.preventDefault()
CONFIDENTIAL • Sencha
Inc. ©2015
Eliminating the 300ms delay
• If no touch handlers, mobile browser will fire synthetic mouse click AFTER 300ms
• Your old code will work, but will feel sluggish
• Best answer: implement touchEnd handlers
• GXT 4 has mostly done this for you
• Or you can do it in your custom widgets:
• Use Widget.addDomHandler() or
• onBrowserEvent switch / case
• don’t forget to sink the event(s)
CONFIDENTIAL • Sencha
Inc. ©2015
Pro tips
• KEEP MOUSE AND TOUCH PATHS SEPARATE
• Why not onTouchEnd -> onMouseClick()?
• Because your code might have this hiding in it:
if (mouseDown) {...}
CONFIDENTIAL • Sencha
Inc. ©2015
Pro tips
Avoid this:
Do this instead:
doSomething
onMouseClick onTouchEnd
CONFIDENTIAL • Sencha
Inc. ©2015
Pro tips
• Problem: mobile browsers don’t blur fields when you touch Submit
• Solution: programmatically focus the Submit button when tapped
protected void onTap(…) {
…
getInputElement(parent).focus();
}
CONFIDENTIAL • Sencha
Inc. ©2015
Pro tips
• handle touchEnd rather than touchStart
• otherwise, you might select things when you really wanted to scroll
• in general, touchEnd is the better method to use in TapGR
• onTouchStart() should also preventDefault()
• otherwise, long press might show browser’s context menu as well as a tool tip
• we solved this in GXT’s PanelTab
CONFIDENTIAL • Sencha
Inc. ©2015
other niceties in GXT 4.0
• property binding: gxt.device=tablet|desktop
• can be used in CSS conditionals
• also GXT.isTablet()
• caveat: it’s pretty basic!
• GestureRecognizers are independent of GXT widgets
• can use with your own widgets
• new TouchEventToGestureAdapter(Widget w, GestureRecognizer gr)
• raw events flow through as normal
Dev tricks
CONFIDENTIAL • Sencha
Inc. ©2015
Device emulation
• alias chrome='/Applications/Google
Chrome.app/Contents/MacOS/Google Chrome --touch-events’
• emulate device
• don’t auto-launch
• start dev mode and wait for this:
• Click the link or Cmd+Shift+R in browser
CONFIDENTIAL • Sencha
Inc. ©2015
reduce initial compile time
Typical gwt.xml:
With <collapse-all-properties /> *
* not for prod. Size will increase 15-20%
[INFO] Compiling 12 permutations
[INFO] Compilation succeeded -- 144.760s
[INFO] Compiling 1 permutation
[INFO] Compilation succeeded -- 78.085s
CONFIDENTIAL • Sencha
Inc. ©2015
Chrome remote debugging
• launch GWT with dev mode param –bindAddress 0.0.0.0 to connect via wifi
• launch Chrome device
• hit GWT URL
• (AirDroid rocks!)
• plug in your device USB
• chrome://inspect
CONFIDENTIAL • Sencha
Inc. ©2015
Super Dev Mode
Problem:
SDM sometimes doesn’t automatically recompile on mobile
Solution:
1. force save in IDEA (tab switch or Ctrl+S)
2. refresh browser
Upcoming GWT 3.0
CONFIDENTIAL • Sencha
Inc. ©2015
GWT 3.0 is for Modern Browsers
• GWT 2.8 will be a long-lived maintenance branch
• GWT 3 is a complete rewrite of the compiler
• Java to JS transpiler “only”
• Superior JS Interoperability
• New DOM implementation
• No more Widget
• No more GWT-RPC
• No more permutations (use static factory methods instead)
CONFIDENTIAL • Sencha
Inc. ©2015
Sencha’s Plan
• GXT 4 with GWT 2.7/2.8 will continue to support new browsers
• Still very early – GWT 3 not expected till next year
• Lot depends on JS Interoperability
• Areas we’re looking hard at:
• Touch Widgets
• Responsive Design
• Easier Theming
40
Q & A
Download GXT 4 Early Access
https://www.sencha.com/blog/announcing-gxt-4-early-access/
Join Sencha GXT community on G+
Bonus: working with touch events in MVP
CONFIDENTIAL • Sencha
Inc. ©2015
Touch events in MVP
• Grid or ListView are typically members of a View class
• but touch events happen in the Cell
• how to invoke a Presenter method from a Cell?
• via interface, just like View invokes Presenter
Cell CellEventHandler View View.Delegate Presenter
CONFIDENTIAL • Sencha
Inc. ©2015
Define Handler interface in Cell
CONFIDENTIAL • Sencha
Inc. ©2015
Delegate to Handler
CONFIDENTIAL • Sencha
Inc. ©2015
Let View implement Handler

Mais conteúdo relacionado

Mais procurados

Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web ToolkitDidier Girard
 
Android best practices 2015
Android best practices 2015Android best practices 2015
Android best practices 2015Sean Katz
 
Vuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionVuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionMurat Doğan
 
Rapid Android Development for Hackathon
Rapid Android Development for HackathonRapid Android Development for Hackathon
Rapid Android Development for HackathonCodePolitan
 
The complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrrThe complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrrAfreenK
 
Gerrit JavaScript Plugins
Gerrit JavaScript PluginsGerrit JavaScript Plugins
Gerrit JavaScript PluginsDariusz Łuksza
 
Design Patterns every Android developer should know
Design Patterns every Android developer should knowDesign Patterns every Android developer should know
Design Patterns every Android developer should knowmuratcanbur
 
Reactjs workshop
Reactjs workshop Reactjs workshop
Reactjs workshop Ahmed rebai
 
ComponenKit and React Native
ComponenKit and React NativeComponenKit and React Native
ComponenKit and React NativeStanfy
 
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...Matt Raible
 
Say Hello to React day2 presentation
Say Hello to React   day2 presentationSay Hello to React   day2 presentation
Say Hello to React day2 presentationSmile Gupta
 
React Nativeの光と闇
React Nativeの光と闇React Nativeの光と闇
React Nativeの光と闇Yukiya Nakagawa
 
Deploying JHipster Microservices
Deploying JHipster MicroservicesDeploying JHipster Microservices
Deploying JHipster MicroservicesJoe Kutner
 
In defense of GWT-RPC By Colin Alworth
In defense of GWT-RPC By Colin AlworthIn defense of GWT-RPC By Colin Alworth
In defense of GWT-RPC By Colin AlworthGWTcon
 
Devoxx : being productive with JHipster
Devoxx : being productive with JHipsterDevoxx : being productive with JHipster
Devoxx : being productive with JHipsterJulien Dubois
 
Introducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerIntroducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerApplitools
 

Mais procurados (20)

Introducing GWT Polymer (vaadin)
Introducing GWT Polymer (vaadin)Introducing GWT Polymer (vaadin)
Introducing GWT Polymer (vaadin)
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web Toolkit
 
Android best practices 2015
Android best practices 2015Android best practices 2015
Android best practices 2015
 
Vuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionVuejs getting-started - Extended Version
Vuejs getting-started - Extended Version
 
Rapid Android Development for Hackathon
Rapid Android Development for HackathonRapid Android Development for Hackathon
Rapid Android Development for Hackathon
 
jQuery plugin & testing with Jasmine
jQuery plugin & testing with JasminejQuery plugin & testing with Jasmine
jQuery plugin & testing with Jasmine
 
The complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrrThe complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrr
 
Gerrit JavaScript Plugins
Gerrit JavaScript PluginsGerrit JavaScript Plugins
Gerrit JavaScript Plugins
 
Design Patterns every Android developer should know
Design Patterns every Android developer should knowDesign Patterns every Android developer should know
Design Patterns every Android developer should know
 
Reactjs workshop
Reactjs workshop Reactjs workshop
Reactjs workshop
 
ComponenKit and React Native
ComponenKit and React NativeComponenKit and React Native
ComponenKit and React Native
 
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
 
Say Hello to React day2 presentation
Say Hello to React   day2 presentationSay Hello to React   day2 presentation
Say Hello to React day2 presentation
 
React Nativeの光と闇
React Nativeの光と闇React Nativeの光と闇
React Nativeの光と闇
 
Deploying JHipster Microservices
Deploying JHipster MicroservicesDeploying JHipster Microservices
Deploying JHipster Microservices
 
React Django Presentation
React Django PresentationReact Django Presentation
React Django Presentation
 
In defense of GWT-RPC By Colin Alworth
In defense of GWT-RPC By Colin AlworthIn defense of GWT-RPC By Colin Alworth
In defense of GWT-RPC By Colin Alworth
 
GWT and PWA
GWT and PWAGWT and PWA
GWT and PWA
 
Devoxx : being productive with JHipster
Devoxx : being productive with JHipsterDevoxx : being productive with JHipster
Devoxx : being productive with JHipster
 
Introducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerIntroducing Playwright's New Test Runner
Introducing Playwright's New Test Runner
 

Semelhante a Taking Your GWT App to Tablets with GXT 4.0

From 1 RPM to 1,000 RPM - succeeding in a software-defined economy - Sacha La...
From 1 RPM to 1,000 RPM - succeeding in a software-defined economy - Sacha La...From 1 RPM to 1,000 RPM - succeeding in a software-defined economy - Sacha La...
From 1 RPM to 1,000 RPM - succeeding in a software-defined economy - Sacha La...JAXLondon_Conference
 
What's New in Wonderware InTouch Access Anywhere v.122015
What's New in Wonderware InTouch Access Anywhere v.122015What's New in Wonderware InTouch Access Anywhere v.122015
What's New in Wonderware InTouch Access Anywhere v.122015Katie Schauer
 
Remote Workers Webinar (Episode 2)
Remote Workers Webinar (Episode 2)Remote Workers Webinar (Episode 2)
Remote Workers Webinar (Episode 2)Ivanti
 
Open Source in the Era of 5G - All Things Open 2018
Open Source in the Era of 5G - All Things Open 2018Open Source in the Era of 5G - All Things Open 2018
Open Source in the Era of 5G - All Things Open 2018Mark Voelker
 
Open Source in the Era of 5G
Open Source in the Era of 5GOpen Source in the Era of 5G
Open Source in the Era of 5GAll Things Open
 
Journée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec JenkinsJournée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec JenkinsPublicis Sapient Engineering
 
Creative Automation with Galen Framework
Creative Automation with Galen FrameworkCreative Automation with Galen Framework
Creative Automation with Galen Framework'Ashmeet Sehgal'
 
Using containerization to enable your microservice architecture
Using containerization to enable your microservice architecture Using containerization to enable your microservice architecture
Using containerization to enable your microservice architecture Apigee | Google Cloud
 
Brian Gilmore [InfluxData] | InfluxDB in an IoT Application Architecture | In...
Brian Gilmore [InfluxData] | InfluxDB in an IoT Application Architecture | In...Brian Gilmore [InfluxData] | InfluxDB in an IoT Application Architecture | In...
Brian Gilmore [InfluxData] | InfluxDB in an IoT Application Architecture | In...InfluxData
 
Migrating Unity3D projects to Windows 8
Migrating Unity3D projects to Windows 8Migrating Unity3D projects to Windows 8
Migrating Unity3D projects to Windows 8282productions
 
The Cloud Native Journey
The Cloud Native JourneyThe Cloud Native Journey
The Cloud Native JourneyVMware Tanzu
 
Android On Your Sleeve - DroidCon Montreal 2015
Android On Your Sleeve - DroidCon Montreal 2015Android On Your Sleeve - DroidCon Montreal 2015
Android On Your Sleeve - DroidCon Montreal 2015Neal Sanche
 
Pivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookVMware Tanzu
 
User Experience Design for iPad Applications- Impetus Webinar
User Experience Design for iPad Applications- Impetus WebinarUser Experience Design for iPad Applications- Impetus Webinar
User Experience Design for iPad Applications- Impetus WebinarImpetus Technologies
 
Building Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonBuilding Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonLeon Stigter
 
Moving AWS workloads to OpenStack
Moving AWS workloads to OpenStackMoving AWS workloads to OpenStack
Moving AWS workloads to OpenStackMirantis
 
cdSummit Austin - Orchestrating the continuous delivery process - Andy Pemberton
cdSummit Austin - Orchestrating the continuous delivery process - Andy PembertoncdSummit Austin - Orchestrating the continuous delivery process - Andy Pemberton
cdSummit Austin - Orchestrating the continuous delivery process - Andy PembertonMiles Blatstein
 
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeployContinuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeployPeter Gfader
 

Semelhante a Taking Your GWT App to Tablets with GXT 4.0 (20)

From 1 RPM to 1,000 RPM - succeeding in a software-defined economy - Sacha La...
From 1 RPM to 1,000 RPM - succeeding in a software-defined economy - Sacha La...From 1 RPM to 1,000 RPM - succeeding in a software-defined economy - Sacha La...
From 1 RPM to 1,000 RPM - succeeding in a software-defined economy - Sacha La...
 
What's New in Wonderware InTouch Access Anywhere v.122015
What's New in Wonderware InTouch Access Anywhere v.122015What's New in Wonderware InTouch Access Anywhere v.122015
What's New in Wonderware InTouch Access Anywhere v.122015
 
Remote Workers Webinar (Episode 2)
Remote Workers Webinar (Episode 2)Remote Workers Webinar (Episode 2)
Remote Workers Webinar (Episode 2)
 
Open Source in the Era of 5G - All Things Open 2018
Open Source in the Era of 5G - All Things Open 2018Open Source in the Era of 5G - All Things Open 2018
Open Source in the Era of 5G - All Things Open 2018
 
Open Source in the Era of 5G
Open Source in the Era of 5GOpen Source in the Era of 5G
Open Source in the Era of 5G
 
GWT widget development
GWT widget developmentGWT widget development
GWT widget development
 
Journée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec JenkinsJournée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec Jenkins
 
Creative Automation with Galen Framework
Creative Automation with Galen FrameworkCreative Automation with Galen Framework
Creative Automation with Galen Framework
 
Using containerization to enable your microservice architecture
Using containerization to enable your microservice architecture Using containerization to enable your microservice architecture
Using containerization to enable your microservice architecture
 
Brian Gilmore [InfluxData] | InfluxDB in an IoT Application Architecture | In...
Brian Gilmore [InfluxData] | InfluxDB in an IoT Application Architecture | In...Brian Gilmore [InfluxData] | InfluxDB in an IoT Application Architecture | In...
Brian Gilmore [InfluxData] | InfluxDB in an IoT Application Architecture | In...
 
Migrating Unity3D projects to Windows 8
Migrating Unity3D projects to Windows 8Migrating Unity3D projects to Windows 8
Migrating Unity3D projects to Windows 8
 
The Cloud Native Journey
The Cloud Native JourneyThe Cloud Native Journey
The Cloud Native Journey
 
What does it cost to develop an app
What does it cost to develop an app What does it cost to develop an app
What does it cost to develop an app
 
Android On Your Sleeve - DroidCon Montreal 2015
Android On Your Sleeve - DroidCon Montreal 2015Android On Your Sleeve - DroidCon Montreal 2015
Android On Your Sleeve - DroidCon Montreal 2015
 
Pivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First Look
 
User Experience Design for iPad Applications- Impetus Webinar
User Experience Design for iPad Applications- Impetus WebinarUser Experience Design for iPad Applications- Impetus Webinar
User Experience Design for iPad Applications- Impetus Webinar
 
Building Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonBuilding Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and Tekton
 
Moving AWS workloads to OpenStack
Moving AWS workloads to OpenStackMoving AWS workloads to OpenStack
Moving AWS workloads to OpenStack
 
cdSummit Austin - Orchestrating the continuous delivery process - Andy Pemberton
cdSummit Austin - Orchestrating the continuous delivery process - Andy PembertoncdSummit Austin - Orchestrating the continuous delivery process - Andy Pemberton
cdSummit Austin - Orchestrating the continuous delivery process - Andy Pemberton
 
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeployContinuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
 

Mais de David Chandler

StORM: a lightweight ORM for Android SQLite
StORM: a lightweight ORM for Android SQLiteStORM: a lightweight ORM for Android SQLite
StORM: a lightweight ORM for Android SQLiteDavid Chandler
 
Easy REST APIs with Jersey and RestyGWT
Easy REST APIs with Jersey and RestyGWTEasy REST APIs with Jersey and RestyGWT
Easy REST APIs with Jersey and RestyGWTDavid Chandler
 
Cómo trabajan los Googlers
Cómo trabajan los GooglersCómo trabajan los Googlers
Cómo trabajan los GooglersDavid Chandler
 
Google App Engine Update 2012
Google App Engine Update 2012Google App Engine Update 2012
Google App Engine Update 2012David Chandler
 
Scalable Apps with Google App Engine
Scalable Apps with Google App EngineScalable Apps with Google App Engine
Scalable Apps with Google App EngineDavid Chandler
 
Develop and Deploy Scalable Apps with Google App Engine
Develop and Deploy Scalable Apps with Google App EngineDevelop and Deploy Scalable Apps with Google App Engine
Develop and Deploy Scalable Apps with Google App EngineDavid Chandler
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaDavid Chandler
 
Securing JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top TenSecuring JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top TenDavid Chandler
 

Mais de David Chandler (14)

StORM: a lightweight ORM for Android SQLite
StORM: a lightweight ORM for Android SQLiteStORM: a lightweight ORM for Android SQLite
StORM: a lightweight ORM for Android SQLite
 
Easy REST APIs with Jersey and RestyGWT
Easy REST APIs with Jersey and RestyGWTEasy REST APIs with Jersey and RestyGWT
Easy REST APIs with Jersey and RestyGWT
 
Cómo trabajan los Googlers
Cómo trabajan los GooglersCómo trabajan los Googlers
Cómo trabajan los Googlers
 
Life of an engineer
Life of an engineerLife of an engineer
Life of an engineer
 
StORM preview
StORM previewStORM preview
StORM preview
 
Google App Engine Update 2012
Google App Engine Update 2012Google App Engine Update 2012
Google App Engine Update 2012
 
GWT Plus HTML 5
GWT Plus HTML 5GWT Plus HTML 5
GWT Plus HTML 5
 
Scalable Apps with Google App Engine
Scalable Apps with Google App EngineScalable Apps with Google App Engine
Scalable Apps with Google App Engine
 
What's New in GWT 2.2
What's New in GWT 2.2What's New in GWT 2.2
What's New in GWT 2.2
 
Develop and Deploy Scalable Apps with Google App Engine
Develop and Deploy Scalable Apps with Google App EngineDevelop and Deploy Scalable Apps with Google App Engine
Develop and Deploy Scalable Apps with Google App Engine
 
Secrets of the GWT
Secrets of the GWTSecrets of the GWT
Secrets of the GWT
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for Java
 
GWT MVP Case Study
GWT MVP Case StudyGWT MVP Case Study
GWT MVP Case Study
 
Securing JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top TenSecuring JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top Ten
 

Último

Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceDelhi Call girls
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...roncy bisnoi
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...SUHANI PANDEY
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubaikojalkojal131
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdfMatthew Sinclair
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...nirzagarg
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...SUHANI PANDEY
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 

Último (20)

Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 

Taking Your GWT App to Tablets with GXT 4.0

  • 1. Taking Your GWTApps to Tablets with GXT 4.0 David Chandler Developer Advocate - GXT
  • 2. CONFIDENTIAL • Sencha Inc. ©2015 We can build this
  • 3. CONFIDENTIAL • Sencha Inc. ©2015 Something has changed
  • 4. CONFIDENTIAL • Sencha Inc. ©2015 The Tablets are coming…
  • 5. CONFIDENTIAL • Sencha Inc. ©2015 …to work Source: http://itmanagementstudy.blogspot.com/2014/05/byod-issues-challenges.html
  • 6. CONFIDENTIAL • Sencha Inc. ©2015 users expect
  • 7. CONFIDENTIAL • Sencha Inc. ©2015 in a browser? TouchEvent touchstart touchmove touchend touchcancel
  • 8. CONFIDENTIAL • Sencha Inc. ©2015 GWT events • touchstart • touchmove • touchend • touchcancel Logical events • TapGestureEvent • LongPressEvent • DragGestureStart /Move/End/Cancel • RotateGestureEvent but wait, we need
  • 9. CONFIDENTIAL • Sencha Inc. ©2015 gesture jes-cher noun 1. a movement of a finger, stylus, or other pointing device to express an intended action
  • 10. CONFIDENTIAL • Sencha Inc. ©2015 GWT events • touchstart • touchmove • touchend • touchcancel GestureRecognizers • TapGR • LongPressOrTapGR • DragGR • PinchAndRotateGR GXT events • TapGestureEvent • LongPressEvent • DragGestureStart /Move/End/Cancel • RotateGestureEvent Touch support in GXT 4
  • 11. CONFIDENTIAL • Sencha Inc. ©2015 GXT 4 Touch Demo 11
  • 12. CONFIDENTIAL • Sencha Inc. ©2015 GXT 4 Triton Theme 12
  • 13. CONFIDENTIAL • Sencha Inc. ©2015 GXT 4 Triton Theme 13
  • 14. CONFIDENTIAL • Sencha Inc. ©2015 GXT 4 Executive Dashboard App 14
  • 15. Getting started with touch in GXT 4
  • 16. CONFIDENTIAL • Sencha Inc. ©2015 Set the viewport • Avoid conflict with system gestures like double-tap to zoom • Option 1: lock the viewport • Option 2: limit scaling
  • 17. CONFIDENTIAL • Sencha Inc. ©2015 3 ways to enable touch • ButtonCell • SliderCell, … Use a Widget • LongPressOrTapGR • DragGestureGR, … Use a Gesture Recognizer • LongPressEvent • DragGestureStartEvent Listen for an event
  • 18. CONFIDENTIAL • Sencha Inc. ©2015 1. Use a widget • Most widgets automatically respond to touch • Buttons fire SelectEvent • Expand / collapse works without delay • Editable cells respond to single or double tap based on setClicksToEdit() • etc. • If you’ve implemented onMouseClick/Up/Down • *may* also need to override onTap/onTouchStart/onTouchEnd • Many widgets expose new methods for touch • SliderCell example
  • 19. CONFIDENTIAL • Sencha Inc. ©2015 1. Use a Widget public SliderCell sliderCell = new SliderCell() { @Override protected void onTap(…) { super.onTap(t, context, parent, value, valueUpdater); } @Override protected void onTouchMove(…) { super.onTouchMove(t, context, parent, value, valueUpdater); } };
  • 20. CONFIDENTIAL • Sencha Inc. ©2015 2. Use a GestureRecognizer addCellGestureAdapter(new LongPressOrTapGestureRecognizer.CellLongPressOrTapGestureRecognizer<Contact>() { @Override protected void onLongPress(…) { Window.alert(“I’m feeling pressed.”); } });
  • 21. CONFIDENTIAL • Sencha Inc. ©2015 2. Use a GestureRecognizer • addGestureRecognizer(…) extend Component • addCellGestureAdapter(…)extend AbstractEventCell AbstractEventInputCell • new Adapter(Widget w, GR…) instantiate TouchEventToGestureAdapter
  • 22. CONFIDENTIAL • Sencha Inc. ©2015 2. Use a GestureRecognizer Where to call addGestureRecognizer(…) 1. Widget constructor (if all vars available) • Example: SliderCell, Tree, … 2. as soon as you can • Example: LiveGridView.onAfterRenderView()
  • 23. CONFIDENTIAL • Sencha Inc. ©2015 2. Use a GestureRecognizer • Example: in Tree constructor
  • 24. CONFIDENTIAL • Sencha Inc. ©2015 3. Listen for an event • Each GR defines events such as TapGestureEvent • By default, GR fires events to the Component, Cell, or Widget which registered it* • Listen using Widget.addHandler() * you can change this by calling GR.setDelegate() after registering
  • 25. CONFIDENTIAL • Sencha Inc. ©2015 Under the covers • Two pieces required for GestureRecognizers to work 1. must listen for the raw DOM events 2. forward events to the GestureRecognizer • We’ve wired this for you in Component and AbstractEventCell 1. addGestureRecognizer() sinks the events 2. onBrowserEvent() => recognizer.handle() • You only have to call addGestureRecognizer/Adapter()
  • 26. CONFIDENTIAL • Sencha Inc. ©2015 Understanding JS touch events • https://developer.mozilla.org/en-US/docs/Web/Events/touchstart • touches vs. changedTouches • gotcha: target property will always be the element where touch began • events bubble up through the DOM until stopped • to stop bubbling, call event.stopPropagation() • at the top level, the browser will handle in its default way • example: right click shows context menu • can prevent this using event.preventDefault()
  • 27. CONFIDENTIAL • Sencha Inc. ©2015 Eliminating the 300ms delay • If no touch handlers, mobile browser will fire synthetic mouse click AFTER 300ms • Your old code will work, but will feel sluggish • Best answer: implement touchEnd handlers • GXT 4 has mostly done this for you • Or you can do it in your custom widgets: • Use Widget.addDomHandler() or • onBrowserEvent switch / case • don’t forget to sink the event(s)
  • 28. CONFIDENTIAL • Sencha Inc. ©2015 Pro tips • KEEP MOUSE AND TOUCH PATHS SEPARATE • Why not onTouchEnd -> onMouseClick()? • Because your code might have this hiding in it: if (mouseDown) {...}
  • 29. CONFIDENTIAL • Sencha Inc. ©2015 Pro tips Avoid this: Do this instead: doSomething onMouseClick onTouchEnd
  • 30. CONFIDENTIAL • Sencha Inc. ©2015 Pro tips • Problem: mobile browsers don’t blur fields when you touch Submit • Solution: programmatically focus the Submit button when tapped protected void onTap(…) { … getInputElement(parent).focus(); }
  • 31. CONFIDENTIAL • Sencha Inc. ©2015 Pro tips • handle touchEnd rather than touchStart • otherwise, you might select things when you really wanted to scroll • in general, touchEnd is the better method to use in TapGR • onTouchStart() should also preventDefault() • otherwise, long press might show browser’s context menu as well as a tool tip • we solved this in GXT’s PanelTab
  • 32. CONFIDENTIAL • Sencha Inc. ©2015 other niceties in GXT 4.0 • property binding: gxt.device=tablet|desktop • can be used in CSS conditionals • also GXT.isTablet() • caveat: it’s pretty basic! • GestureRecognizers are independent of GXT widgets • can use with your own widgets • new TouchEventToGestureAdapter(Widget w, GestureRecognizer gr) • raw events flow through as normal
  • 34. CONFIDENTIAL • Sencha Inc. ©2015 Device emulation • alias chrome='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome --touch-events’ • emulate device • don’t auto-launch • start dev mode and wait for this: • Click the link or Cmd+Shift+R in browser
  • 35. CONFIDENTIAL • Sencha Inc. ©2015 reduce initial compile time Typical gwt.xml: With <collapse-all-properties /> * * not for prod. Size will increase 15-20% [INFO] Compiling 12 permutations [INFO] Compilation succeeded -- 144.760s [INFO] Compiling 1 permutation [INFO] Compilation succeeded -- 78.085s
  • 36. CONFIDENTIAL • Sencha Inc. ©2015 Chrome remote debugging • launch GWT with dev mode param –bindAddress 0.0.0.0 to connect via wifi • launch Chrome device • hit GWT URL • (AirDroid rocks!) • plug in your device USB • chrome://inspect
  • 37. CONFIDENTIAL • Sencha Inc. ©2015 Super Dev Mode Problem: SDM sometimes doesn’t automatically recompile on mobile Solution: 1. force save in IDEA (tab switch or Ctrl+S) 2. refresh browser
  • 39. CONFIDENTIAL • Sencha Inc. ©2015 GWT 3.0 is for Modern Browsers • GWT 2.8 will be a long-lived maintenance branch • GWT 3 is a complete rewrite of the compiler • Java to JS transpiler “only” • Superior JS Interoperability • New DOM implementation • No more Widget • No more GWT-RPC • No more permutations (use static factory methods instead)
  • 40. CONFIDENTIAL • Sencha Inc. ©2015 Sencha’s Plan • GXT 4 with GWT 2.7/2.8 will continue to support new browsers • Still very early – GWT 3 not expected till next year • Lot depends on JS Interoperability • Areas we’re looking hard at: • Touch Widgets • Responsive Design • Easier Theming 40
  • 41. Q & A Download GXT 4 Early Access https://www.sencha.com/blog/announcing-gxt-4-early-access/ Join Sencha GXT community on G+
  • 42. Bonus: working with touch events in MVP
  • 43. CONFIDENTIAL • Sencha Inc. ©2015 Touch events in MVP • Grid or ListView are typically members of a View class • but touch events happen in the Cell • how to invoke a Presenter method from a Cell? • via interface, just like View invokes Presenter Cell CellEventHandler View View.Delegate Presenter
  • 44. CONFIDENTIAL • Sencha Inc. ©2015 Define Handler interface in Cell
  • 45. CONFIDENTIAL • Sencha Inc. ©2015 Delegate to Handler
  • 46. CONFIDENTIAL • Sencha Inc. ©2015 Let View implement Handler