SlideShare uma empresa Scribd logo
1 de 77
Baixar para ler offline
10 dicas de desempenho para 
apps mobile híbridas 
Loiane Groner 
http://loiane.com
Me, Myself && I 
! 
•Gerente de Desenv Projetos 
•8+ XP TI 
•Java, Sencha, Phonegap 
•http://loiane.com 
•@loiane
packpub.com 
amazon.com.br 
livrariacultura.com.br
Learning JavaScript 
Data Structures and 
Algorithms 
! 
Out/Nov 2014 
Ext JS 5 Avançado 
! 
Fev 2015
Nov 2013 
http://upgrade.ins-us.com/
I
#1
<div data-role="page" id="tracks">! 
! <div data-role="header"><h1>Tracks</h1></div>! 
! <ul data-role="listview">! 
! <li><a href="getTrackInfo.php?id=1">Desempenho e Escalabilidade na Prática</a></li>! 
! <li><a href="getTrackInfo.php?id=2">Java na Crista da Onda</a></li>! 
! <li><a href="getTrackInfo.php?id=3">Arquiteturas que Você Sempre Quis Conhecer</a></li>! 
! <li><a href="getTrackInfo.php?id=4">Mobile: Portáteis e Furiosos</a></li>! 
! </ul>! 
</div>!
NÃO gere páginas 
no servidor
Web Browser 
Dispositivo 
Web Server 
Java/PHP/ 
Ruby/C# 
Arquivos 
Imagens/ 
Documentos 
Banco de 
Dados 
Backend 
http:// 
Lógica de negócio 
JavaScript 
Arquivos 
Imagens/ 
Documentos 
Banco de 
Dados 
caching
JSON
#2
// Obtém dados! 
$.ajax({url: "getTrackInfo.php?id=1"}).done(function(track) {! 
// Mostra os detalhes - view! 
$.mobile.changePage($('#track-info'));! 
});!
//mostra View! 
$.mobile.changePage($('#track-info'));! 
! 
//------------------------------------------------------------------------! 
! 
$(document).bind("pagechange", onPageChange);! 
! 
function onPageChange(event, data) {! 
! var toPageId = data.toPage.attr("id");! 
! 
! switch (toPageId) {! 
case 'track-info':! 
! 
! clearValues();! 
! 
! // Obtém dados! 
! ! ! $.ajax({url: "getTrackInfo.php?id=1"}).done(function(track) {! 
! ! ! // Atualiza os detalhes - view! 
! ! ! $('#trackNome h1').html(track.name);! 
! ! ! ! $('#trackDesc').val(track.desc);! 
! ! ! ! $('#trackDia').val(track.dia);! 
! ! ! ! $('#trackLocal').val(track.local);! 
! ! ! ! $('#trackHost').val(track.host);! 
! ! ! });! 
! ! 
! break;! 
}! 
} !
Ext.define('MyContacts.store.Contacts', {! 
extend: 'Ext.data.Store',! 
! 
requires: [! 
'MyContacts.model.Contact',! 
'MyContacts.proxy.ContactsProxy'! 
],! 
! 
config: {! 
autoLoad: true,! 
model: 'MyContacts.model.Contact',! 
storeId: 'Contacts',! 
proxy: {! 
type: 'contactstorage'! 
}! 
}! 
});!
control: {! 
"contactslist": {! 
show: 'onListItemPainted'! 
}! 
}! 
! 
//-------------------------------------! 
! 
onListItemPainted: function(view, options) { ! 
view.getStore().load();! 
}!
Show 
me the 
VIEW!
Mostre a view e 
depois carregue os 
dados
#3
Ext.define('MyContacts.view.ContactsPanel', {! 
extend: 'Ext.Container',! 
alias: 'widget.contactspanel',! 
! 
requires: [! 
'MyContacts.view.ContactsList',! 
'MyContacts.view.ContactInfo',! 
'MyContacts.view.ContactEdit'! 
],! 
! 
config: {! 
layout: {! 
type: 'card'! 
},! 
items: [! 
{! 
xtype: 'contactslist'! 
},! 
{! 
xtype: 'contactinfo'! 
},! 
{! 
xtype: 'contactedit'! 
}! 
]! 
}! 
! 
});!
#4
App com lista dos participantes do FrontInBahia 
select count(*) from Participantes 
== 1000 
É muito dado?
Paging / Paginação 
https://github.com/stakbit/jQuery-Mobile-Listview-Pagination-Plugin 
http://dcarrith.github.io/jquery.mobile.lazyloader/
$.ajax({url: "listaEstadosBr.php"}).done(function(data) {! 
estadosBr = data;! 
});!
Dados Estáticos 
LocalStorage 
SQLite - database 
Arquivo - JSON
// do a SERVER load, passing a callback function! 
offlineSyncStore.loadServer(function(){! 
! 
// create a new Person record! 
var person = Ext.create('Person', {! 
FirstName: 'Joe',! 
LastName: 'Bloggs',! 
Email: 'joe@swarmonline.com'! 
});! 
! 
// add it to the store! 
offlineSyncStore.add(person);! 
! 
// sync the store LOCALLY. If autoServerSync is set to true then this will also sync using SERVER 
proxy! 
offlineSyncStore.sync();! 
! 
// if autoServerSync is false then call SERVER sync manually! 
offlineSyncStore.syncServer();! 
! 
});! 
https://market.sencha.com/extensions/ext-ux-offlinesyncstore
Faça cache dos 
dados
#5
var timeTouch;! 
! 
$("body").on("touchend", ".needsclick", function() {! 
timeTouch = new Date().getTime();! 
});! 
! 
$("body").on("click", ".needsclick", function() {! 
if (timeTouch) {! 
$("#log-slow").html("click: " + (new Date().getTime() - timeTouch) + "ms");! 
}! 
return false;! 
});!
Evite CLICK 
use TOUCHEND
Fastclick 
https://github.com/ftlabs/fastclick
$("body").on("touchend", ".fastclick", function() {! 
timeTouch = new Date().getTime();! 
});! 
! 
$("body").on("click", ".fastclick", function() {! 
if (timeTouch) {! 
$("#log-fast").html("touchend: " + (new Date().getTime() - timeTouch) + "ms");! 
} else {! 
alert("Execute esse exemplo em um device touch");! 
}! 
return false;! 
});!
#6
$("#page").animate();!
.page {! 
position: absolute;! 
width: 200px;! 
height:200px;! 
top:20px;! 
left:50;! 
}! 
! 
.page-left {! 
left: 50px;! 
}! 
.page-center {! 
left: 275px;! 
}! 
.page-right {! 
left: 500px;! 
}! 
! 
.transition {! 
transition-duration: .25s;! 
}!
Use CSS 3 
Transitions + 
Hardware 
Acceleration
.page {! 
position: absolute;! 
width: 200px;! 
height:200px;! 
top:20px;! 
left:50;! 
transform: translate3d(0,0,0);! 
}! 
! 
.page-left {! 
-webkit-transform: translate3d(30px, 0, 0);! 
transform: translate3d(31px, 0, 0);! 
}! 
.page-center {! 
-webkit-transform: translate3d(250px, 0, 0);! 
transform: translate3d(251px, 0, 0);! 
}! 
.page-right {! 
-webkit-transform: translate3d(470px, 0, 0);! 
transform: translate3d(471px, 0, 0);! 
}! 
! 
.transition {! 
-webkit-transition-duration: .25s;! 
transition-duration: .25s;! 
}!
Page Slider 
https://github.com/ccoenraets/PageSlider
#7
• box-shadow 
• border-radius 
• gradients 
• text-align
Evite sombras e 
gradientes
#8
$("#contato-info a.back").on("touchend", clickHandler);! 
$("#contato-info a.back").attr("href", "#contato-info");! 
$("#contato-info a.back").css("color", "green");! 
$("#contato-info a.back").css("text-decoration", "none");!
Ext.ComponentQuery.query('contactinfo button#back')[0].on('tap', clickHandler);! 
Ext.ComponentQuery.query('contactinfo button#back')[0].setCls('backBtn');! 
Ext.ComponentQuery.query('contactinfo button#back')[0].setLabelCls('labelCls');!
var $backBtn = $('#contato-info a.back');! 
$backBtn.on("touchend", clickHandler);! 
$backBtn.attr("href", "#contato-info");! 
$backBtn.css("color", "green");! 
$backBtn.css("text-decoration", "none");!
var backBtn = Ext.ComponentQuery.query('contactinfo button#back')[0];! 
backBtn.on('tap', clickHandler);! 
backBtn.setCls('backBtn');! 
backBtn.setLabelCls('labelCls');!
Minimize Browser 
Reflows
#9
XUI
x$(document).on("deviceready", function () {! 
! 
headingDiv = x$("#heading");! 
navigator.compass.getCurrentHeading(onSuccess, onError);! 
navigator.compass.watchHeading(onSuccess, onError, {frequency: 100});! 
! 
function onSuccess(heading) {! 
headingDiv.html(! 
'Heading: ' + heading.magneticHeading + '&#xb0; ' +! 
convertToText(heading.magneticHeading) + '<br />' +! 
'True Heading: ' + heading.trueHeading + '<br />' +! 
'Accuracy: ' + heading.headingAccuracy! 
);! 
! 
// Alter the CSS properties to rotate the rose image! 
x$(".rose").css({! 
"-webkit-transform":! 
"rotate(-" + heading.magneticHeading + "deg)",! 
"transform":! 
"rotate(-" + heading.magneticHeading + "deg)"! 
});! 
}! 
! 
function onError() {! 
headingDiv.html(! 
'There was an error trying to ' +! 
'locate your current bearing.'! 
);! 
}! 
});!
Topcoat
Cuidado com 
framework / lib da 
moda
#10
.icon-user {! 
background-image: url(../images/user.png) !important;! 
}! 
! 
.icon-user-add {! 
background-image: url(../images/user_add.gif) !important;! 
}! 
! 
.icon-save {! 
background-image: url(../images/save.gif) !important;! 
}! 
! 
.icon-reset {! 
background-image: url(../images/stop.png) !important;! 
}! 
! 
.icon-grid {! 
background-image: url(../images/grid.png) !important;! 
}! 
! 
.icon-add {! 
background-image: url(../images/add.png) !important;! 
}! 
! 
.icon-delete {! 
background-image: url(../images/delete.png) !important;! 
}!
.icon {! 
! background-image:url(result.png);! 
}! 
! 
.icon-user {! 
background-position: 0px -156px;! 
}! 
! 
.icon-user-add {! 
background-position: 0px -130px;! 
}! 
! 
.icon-save {! 
background-position: 0px -78px;! 
}! 
! 
.icon-reset {! 
background-position: 0px -104px;! 
}! 
! 
.icon-grid {! 
background-position: 0px -52px;! 
}! 
! 
.icon-add {! 
background-position: 0px 0px;! 
}! 
! 
.icon-delete {! 
background-position: 0px -26px;! 
}!
Build 
Otimizado 
Agrega Valor!
http://jquerymobile.com/download-builder/
OTIMIZE 
JS, CSS, HTML
http://browserdiet.com/pt/
https://github.com/loiane/mobile-hibrido-performance
http://loiane.com 
facebook.com/loianegroner 
@loiane 
https://github.com/loiane 
youtube.com/user/Loianeg
Obrigada!

