The document provides an overview and code snippets for an Eagles 2011 NFL Draft mobile app created with Sencha Touch. It discusses challenges faced like learning Sencha Touch, displaying live updates, and adapting images for different screen sizes. Lessons learned include destroying DOM elements when done, establishing post-launch content parameters, and using background-size for images. The document also discusses tooling, dependencies, and best practices for mobile development.
14. Challenges
Learn Sencha Touch and SASS theming :)
Get and display live updates
Adapt static images to different screen ratios
Lessons Learned
15. Challenges
Learn Sencha Touch and SASS theming :)
Get and display live updates
Adapt static images to different screen ratios
Lessons Learned
Destroy DOM when you’re done with it
16. Challenges
Learn Sencha Touch and SASS theming :)
Get and display live updates
Adapt static images to different screen ratios
Lessons Learned
Destroy DOM when you’re done with it
Establish clear parameters for post-launch content
17. Challenges
Learn Sencha Touch and SASS theming :)
Get and display live updates
Adapt static images to different screen ratios
Lessons Learned
Destroy DOM when you’re done with it
Establish clear parameters for post-launch content
-webkit-background-size
18.
19. Barcode scanning
,onScanPress: function() {
if(window.device) {
window.plugins.barcodeScanner.scan(
Ext.createDelegate(this.onBarcodeSuccess, this)
,Ext.createDelegate(this.onBarcodeFailure, this)
);
} else {
alert('barcode scanning is currently only available in native builds');
}
}
,onBarcodeSuccess: function(upc) {
CR.views.viewport.executeBarcodeSearch(upc);
}
20. StackPanel viewport
CR.views.viewport.loadCard({
xtype: 'aboutpanel'
,prevCard: this
},{
// optional animation controls
animate: 'slide'
,direction: 'left'
,reverse: false
,cover: false
,reveal: false
// optional stack management
,clearStack: false // true to erase history stack
,clearAfter: false // pass a panel instance to clear any forward history
});
https://github.com/JarvusInnovations/Jarvus.mobile.StackPanel
26. Challenges
Access native APIs for barcode scanner
Locked grid for comparison view
Complex history tracking
Lessons Learned
27. Challenges
Access native APIs for barcode scanner
Locked grid for comparison view
Complex history tracking
Aggregation of disparate data sources in a single view
Lessons Learned
28. Challenges
Access native APIs for barcode scanner
Locked grid for comparison view
Complex history tracking
Aggregation of disparate data sources in a single view
Animated swipe-to-delete
Lessons Learned
29. Challenges
Access native APIs for barcode scanner
Locked grid for comparison view
Complex history tracking
Aggregation of disparate data sources in a single view
Animated swipe-to-delete
Lessons Learned
Don’t use tabpanel
30. Challenges
Access native APIs for barcode scanner
Locked grid for comparison view
Complex history tracking
Aggregation of disparate data sources in a single view
Animated swipe-to-delete
Lessons Learned
Don’t use tabpanel
Wrap card layout for history
31. Challenges
Access native APIs for barcode scanner
Locked grid for comparison view
Complex history tracking
Aggregation of disparate data sources in a single view
Animated swipe-to-delete
Lessons Learned
Don’t use tabpanel
Wrap card layout for history
-webkit-box and -webkit-transform3d
39. Challenges
Random access thumbnail gallery
Third-party SOAP backend
Custom gradient types
Form styling
Zoomable image carousel
Lessons Learned
40. Challenges
Random access thumbnail gallery
Third-party SOAP backend
Custom gradient types
Form styling
Zoomable image carousel
(https://github.com/JarvusInnovations/Jarvus.mobile.PinchCarousel)
Lessons Learned
41. Challenges
Random access thumbnail gallery
Third-party SOAP backend
Custom gradient types
Form styling
Zoomable image carousel
(https://github.com/JarvusInnovations/Jarvus.mobile.PinchCarousel)
Lessons Learned
Defer loading data until after screen is rendered
42. Challenges
Random access thumbnail gallery
Third-party SOAP backend
Custom gradient types
Form styling
Zoomable image carousel
(https://github.com/JarvusInnovations/Jarvus.mobile.PinchCarousel)
Lessons Learned
Defer loading data until after screen is rendered
Override mixins
43. Challenges
Random access thumbnail gallery
Third-party SOAP backend
Custom gradient types
Form styling
Zoomable image carousel
(https://github.com/JarvusInnovations/Jarvus.mobile.PinchCarousel)
Lessons Learned
Defer loading data until after screen is rendered
Override mixins
Reusable list tpls and box layout
47. Challenges
Performance on a HEAVY page full of images
Make an animated dataview appear & init quickly
Lessons Learned
48. Challenges
Performance on a HEAVY page full of images
Make an animated dataview appear & init quickly
Lessons Learned
Stack JS builds to minimize load times, avoid dupes
49. Challenges
Performance on a HEAVY page full of images
Make an animated dataview appear & init quickly
Lessons Learned
Stack JS builds to minimize load times, avoid dupes
“Stunt double” hack
50. Challenges
Performance on a HEAVY page full of images
Make an animated dataview appear & init quickly
Lessons Learned
Stack JS builds to minimize load times, avoid dupes
“Stunt double” hack
Lazy loading via data- attributes
56. Challenges
Realtime node.js integration
Make page render immediately, then update with latest info
Lessons Learned
Socket.IO is fun!
Old-school progressive enhancement = good practice
57.
58. Use iconCls for buttons
.x-btn-icon {
background-position: center center;
background-repeat: no-repeat;
&.shirts
{
background-image: url(/img/icons/nav/shirts.png); }
&.orders
{
background-image: url(/img/icons/nav/orders.png); }
&.settings
{
background-image: url(/img/icons/nav/settings.png); }
}
64. Wrangling Dependencies
DO DON’T
Define requirements as close
to their use as possible
Use Ext.create for all object
instantiation
65. Wrangling Dependencies
DO DON’T
Define requirements as close Define requirements as close
to their use as possible to their use as possible
Use Ext.create for all object
instantiation
66. Wrangling Dependencies
DO DON’T
Define requirements as close Define requirements as close
to their use as possible to their use as possible
Use Ext.create for all object Use Ext.create for all object
instantiation instantiation
68. Custom Builds
DO DO!
Load your whole site on ext-
core.js (sans manifest) for the
auto-build script
69. Custom Builds
DO DO!
Load your whole site on ext-
core.js (sans manifest) for the
auto-build script
Separate your classes from Ext
classes into different builds
70. Custom Builds
DO DO!
Load your whole site on ext- Create builds on top of ext.js
core.js (sans manifest) for the at milestones to reduce load
auto-build script times
Separate your classes from Ext
classes into different builds
71. Custom Builds
DO DO!
Load your whole site on ext- Create builds on top of ext.js
core.js (sans manifest) for the at milestones to reduce load
auto-build script times
Separate your classes from Ext Mix compiled and static
classes into different builds loading during development
for quick iteratoin
73. Page Loading
DO DON’T
Create a minimal CSS file to
load first—show that
something is happening
74. Page Loading
DO DON’T
Create a minimal CSS file to
load first—show that
something is happening
Load modernizr and any font
loaders in the <head>
75. Page Loading
DO DON’T
Create a minimal CSS file to Load all of your JavaScript in
load first—show that the <head>
something is happening
Load modernizr and any font
loaders in the <head>
78. Working with SASS
DO DON’T
Explore Ext’s default .scss files
Enjoy mixins, variables, color
functions, nesting
79. Working with SASS
DO DON’T
Explore Ext’s default .scss files
Enjoy mixins, variables, color
functions, nesting
Be OCD about indentation!
80. Working with SASS
DO DON’T
Explore Ext’s default .scss files
Enjoy mixins, variables, color
functions, nesting
Be OCD about indentation!
Use Compass for CSS3 and
tricky techniques
81. Working with SASS
DO DON’T
Explore Ext’s default .scss files Go too crazy with nesting
Enjoy mixins, variables, color
functions, nesting
Be OCD about indentation!
Use Compass for CSS3 and
tricky techniques
82. Working with SASS
DO DON’T
Explore Ext’s default .scss files Go too crazy with nesting
Enjoy mixins, variables, color Battle defaults; instead work
functions, nesting with the variables provided
Be OCD about indentation!
Use Compass for CSS3 and
tricky techniques
83. Working with SASS
DO DON’T
Explore Ext’s default .scss files Go too crazy with nesting
Enjoy mixins, variables, color Battle defaults; instead work
functions, nesting with the variables provided
Be OCD about indentation! Overdo it with ‘ui’ configs
when regular classes will do
Use Compass for CSS3 and
tricky techniques
84. Working with SASS
DO DON’T
Explore Ext’s default .scss files Go too crazy with nesting
Enjoy mixins, variables, color Battle defaults; instead work
functions, nesting with the variables provided
Be OCD about indentation! Overdo it with ‘ui’ configs
when regular classes will do
Use Compass for CSS3 and
tricky techniques Be afraid to line-by-line it