Optimizing your current Ext JS applications for touch and tablets
While there are so many reasons to upgrade your existing Ext JS 4 apps to Ext JS 5, by far, the most exciting is the ability to add support for gestures and events that make your existing app touch-friendly without needing to do a complete rewrite.
Copyright Sencha Inc. 2014 6 Ext JS 4 applications on mobile Grid rows are too small No white space No chart interaction Doesn't perform well Designed for mouse/keyboard
Copyright Sencha Inc. 2014 8 Why Ext JS 5? When you want to create a large (web) application, that works on desktops and on touch devices. When you have a working Ext JS 4 application, Ext JS 5 is the best way to optimise for mobile experiences such as tablets. Why do you want to use Ext JS 5?
Copyright Sencha Inc. 2014 9 Differences with Sencha Touch EXT JS 5 • Apps that need to display lots of data • Apps that have mouse/keyboard support • Support IE8 & 9 • Ext JS components ( grids, trees..) Differences with Sencha Touch Sencha Touch • Support for phones • Device specific themes • Platform/Theme switcher • Offline support • Touch components (action sheets, navigation view…)
Copyright Sencha Inc. 2014 14 Performance Reduces the number of interactions with the DOM that can, especially on older browsers, be quite expensive. Performance
Copyright Sencha Inc. 2014 20 Switch themes /** * The name of the theme for this application. */ "theme": "ext-theme-neptune-touch", app.json To switch a theme, you will have to edit the app.json file.
Copyright Sencha Inc. 2014 27 Traditional Responsive Design /*Default styles*/ .related-products li { float: left; width: 50%; } /*Display 3 per row for medium displays (like mobile phones in landscape or smaller tablets)*/ @media screen and (min-width: 28.75em) { .related-products li { width: 33.3333333%; } } /*Display 6 to a row for large displays (like medium tablets and up) */ @media screen and min-width: 40.5em) { .related-products li { width: 16.6666667%; } stylesheet
Copyright Sencha Inc. 2014 31 Criteria 31 ★ landscape - True if the device orientation is landscape (always true on desktop devices). ★ portrait - True if the device orientation is portrait (always false on desktop devices). ★ tall - True if width < height regardless of device type. ★ wide - True if width > height regardless of device type. ★ width - The width of the viewport ★ height - The height of the viewport. ★ platform - An object containing various booleans describing the platform.
Copyright Sencha Inc. 2014 33 Best practices 33 ★ Inspect your content ★ Design in your browser (no need for PhotoShop) ★ Start with designing the small interface ★ Test & Optimise
Copyright Sencha Inc. 2014 34 New in Ext JS 5.1 > Profiles 34 Ext.application({ name: 'Mail', profiles: ['Desktop', 'Tablet'] }); app.js App profiles are executed at load time. Not limited to config settings Profiles
Copyright Sencha Inc. 2014 39 Run Within Your Network 39 # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 80 Listen 127.0.0.1:80 httpd.conf