Mais conteúdo relacionado

Mais procurados

The rise and fall of a techno DJ, plus more new reviews and notable screenings
The rise and fall of a techno DJ, plus more new reviews and notable screeningsThe rise and fall of a techno DJ, plus more new reviews and notable screenings
The rise and fall of a techno DJ, plus more new reviews and notable screeningschicagonewsyesterday
 
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at NackademinRobert Nyman
 
The Spirit of Testing
The Spirit of TestingThe Spirit of Testing
The Spirit of TestingMarco Cedaro
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreRemy Sharp
 
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than playRushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than playchicagonewsyesterday
 
H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍
H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍
H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍민태 김
 
jQuery Anti-Patterns for Performance & Compression
jQuery Anti-Patterns for Performance & CompressionjQuery Anti-Patterns for Performance & Compression
jQuery Anti-Patterns for Performance & CompressionPaul Irish
 
TestWorks conf Dry up your angularjs unit tests using mox - Mike Woudenberg
TestWorks conf Dry up your angularjs unit tests using mox - Mike WoudenbergTestWorks conf Dry up your angularjs unit tests using mox - Mike Woudenberg
TestWorks conf Dry up your angularjs unit tests using mox - Mike WoudenbergXebia Nederland BV
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshowsblackman
 
Coffeescript - what's good
Coffeescript - what's goodCoffeescript - what's good
Coffeescript - what's goodJeongHun Byeon
 
