Upload
loiane-groner
View
3.264
Download
3
Embed Size (px)
DESCRIPTION
Palestra apresentada em 2 de março no evento BeagaJS. Palestra Desenvolvimento Mobile Multiplataforma e Open Source com PhoneGap e Sencha Touch
Citation preview
Loiane GronerJava JUG LeaderSencha Community Leader
7+ XP Java4+ XP Sencha
Software Developer Manager @ Citibank
http://loiane.com@loiane
Acesso Nativo
App in PurchasesCâmeraContatos (read only)*Connection (online/offline)Device Info (nome, plataforma, uuid)GeoLocationNotifications (vibrar)OrientationPush Notifications
Sencha Packager*PhoneGapEmulator
app.json
"js": [ { "path": "touch/sencha-touch.js" }, { "path": "cordova-2.5.0.js" }, { "path": "app.js", "bundle": true, "update": "delta" } ],
navigator.contacts.find(! fields,! function(deviceContacts) {! //loop over deviceContacts and create Contact model instances! var contacts = [];! for (var i = 0; i < deviceContacts.length; i++) {! var deviceContact = deviceContacts[ i ];
! ! ! ! ! console.log(deviceContact);
! ! ! ! ! var phone = deviceContact.phoneNumbers[0];! ! ! ! ! if (phone){! ! ! ! ! ! phone = phone.value;! ! ! ! ! } else{! ! ! ! ! ! phone = "";! ! ! ! ! }
! ! ! ! ! console.log("phone " + phone);
! var contact = Ext.create('MyContacts.model.Contact',{! id: deviceContact.id,! givenName: deviceContact.name.givenName,! familyName: deviceContact.name.familyName,! phoneNumber: phone,! birthday: new Date(deviceContact.birthday),! notes: deviceContact.note! });! contact.deviceContact = deviceContact;! contacts.push(contact);! }! //return model instances in a result set operation.setResultSet( ! Ext.create('Ext.data.ResultSet', { ! records: contacts, ! total : contacts.length }) );! //announce success! operation.setSuccessful();! operation.setCompleted(); console.log('operation complete');! //finish with callback! if (typeof callback == "function") {! callback.call(scope || thisProxy, operation);! }! },
MyContacts.proxy.ContactsProxy
"css": [ { "path": "../../resources/css/base.css", "update": "delta" }, { "path": "resources/css/sencha-touch.css", "platform": ['chrome', 'safari', 'ios'], "update": "delta" }, { "path": "resources/css/android.css", "platform": ['android'], "update": "delta" }, { "path": "resources/css/bb.css", "platform": ['blackberry'], "update": "delta" }, { "path": "resources/css/wp.css", "platform": ['ie10'], "update": "delta" } ]
Nativo
Web
Acesso Device
Velocidade Tempo Desenvolvimento
App Store
Sim Sim
?
Caro
Parcial Sussa
Sim
Não
Nativo
Web
Acesso Device
Velocidade Tempo Desenvolvimento
App Store
Cross Platform
Sim Sim
?
Caro
Parcial Sussa
Sim
Não Sim
Não
Nativo
Web
Acesso Device
Velocidade Tempo Desenvolvimento
App Store
Cross Platform
Sim Sim
?
Caro
Parcial Sussa
Sim
Não Sim
Não
Híbrido Sim ? Sussa* Sim Sim
?
Sussa*
Já vamos discutir
Já vamos discutir
Nativo
Web
Acesso Device
Velocidade Tempo Desenvolvimento
App Store
Cross Platform
Sim Sim
?
Caro
Parcial Sussa
Sim
Não Sim
Não
Híbrido Sim ? Sussa* Sim Sim
Parece uma App
Parece app iOS
diferente web
Aprenda a desenvolver para mobile,
não webApp únicaButtons,
iOS Human Interface Design Guidelines Eventos Touch,
não Web
Pinch,Zoom#fail
Agregador de links
App Intuitiva
Hyperlink