Community Code: Jarvus Innovations
-
Upload
sencha -
Category
Technology
-
view
112 -
download
0
description
Transcript of Community Code: Jarvus Innovations
Wednesday, November 2, 2011
Chris Alfano & Ryon Coleman@themightychris @ryon55
jARV.US SPOTLIGHT
Wednesday, November 2, 2011
Overview
Wednesday, November 2, 2011
Overview
SENCHA TOUCH
Eagles Draft 2011
Consumer Reports
Christie’s
EXTJS 4
Jarv.us
DynamicWear
GoLive.TV
Wednesday, November 2, 2011
Philadelphia Eagles Draft 2011
Wednesday, November 2, 2011
Insta-style<!DOCTYPE html><html lang="en"><head>! <style>body{background-color:#033}</style>! <link rel="stylesheet" href="css/eagles-init.css+eagles-sencha.css+eagles-fonts.css+eagles-overrides.css" type="text/css">! <!-- ... --></head><body></body></html>
Wednesday, November 2, 2011
Stretchy backgrounds
body {! background: url(../img/backgroundLogo.jpg) no-repeat center center #033;! -webkit-background-size: cover;}
/* OR */
.storeCard {! background: url(../img/storeCard.jpg) no-repeat center top;! -webkit-background-size: contain;}
Wednesday, November 2, 2011
On-the-fly CSS & JS minifier<link rel="stylesheet" type="text/css" href="css/eagles-init.css+eagles-sencha.css+eagles-fonts.css+eagles-overrides.css" />
<link rel="stylesheet" href="css/eagles2x.css" media="only screen and (-webkit-min-device-pixel-ratio: 1.5)" />
<script type="text/javascript" src="js/sencha-touch.js+app.js+views/*+models/TwitterProxy.js+models/*"></script>
Wednesday, November 2, 2011
<link rel="stylesheet" href="css/eagles-init.css?debug=1" type="text/css"><link rel="stylesheet" href="css/eagles-sencha.css?debug=1" type="text/css"><link rel="stylesheet" href="css/eagles-fonts.css?debug=1" type="text/css"><link rel="stylesheet" href="css/eagles-overrides.css?debug=1" type="text/css">
<link rel="stylesheet" href="css/eagles2x.css" media="only screen and (-webkit-min-device-pixel-ratio: 1.5)" />
<script type="text/javascript" src="js/sencha-touch.js?debug=1"></script><script type="text/javascript" src="js/app.js?debug=1"></script><script type="text/javascript" src="js/views/AppViewport.js?debug=1"></script><script type="text/javascript" src="js/views/ArticleCard.js?debug=1"></script><script type="text/javascript" src="js/views/DraftCard.js?debug=1"></script><script type="text/javascript" src="js/views/LandingCard.js?
Wednesday, November 2, 2011
,startAutoRefresh: function() {! this.autoRefreshInterval = setInterval(! ! Ext.createDelegate(this.picksStore.load, this.picksStore)! ! ,this.autoRefreshSeconds * 1000! );}
,onPicksLoaded: function(store, records, success){!!! if(this.isVisible() && this.liveDraft.isVisible())! ! this.seenPicks = records.length;! else! ! this.updateUnseen(records.length);}
,onDraftCardActivated: function() {! this.markSeen();} ,markSeen: function() {! this.seenPicks = this.picksStore.getCount();! this.updateUnseen(this.seenPicks);}
Wednesday, November 2, 2011
Challenges
Lessons Learned
Wednesday, November 2, 2011
ChallengesLearn Sencha Touch and SASS theming :)
Lessons Learned
Wednesday, November 2, 2011
ChallengesLearn Sencha Touch and SASS theming :)Get and display live updates
Lessons Learned
Wednesday, November 2, 2011
ChallengesLearn Sencha Touch and SASS theming :)Get and display live updatesAdapt static images to different screen ratios
Lessons Learned
Wednesday, November 2, 2011
ChallengesLearn Sencha Touch and SASS theming :)Get and display live updatesAdapt static images to different screen ratios
Lessons LearnedDestroy DOM when you’re done with it
Wednesday, November 2, 2011
ChallengesLearn Sencha Touch and SASS theming :)Get and display live updatesAdapt static images to different screen ratios
Lessons LearnedDestroy DOM when you’re done with itEstablish clear parameters for post-launch content
Wednesday, November 2, 2011
ChallengesLearn Sencha Touch and SASS theming :)Get and display live updatesAdapt static images to different screen ratios
Lessons LearnedDestroy DOM when you’re done with itEstablish clear parameters for post-launch content-webkit-background-size
Wednesday, November 2, 2011
Wednesday, November 2, 2011
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);}
Wednesday, November 2, 2011
StackPanel viewportCR.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
Wednesday, November 2, 2011
DOM destructionthis.on('beforeactivate', function() {! this.setLoading(true);!}, this, {delay: 10});
this.on('activate', function() {! if(this.loaded) {! ! this.setLoading(false);! ! this.list.refresh(); // redraw existing store contents! } else {! ! this.list.store.load({! ! ! scope: this! ! ! ,callback: function() {! ! ! ! this.setLoading(false);! ! ! }! ! });! }}, this);
this.on('beforedeactivate', function() {! this.list.update('');}, this);
Wednesday, November 2, 2011
.x-list-item {! .product {! ! -webkit-box-align: stretch;! ! -webkit-box-orient: horizontal;! ! display: -webkit-box;! ! overflow: hidden;! !! ! & > div { -webkit-transition: -webkit-transform 250ms; }!! ! .delete-button-ct {! ! ! -webkit-box-align: center;! ! ! display: -webkit-box;! ! ! margin-right: -85px;! ! ! width: 85px;! ! !! ! ! .x-button { -webkit-box-flex: 1; }! ! }! }!! &.confirm-delete .product > * { -webkit-transform: translate3d(-85px, 0, 0) }}
Wednesday, November 2, 2011
Challenges
Lessons Learned
Wednesday, November 2, 2011
ChallengesAccess native APIs for barcode scanner
Lessons Learned
Wednesday, November 2, 2011
ChallengesAccess native APIs for barcode scannerLocked grid for comparison view
Lessons Learned
Wednesday, November 2, 2011
ChallengesAccess native APIs for barcode scannerLocked grid for comparison viewComplex history tracking
Lessons Learned
Wednesday, November 2, 2011
ChallengesAccess native APIs for barcode scannerLocked grid for comparison viewComplex history trackingAggregation of disparate data sources in a single view
Lessons Learned
Wednesday, November 2, 2011
ChallengesAccess native APIs for barcode scannerLocked grid for comparison viewComplex history trackingAggregation of disparate data sources in a single viewAnimated swipe-to-delete
Lessons Learned
Wednesday, November 2, 2011
ChallengesAccess native APIs for barcode scannerLocked grid for comparison viewComplex history trackingAggregation of disparate data sources in a single viewAnimated swipe-to-delete
Lessons LearnedDon’t use tabpanel
Wednesday, November 2, 2011
ChallengesAccess native APIs for barcode scannerLocked grid for comparison viewComplex history trackingAggregation of disparate data sources in a single viewAnimated swipe-to-delete
Lessons LearnedDon’t use tabpanelWrap card layout for history
Wednesday, November 2, 2011
ChallengesAccess native APIs for barcode scannerLocked grid for comparison viewComplex history trackingAggregation of disparate data sources in a single viewAnimated swipe-to-delete
Lessons LearnedDon’t use tabpanelWrap card layout for history-webkit-box and -webkit-transform3d
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Make it pop!@mixin background-gradient($bg-color, $type: $base-gradient) {... } @else if $type == 'supergloss' { @include background-image( linear-gradient(color_stops( lighten($bg-color, 40%), lighten($bg-color, 15%) 50%, $bg-color 51%, lighten($bg-color, 5%) )) ); }...
@include sencha-button-ui('action', darken($christies-red, 10%), 'supergloss');
Wednesday, November 2, 2011
Challenges
Lessons Learned
Wednesday, November 2, 2011
ChallengesRandom access thumbnail gallery
Lessons Learned
Wednesday, November 2, 2011
ChallengesRandom access thumbnail galleryThird-party SOAP backend
Lessons Learned
Wednesday, November 2, 2011
ChallengesRandom access thumbnail galleryThird-party SOAP backendCustom gradient types
Lessons Learned
Wednesday, November 2, 2011
ChallengesRandom access thumbnail galleryThird-party SOAP backendCustom gradient typesForm styling
Lessons Learned
Wednesday, November 2, 2011
ChallengesRandom access thumbnail galleryThird-party SOAP backendCustom gradient typesForm stylingZoomable image carousel
Lessons Learned
Wednesday, November 2, 2011
ChallengesRandom access thumbnail galleryThird-party SOAP backendCustom gradient typesForm stylingZoomable image carousel(https://github.com/JarvusInnovations/Jarvus.mobile.PinchCarousel)
Lessons Learned
Wednesday, November 2, 2011
ChallengesRandom access thumbnail galleryThird-party SOAP backendCustom gradient typesForm stylingZoomable image carousel(https://github.com/JarvusInnovations/Jarvus.mobile.PinchCarousel)
Lessons LearnedDefer loading data until after screen is rendered
Wednesday, November 2, 2011
ChallengesRandom access thumbnail galleryThird-party SOAP backendCustom gradient typesForm stylingZoomable image carousel(https://github.com/JarvusInnovations/Jarvus.mobile.PinchCarousel)
Lessons LearnedDefer loading data until after screen is renderedOverride mixins
Wednesday, November 2, 2011
ChallengesRandom access thumbnail galleryThird-party SOAP backendCustom gradient typesForm stylingZoomable image carousel(https://github.com/JarvusInnovations/Jarvus.mobile.PinchCarousel)
Lessons LearnedDefer loading data until after screen is renderedOverride mixinsReusable list tpls and box layout
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Challenges
Lessons Learned
Wednesday, November 2, 2011
ChallengesPerformance on a HEAVY page full of images
Lessons Learned
Wednesday, November 2, 2011
ChallengesPerformance on a HEAVY page full of imagesMake an animated dataview appear & init quickly
Lessons Learned
Wednesday, November 2, 2011
ChallengesPerformance on a HEAVY page full of imagesMake an animated dataview appear & init quickly
Lessons LearnedStack JS builds to minimize load times, avoid dupes
Wednesday, November 2, 2011
ChallengesPerformance on a HEAVY page full of imagesMake an animated dataview appear & init quickly
Lessons LearnedStack JS builds to minimize load times, avoid dupes“Stunt double” hack
Wednesday, November 2, 2011
ChallengesPerformance on a HEAVY page full of imagesMake an animated dataview appear & init quickly
Lessons LearnedStack JS builds to minimize load times, avoid dupes“Stunt double” hackLazy loading via data- attributes
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Challenges
Lessons Learned
Wednesday, November 2, 2011
ChallengesRealtime node.js integration
Lessons Learned
Wednesday, November 2, 2011
ChallengesRealtime node.js integrationMake page render immediately, then update with latest info
Lessons Learned
Wednesday, November 2, 2011
ChallengesRealtime node.js integrationMake page render immediately, then update with latest info
Lessons LearnedSocket.IO is fun!
Wednesday, November 2, 2011
ChallengesRealtime node.js integrationMake page render immediately, then update with latest info
Lessons LearnedSocket.IO is fun!Old-school progressive enhancement = good practice
Wednesday, November 2, 2011
Wednesday, November 2, 2011
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); }}
Wednesday, November 2, 2011
Toolset & Workflow
Wednesday, November 2, 2011
Toolset & WorkflowEmergence framework
TotalTerminal
Dropbox
Coda
Wednesday, November 2, 2011
DOs and DON’Ts
Wednesday, November 2, 2011
Wrangling DependenciesDO DON’T
Wednesday, November 2, 2011
Wrangling Dependencies
Define requirements as close to their use as possible
DO DON’T
Wednesday, November 2, 2011
Wrangling Dependencies
Define requirements as close to their use as possible
Use Ext.create for all object instantiation
DO DON’T
Wednesday, November 2, 2011
Wrangling Dependencies
Define requirements as close to their use as possible
Use Ext.create for all object instantiation
DO DON’T
Define requirements as close to their use as possible
Wednesday, November 2, 2011
Wrangling Dependencies
Define requirements as close to their use as possible
Use Ext.create for all object instantiation
DO DON’T
Define requirements as close to their use as possible
Use Ext.create for all object instantiation
Wednesday, November 2, 2011
Custom BuildsDO DO!
Wednesday, November 2, 2011
Custom Builds
Load your whole site on ext-core.js (sans manifest) for the
auto-build script
DO DO!
Wednesday, November 2, 2011
Custom Builds
Load your whole site on ext-core.js (sans manifest) for the
auto-build script
Separate your classes from Ext classes into different builds
DO DO!
Wednesday, November 2, 2011
Custom Builds
Load your whole site on ext-core.js (sans manifest) for the
auto-build script
Separate your classes from Ext classes into different builds
DO DO!
Create builds on top of ext.js at milestones to reduce load
times
Wednesday, November 2, 2011
Custom Builds
Load your whole site on ext-core.js (sans manifest) for the
auto-build script
Separate your classes from Ext classes into different builds
DO DO!
Create builds on top of ext.js at milestones to reduce load
times
Mix compiled and static loading during development
for quick iteratoin
Wednesday, November 2, 2011
Page LoadingDO DON’T
Wednesday, November 2, 2011
Page Loading
Create a minimal CSS file to load first—show that
something is happening
DO DON’T
Wednesday, November 2, 2011
Page Loading
Create a minimal CSS file to load first—show that
something is happening
Load modernizr and any font loaders in the <head>
DO DON’T
Wednesday, November 2, 2011
Page Loading
Create a minimal CSS file to load first—show that
something is happening
Load modernizr and any font loaders in the <head>
DO DON’T
Load all of your JavaScript in the <head>
Wednesday, November 2, 2011
Working with SASSDO DON’T
Wednesday, November 2, 2011
Working with SASS
Explore Ext’s default .scss files
DO DON’T
Wednesday, November 2, 2011
Working with SASS
Explore Ext’s default .scss files
Enjoy mixins, variables, color functions, nesting
DO DON’T
Wednesday, November 2, 2011
Working with SASS
Explore Ext’s default .scss files
Enjoy mixins, variables, color functions, nesting
Be OCD about indentation!
DO DON’T
Wednesday, November 2, 2011
Working with SASS
Explore Ext’s default .scss files
Enjoy mixins, variables, color functions, nesting
Be OCD about indentation!
Use Compass for CSS3 and tricky techniques
DO DON’T
Wednesday, November 2, 2011
Working with SASS
Explore Ext’s default .scss files
Enjoy mixins, variables, color functions, nesting
Be OCD about indentation!
Use Compass for CSS3 and tricky techniques
DO DON’T
Go too crazy with nesting
Wednesday, November 2, 2011
Working with SASS
Explore Ext’s default .scss files
Enjoy mixins, variables, color functions, nesting
Be OCD about indentation!
Use Compass for CSS3 and tricky techniques
DO DON’T
Go too crazy with nesting
Battle defaults; instead work with the variables provided
Wednesday, November 2, 2011
Working with SASS
Explore Ext’s default .scss files
Enjoy mixins, variables, color functions, nesting
Be OCD about indentation!
Use Compass for CSS3 and tricky techniques
DO DON’T
Go too crazy with nesting
Battle defaults; instead work with the variables provided
Overdo it with ‘ui’ configs when regular classes will do
Wednesday, November 2, 2011
Working with SASS
Explore Ext’s default .scss files
Enjoy mixins, variables, color functions, nesting
Be OCD about indentation!
Use Compass for CSS3 and tricky techniques
DO DON’T
Go too crazy with nesting
Battle defaults; instead work with the variables provided
Overdo it with ‘ui’ configs when regular classes will do
Be afraid to line-by-line it
Wednesday, November 2, 2011
Chris Alfano & Ryon Coleman@themightychris @ryon55
tHANK YOU!
Wednesday, November 2, 2011