6주 javaScript 시작하며
6주  javaScript 시작하며6주  javaScript 시작하며
6주 javaScript 시작하며지수 윤
 
https://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=tshttps://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=tsArif Alexi
 
What your testtool doesn't tell you
What your testtool doesn't tell youWhat your testtool doesn't tell you
What your testtool doesn't tell youAnnemarie Klaassen
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Chris Alfano
 

Mais procurados (20)

The rise and fall of a techno DJ, plus more new reviews and notable screenings
The rise and fall of a techno DJ, plus more new reviews and notable screeningsThe rise and fall of a techno DJ, plus more new reviews and notable screenings
The rise and fall of a techno DJ, plus more new reviews and notable screenings
 
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at Nackademin
 
The Spirit of Testing
The Spirit of TestingThe Spirit of Testing
The Spirit of Testing
 
course js day 3
course js day 3course js day 3
course js day 3
 
Borrador del blog
Borrador del blogBorrador del blog
Borrador del blog
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymore
 
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than playRushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
 
H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍
H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍
H3 경쟁력있는 웹앱 개발을 위한 모바일 js 프레임웍
 
jQuery Anti-Patterns for Performance & Compression
jQuery Anti-Patterns for Performance & CompressionjQuery Anti-Patterns for Performance & Compression
jQuery Anti-Patterns for Performance & Compression
 
Site optimization
Site optimizationSite optimization
Site optimization
 
jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
 
TestWorks conf Dry up your angularjs unit tests using mox - Mike Woudenberg
TestWorks conf Dry up your angularjs unit tests using mox - Mike WoudenbergTestWorks conf Dry up your angularjs unit tests using mox - Mike Woudenberg
TestWorks conf Dry up your angularjs unit tests using mox - Mike Woudenberg
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Coffeescript - what's good
Coffeescript - what's goodCoffeescript - what's good
Coffeescript - what's good
 
FuncUnit
FuncUnitFuncUnit
FuncUnit
 
6주 javaScript 시작하며
6주  javaScript 시작하며6주  javaScript 시작하며
6주 javaScript 시작하며
 
https://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=tshttps://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=ts
 
What your testtool doesn't tell you
What your testtool doesn't tell youWhat your testtool doesn't tell you
What your testtool doesn't tell you
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 

Destaque

WebBr 2013: Apps Mobile Multiplataforma e OpenSource com Sencha Touch e Phon...
WebBr 2013: Apps Mobile Multiplataforma e OpenSource com  Sencha Touch e Phon...WebBr 2013: Apps Mobile Multiplataforma e OpenSource com  Sencha Touch e Phon...
WebBr 2013: Apps Mobile Multiplataforma e OpenSource com Sencha Touch e Phon...Loiane Groner
 
TDC2013: ExtJS 4: Dicas e Melhores Practicas
TDC2013: ExtJS 4: Dicas e Melhores PracticasTDC2013: ExtJS 4: Dicas e Melhores Practicas
TDC2013: ExtJS 4: Dicas e Melhores PracticasLoiane Groner
 
JavaCE Conference 2012: ExtJS 4 + VRaptor
JavaCE Conference 2012: ExtJS 4 + VRaptorJavaCE Conference 2012: ExtJS 4 + VRaptor
JavaCE Conference 2012: ExtJS 4 + VRaptorLoiane Groner
 
Devcast Brasil: ExtJS 4 e Sencha Touch 2
Devcast Brasil: ExtJS 4 e Sencha Touch 2Devcast Brasil: ExtJS 4 e Sencha Touch 2
Devcast Brasil: ExtJS 4 e Sencha Touch 2Loiane Groner
 
JavaOne Brazil 2015: Java e HTML5
JavaOne Brazil 2015: Java e HTML5JavaOne Brazil 2015: Java e HTML5
JavaOne Brazil 2015: Java e HTML5Loiane Groner
 
BeagaJS 2013: Sencha Touch + PhoneGap
BeagaJS 2013: Sencha Touch + PhoneGapBeagaJS 2013: Sencha Touch + PhoneGap
BeagaJS 2013: Sencha Touch + PhoneGapLoiane Groner
 
Javaone Brazil 2012: Integrando Ext JS 4 com Java EE
Javaone Brazil 2012: Integrando Ext JS 4 com Java EEJavaone Brazil 2012: Integrando Ext JS 4 com Java EE
Javaone Brazil 2012: Integrando Ext JS 4 com Java EELoiane Groner
 
MobileConf 2015: Desmistificando o Phonegap (Cordova)
MobileConf 2015: Desmistificando o Phonegap (Cordova)MobileConf 2015: Desmistificando o Phonegap (Cordova)
MobileConf 2015: Desmistificando o Phonegap (Cordova)Loiane Groner
 
School of Net Webinar: ExtJS 4
School of Net Webinar: ExtJS 4School of Net Webinar: ExtJS 4
School of Net Webinar: ExtJS 4Loiane Groner
 
Conexao Java 2012: Desenvolvendo RIA com Java e Ext GWT (GXT)
Conexao Java 2012: Desenvolvendo RIA com Java e Ext GWT (GXT) Conexao Java 2012: Desenvolvendo RIA com Java e Ext GWT (GXT)
Conexao Java 2012: Desenvolvendo RIA com Java e Ext GWT (GXT) Loiane Groner
 
FrontInFloripa 2013: Sencha Touch 2 e Phonegap
FrontInFloripa 2013: Sencha Touch 2 e PhonegapFrontInFloripa 2013: Sencha Touch 2 e Phonegap
FrontInFloripa 2013: Sencha Touch 2 e PhonegapLoiane Groner
 
JavaOne Brazil 2011: Jax-RS e Ext JS 4
JavaOne Brazil 2011: Jax-RS e Ext JS 4JavaOne Brazil 2011: Jax-RS e Ext JS 4
JavaOne Brazil 2011: Jax-RS e Ext JS 4Loiane Groner
 
MNT2014: Mobile Hibrido com Phonegap
MNT2014: Mobile Hibrido com PhonegapMNT2014: Mobile Hibrido com Phonegap
MNT2014: Mobile Hibrido com PhonegapLoiane Groner
 
DevInCachu 2012 LT: Ext Gwt 3: GXT 3
DevInCachu 2012 LT: Ext Gwt 3: GXT 3DevInCachu 2012 LT: Ext Gwt 3: GXT 3
DevInCachu 2012 LT: Ext Gwt 3: GXT 3Loiane Groner
 
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJSAprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJSLoiane Groner
 
DevInCachu 2012: Desenvolvendo Aplicacoes RIA com ExtJS 4 e Sencha Touch 2
DevInCachu 2012: Desenvolvendo Aplicacoes RIA com ExtJS 4 e Sencha Touch 2DevInCachu 2012: Desenvolvendo Aplicacoes RIA com ExtJS 4 e Sencha Touch 2
DevInCachu 2012: Desenvolvendo Aplicacoes RIA com ExtJS 4 e Sencha Touch 2Loiane Groner
 
QConSP 2012: Sencha Touch 2: Mobile Multiplataforma
QConSP 2012: Sencha Touch 2: Mobile MultiplataformaQConSP 2012: Sencha Touch 2: Mobile Multiplataforma
QConSP 2012: Sencha Touch 2: Mobile MultiplataformaLoiane Groner
 
JustJava 2013: Aplicações Desktop HTML5, CSS3, Javascript com Servlets 3
JustJava 2013: Aplicações Desktop HTML5, CSS3, Javascript com Servlets 3JustJava 2013: Aplicações Desktop HTML5, CSS3, Javascript com Servlets 3
JustJava 2013: Aplicações Desktop HTML5, CSS3, Javascript com Servlets 3Loiane Groner
 
Cafe com Tom - ExtJS 4
Cafe com Tom - ExtJS 4Cafe com Tom - ExtJS 4
Cafe com Tom - ExtJS 4Loiane Groner
 

Destaque (20)

WebBr 2013: Apps Mobile Multiplataforma e OpenSource com Sencha Touch e Phon...
WebBr 2013: Apps Mobile Multiplataforma e OpenSource com  Sencha Touch e Phon...WebBr 2013: Apps Mobile Multiplataforma e OpenSource com  Sencha Touch e Phon...
WebBr 2013: Apps Mobile Multiplataforma e OpenSource com Sencha Touch e Phon...
 
TDC2013: ExtJS 4: Dicas e Melhores Practicas
TDC2013: ExtJS 4: Dicas e Melhores PracticasTDC2013: ExtJS 4: Dicas e Melhores Practicas
TDC2013: ExtJS 4: Dicas e Melhores Practicas
 
JavaCE Conference 2012: ExtJS 4 + VRaptor
JavaCE Conference 2012: ExtJS 4 + VRaptorJavaCE Conference 2012: ExtJS 4 + VRaptor
JavaCE Conference 2012: ExtJS 4 + VRaptor
 
Devcast Brasil: ExtJS 4 e Sencha Touch 2
Devcast Brasil: ExtJS 4 e Sencha Touch 2Devcast Brasil: ExtJS 4 e Sencha Touch 2
Devcast Brasil: ExtJS 4 e Sencha Touch 2
 
JavaOne Brazil 2015: Java e HTML5
JavaOne Brazil 2015: Java e HTML5JavaOne Brazil 2015: Java e HTML5
JavaOne Brazil 2015: Java e HTML5
 
BeagaJS 2013: Sencha Touch + PhoneGap
BeagaJS 2013: Sencha Touch + PhoneGapBeagaJS 2013: Sencha Touch + PhoneGap
BeagaJS 2013: Sencha Touch + PhoneGap
 
Javaone Brazil 2012: Integrando Ext JS 4 com Java EE
Javaone Brazil 2012: Integrando Ext JS 4 com Java EEJavaone Brazil 2012: Integrando Ext JS 4 com Java EE
Javaone Brazil 2012: Integrando Ext JS 4 com Java EE
 
MobileConf 2015: Desmistificando o Phonegap (Cordova)
MobileConf 2015: Desmistificando o Phonegap (Cordova)MobileConf 2015: Desmistificando o Phonegap (Cordova)
MobileConf 2015: Desmistificando o Phonegap (Cordova)
 
School of Net Webinar: ExtJS 4
School of Net Webinar: ExtJS 4School of Net Webinar: ExtJS 4
School of Net Webinar: ExtJS 4
 
Conexao Java 2012: Desenvolvendo RIA com Java e Ext GWT (GXT)
Conexao Java 2012: Desenvolvendo RIA com Java e Ext GWT (GXT) Conexao Java 2012: Desenvolvendo RIA com Java e Ext GWT (GXT)
Conexao Java 2012: Desenvolvendo RIA com Java e Ext GWT (GXT)
 
FrontInFloripa 2013: Sencha Touch 2 e Phonegap
FrontInFloripa 2013: Sencha Touch 2 e PhonegapFrontInFloripa 2013: Sencha Touch 2 e Phonegap
FrontInFloripa 2013: Sencha Touch 2 e Phonegap
 
JavaOne Brazil 2011: Jax-RS e Ext JS 4
JavaOne Brazil 2011: Jax-RS e Ext JS 4JavaOne Brazil 2011: Jax-RS e Ext JS 4
JavaOne Brazil 2011: Jax-RS e Ext JS 4
 
MNT2014: Mobile Hibrido com Phonegap
MNT2014: Mobile Hibrido com PhonegapMNT2014: Mobile Hibrido com Phonegap
MNT2014: Mobile Hibrido com Phonegap
 
DevInCachu 2012 LT: Ext Gwt 3: GXT 3
DevInCachu 2012 LT: Ext Gwt 3: GXT 3DevInCachu 2012 LT: Ext Gwt 3: GXT 3
DevInCachu 2012 LT: Ext Gwt 3: GXT 3
 
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJSAprimorando sua Aplicação com Ext JS 4 - BrazilJS
Aprimorando sua Aplicação com Ext JS 4 - BrazilJS
 
DevInCachu 2012: Desenvolvendo Aplicacoes RIA com ExtJS 4 e Sencha Touch 2
DevInCachu 2012: Desenvolvendo Aplicacoes RIA com ExtJS 4 e Sencha Touch 2DevInCachu 2012: Desenvolvendo Aplicacoes RIA com ExtJS 4 e Sencha Touch 2
DevInCachu 2012: Desenvolvendo Aplicacoes RIA com ExtJS 4 e Sencha Touch 2
 
QConSP 2012: Sencha Touch 2: Mobile Multiplataforma
QConSP 2012: Sencha Touch 2: Mobile MultiplataformaQConSP 2012: Sencha Touch 2: Mobile Multiplataforma
QConSP 2012: Sencha Touch 2: Mobile Multiplataforma
 
TDC 2011 - Ext JS 4
TDC 2011 - Ext JS 4TDC 2011 - Ext JS 4
TDC 2011 - Ext JS 4
 
JustJava 2013: Aplicações Desktop HTML5, CSS3, Javascript com Servlets 3
JustJava 2013: Aplicações Desktop HTML5, CSS3, Javascript com Servlets 3JustJava 2013: Aplicações Desktop HTML5, CSS3, Javascript com Servlets 3
JustJava 2013: Aplicações Desktop HTML5, CSS3, Javascript com Servlets 3
 
Cafe com Tom - ExtJS 4
Cafe com Tom - ExtJS 4Cafe com Tom - ExtJS 4
Cafe com Tom - ExtJS 4
 

Semelhante a FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas

Turn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modulesTurn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modulesjerryorr
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsHome
 
Velocity EU 2014 — Offline-first web apps
Velocity EU 2014 — Offline-first web appsVelocity EU 2014 — Offline-first web apps
Velocity EU 2014 — Offline-first web appsandrewsmatt
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node jsfakedarren
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jqueryciberglo
 
Java.script
Java.scriptJava.script
Java.scriptg Nama
 
HTML5 and CSS3 Shizzle
HTML5 and CSS3 ShizzleHTML5 and CSS3 Shizzle
HTML5 and CSS3 ShizzleChris Mills
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoRob Bontekoe
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsFrancois Zaninotto
 
jQuery - 10 Time-Savers You (Maybe) Don't Know
jQuery - 10 Time-Savers You (Maybe) Don't KnowjQuery - 10 Time-Savers You (Maybe) Don't Know
jQuery - 10 Time-Savers You (Maybe) Don't Knowgirish82
 
jQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and PerformancejQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and PerformanceJonas De Smet
 
The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)ungerik
 
HTML5, The Open Web, and what it means for you - MDN Hack Day, Sao Paulo
HTML5, The Open Web, and what it means for you - MDN Hack Day, Sao PauloHTML5, The Open Web, and what it means for you - MDN Hack Day, Sao Paulo
HTML5, The Open Web, and what it means for you - MDN Hack Day, Sao PauloRobert Nyman
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCpootsbook
 
Future of Web Development
Future of Web DevelopmentFuture of Web Development
Future of Web DevelopmentZeno Rocha
 

Semelhante a FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas (20)

Turn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modulesTurn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modules
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome Webapps
 
Velocity EU 2014 — Offline-first web apps
Velocity EU 2014 — Offline-first web appsVelocity EU 2014 — Offline-first web apps
Velocity EU 2014 — Offline-first web apps
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node js
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jquery
 
Java.script
Java.scriptJava.script
Java.script
 
Html
HtmlHtml
Html
 
HTML5 and CSS3 Shizzle
HTML5 and CSS3 ShizzleHTML5 and CSS3 Shizzle
HTML5 and CSS3 Shizzle
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
Taking your Web App for a walk
Taking your Web App for a walkTaking your Web App for a walk
Taking your Web App for a walk
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
 
Device deployment
Device deploymentDevice deployment
Device deployment
 
jQuery - 10 Time-Savers You (Maybe) Don't Know
jQuery - 10 Time-Savers You (Maybe) Don't KnowjQuery - 10 Time-Savers You (Maybe) Don't Know
jQuery - 10 Time-Savers You (Maybe) Don't Know
 
jQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and PerformancejQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and Performance
 
The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)
 
HTML5, The Open Web, and what it means for you - MDN Hack Day, Sao Paulo
HTML5, The Open Web, and what it means for you - MDN Hack Day, Sao PauloHTML5, The Open Web, and what it means for you - MDN Hack Day, Sao Paulo
HTML5, The Open Web, and what it means for you - MDN Hack Day, Sao Paulo
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 
Future of Web Development
Future of Web DevelopmentFuture of Web Development
Future of Web Development
 

Último

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas

  • 1. 10 dicas de desempenho para apps mobile híbridas Loiane Groner http://loiane.com
  • 2. Me, Myself && I ! •Gerente de Desenv Projetos •8+ XP TI •Java, Sencha, Phonegap •http://loiane.com •@loiane
  • 4. Learning JavaScript Data Structures and Algorithms ! Out/Nov 2014 Ext JS 5 Avançado ! Fev 2015
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. I
  • 11.
  • 12. #1
  • 13. <div data-role="page" id="tracks">! ! <div data-role="header"><h1>Tracks</h1></div>! ! <ul data-role="listview">! ! <li><a href="getTrackInfo.php?id=1">Desempenho e Escalabilidade na Prática</a></li>! ! <li><a href="getTrackInfo.php?id=2">Java na Crista da Onda</a></li>! ! <li><a href="getTrackInfo.php?id=3">Arquiteturas que Você Sempre Quis Conhecer</a></li>! ! <li><a href="getTrackInfo.php?id=4">Mobile: Portáteis e Furiosos</a></li>! ! </ul>! </div>!
  • 14. NÃO gere páginas no servidor
  • 15. Web Browser Dispositivo Web Server Java/PHP/ Ruby/C# Arquivos Imagens/ Documentos Banco de Dados Backend http:// Lógica de negócio JavaScript Arquivos Imagens/ Documentos Banco de Dados caching
  • 16. JSON
  • 17. #2
  • 18. // Obtém dados! $.ajax({url: "getTrackInfo.php?id=1"}).done(function(track) {! // Mostra os detalhes - view! $.mobile.changePage($('#track-info'));! });!
  • 19. //mostra View! $.mobile.changePage($('#track-info'));! ! //------------------------------------------------------------------------! ! $(document).bind("pagechange", onPageChange);! ! function onPageChange(event, data) {! ! var toPageId = data.toPage.attr("id");! ! ! switch (toPageId) {! case 'track-info':! ! ! clearValues();! ! ! // Obtém dados! ! ! ! $.ajax({url: "getTrackInfo.php?id=1"}).done(function(track) {! ! ! ! // Atualiza os detalhes - view! ! ! ! $('#trackNome h1').html(track.name);! ! ! ! ! $('#trackDesc').val(track.desc);! ! ! ! ! $('#trackDia').val(track.dia);! ! ! ! ! $('#trackLocal').val(track.local);! ! ! ! ! $('#trackHost').val(track.host);! ! ! ! });! ! ! ! break;! }! } !
  • 20. Ext.define('MyContacts.store.Contacts', {! extend: 'Ext.data.Store',! ! requires: [! 'MyContacts.model.Contact',! 'MyContacts.proxy.ContactsProxy'! ],! ! config: {! autoLoad: true,! model: 'MyContacts.model.Contact',! storeId: 'Contacts',! proxy: {! type: 'contactstorage'! }! }! });!
  • 21. control: {! "contactslist": {! show: 'onListItemPainted'! }! }! ! //-------------------------------------! ! onListItemPainted: function(view, options) { ! view.getStore().load();! }!
  • 22. Show me the VIEW!
  • 23. Mostre a view e depois carregue os dados
  • 24. #3
  • 25. Ext.define('MyContacts.view.ContactsPanel', {! extend: 'Ext.Container',! alias: 'widget.contactspanel',! ! requires: [! 'MyContacts.view.ContactsList',! 'MyContacts.view.ContactInfo',! 'MyContacts.view.ContactEdit'! ],! ! config: {! layout: {! type: 'card'! },! items: [! {! xtype: 'contactslist'! },! {! xtype: 'contactinfo'! },! {! xtype: 'contactedit'! }! ]! }! ! });!
  • 26.
  • 27. #4
  • 28. App com lista dos participantes do FrontInBahia select count(*) from Participantes == 1000 É muito dado?
  • 29. Paging / Paginação https://github.com/stakbit/jQuery-Mobile-Listview-Pagination-Plugin http://dcarrith.github.io/jquery.mobile.lazyloader/
  • 31. Dados Estáticos LocalStorage SQLite - database Arquivo - JSON
  • 32. // do a SERVER load, passing a callback function! offlineSyncStore.loadServer(function(){! ! // create a new Person record! var person = Ext.create('Person', {! FirstName: 'Joe',! LastName: 'Bloggs',! Email: 'joe@swarmonline.com'! });! ! // add it to the store! offlineSyncStore.add(person);! ! // sync the store LOCALLY. If autoServerSync is set to true then this will also sync using SERVER proxy! offlineSyncStore.sync();! ! // if autoServerSync is false then call SERVER sync manually! offlineSyncStore.syncServer();! ! });! https://market.sencha.com/extensions/ext-ux-offlinesyncstore
  • 34. #5
  • 35.
  • 36. var timeTouch;! ! $("body").on("touchend", ".needsclick", function() {! timeTouch = new Date().getTime();! });! ! $("body").on("click", ".needsclick", function() {! if (timeTouch) {! $("#log-slow").html("click: " + (new Date().getTime() - timeTouch) + "ms");! }! return false;! });!
  • 37. Evite CLICK use TOUCHEND
  • 38.
  • 40. $("body").on("touchend", ".fastclick", function() {! timeTouch = new Date().getTime();! });! ! $("body").on("click", ".fastclick", function() {! if (timeTouch) {! $("#log-fast").html("touchend: " + (new Date().getTime() - timeTouch) + "ms");! } else {! alert("Execute esse exemplo em um device touch");! }! return false;! });!
  • 41. #6
  • 42.
  • 44. .page {! position: absolute;! width: 200px;! height:200px;! top:20px;! left:50;! }! ! .page-left {! left: 50px;! }! .page-center {! left: 275px;! }! .page-right {! left: 500px;! }! ! .transition {! transition-duration: .25s;! }!
  • 45. Use CSS 3 Transitions + Hardware Acceleration
  • 46. .page {! position: absolute;! width: 200px;! height:200px;! top:20px;! left:50;! transform: translate3d(0,0,0);! }! ! .page-left {! -webkit-transform: translate3d(30px, 0, 0);! transform: translate3d(31px, 0, 0);! }! .page-center {! -webkit-transform: translate3d(250px, 0, 0);! transform: translate3d(251px, 0, 0);! }! .page-right {! -webkit-transform: translate3d(470px, 0, 0);! transform: translate3d(471px, 0, 0);! }! ! .transition {! -webkit-transition-duration: .25s;! transition-duration: .25s;! }!
  • 48. #7
  • 49. • box-shadow • border-radius • gradients • text-align
  • 50. Evite sombras e gradientes
  • 51. #8
  • 52. $("#contato-info a.back").on("touchend", clickHandler);! $("#contato-info a.back").attr("href", "#contato-info");! $("#contato-info a.back").css("color", "green");! $("#contato-info a.back").css("text-decoration", "none");!
  • 53. Ext.ComponentQuery.query('contactinfo button#back')[0].on('tap', clickHandler);! Ext.ComponentQuery.query('contactinfo button#back')[0].setCls('backBtn');! Ext.ComponentQuery.query('contactinfo button#back')[0].setLabelCls('labelCls');!
  • 54. var $backBtn = $('#contato-info a.back');! $backBtn.on("touchend", clickHandler);! $backBtn.attr("href", "#contato-info");! $backBtn.css("color", "green");! $backBtn.css("text-decoration", "none");!
  • 55. var backBtn = Ext.ComponentQuery.query('contactinfo button#back')[0];! backBtn.on('tap', clickHandler);! backBtn.setCls('backBtn');! backBtn.setLabelCls('labelCls');!
  • 57. #9
  • 58. XUI
  • 59.
  • 60. x$(document).on("deviceready", function () {! ! headingDiv = x$("#heading");! navigator.compass.getCurrentHeading(onSuccess, onError);! navigator.compass.watchHeading(onSuccess, onError, {frequency: 100});! ! function onSuccess(heading) {! headingDiv.html(! 'Heading: ' + heading.magneticHeading + '&#xb0; ' +! convertToText(heading.magneticHeading) + '<br />' +! 'True Heading: ' + heading.trueHeading + '<br />' +! 'Accuracy: ' + heading.headingAccuracy! );! ! // Alter the CSS properties to rotate the rose image! x$(".rose").css({! "-webkit-transform":! "rotate(-" + heading.magneticHeading + "deg)",! "transform":! "rotate(-" + heading.magneticHeading + "deg)"! });! }! ! function onError() {! headingDiv.html(! 'There was an error trying to ' +! 'locate your current bearing.'! );! }! });!
  • 62. Cuidado com framework / lib da moda
  • 63.
  • 64. #10
  • 65. .icon-user {! background-image: url(../images/user.png) !important;! }! ! .icon-user-add {! background-image: url(../images/user_add.gif) !important;! }! ! .icon-save {! background-image: url(../images/save.gif) !important;! }! ! .icon-reset {! background-image: url(../images/stop.png) !important;! }! ! .icon-grid {! background-image: url(../images/grid.png) !important;! }! ! .icon-add {! background-image: url(../images/add.png) !important;! }! ! .icon-delete {! background-image: url(../images/delete.png) !important;! }!
  • 66.
  • 67. .icon {! ! background-image:url(result.png);! }! ! .icon-user {! background-position: 0px -156px;! }! ! .icon-user-add {! background-position: 0px -130px;! }! ! .icon-save {! background-position: 0px -78px;! }! ! .icon-reset {! background-position: 0px -104px;! }! ! .icon-grid {! background-position: 0px -52px;! }! ! .icon-add {! background-position: 0px 0px;! }! ! .icon-delete {! background-position: 0px -26px;! }!
  • 69.
  • 70.
  • 74.
  • 76. http://loiane.com facebook.com/loianegroner @loiane https://github.com/loiane youtube.com/user/Loianeg