cross platform mobile apps with phonegap
play

CROSS PLATFORM MOBILE APPS WITH PHONEGAP CHRISTOPHE COENRAETS - PowerPoint PPT Presentation

CROSS PLATFORM MOBILE APPS WITH PHONEGAP CHRISTOPHE COENRAETS ADOBE @CCOENRAETS HTTP://COENRAETS.ORG h t ps://github.com/ccoenraets N Platforms = N Apps Objective-C Java NDK J2ME C# C++ C++ C/C++ N = 1 ? Objective-C Java NDK J2ME


  1. CROSS PLATFORM MOBILE APPS WITH PHONEGAP CHRISTOPHE COENRAETS ADOBE @CCOENRAETS HTTP://COENRAETS.ORG

  2. h t ps://github.com/ccoenraets

  3. N Platforms = N Apps Objective-C Java NDK J2ME C# C++ C++ C/C++

  4. N = 1 ?

  5. Objective-C Java NDK J2ME C# C++ C++ C/C++

  6. Objective-C Java NDK J2ME C# C++ C++ C/C++

  7. Mobile Apps Package as Native App Mobile Sites Access device features

  8. Hybrid Apps Objective-C Java J2ME C# C++ C++ C/C++

  9. Accessing Device Features JavaScript OS

  10. Platforms User Experience

  11. Is this an App?

  12. Hybrid App Native App Access App Store App Store Updates App Store + Instant App Store Graphic HTML, Canvas, SVG Native Performance Slower * Faster * Device APIs Yes No Language Web Objective C / Java / C Connectivity Online / O ffl ine Online / O ffl ine Push Noti fi cation Yes Yes

  13. PhoneGap Performance 1. Keep small footprint (and avoid unneeded libs) 2. Use Tap events, not Click events 3. Use hardware accelerated CSS transitions

  14. BBC Olympics

  15. Untappd

  16. Salesforce.com Logger

  17. Building Hybrid Apps + + PhoneGap Build ipa apk OTA xap wgz ipk

  18. ARCHITECTING HYBRID APPS

  19. Old School: UI generated at the server-side in PHP, JSP, ASP, RoR, CF, ...

  20. <html> <head> <title>Huge App</title> New School: Single Page Application <script src="huge-app.js"></script> UI built dynamically at the client-side in JavaScript </head> <body></body> </html>

  21. Framework Landscape UI Architecture DOM Full stack Custom stack

  22. Router Router = Backbone.Router.extend({ routes: { "" : "list", "employees/:id" : "details” }, list: function() { $('#list').html('<div>Employee List</div>'); }, details: function(id) { $('#details').html('<div>Employee Details</div>'); } });

  23. View EmployeeView = Backbone.View.extend({ template: _.template($('#employee-tpl').html()), initialize: function () { this.render(); }, events: { "click .save": "save" }, render: function () { $(this.el).html(this.template(this.model.toJSON())); }, save: function () { this.model.save({firstName: $('#firstName').val()}); } });

  24. Model Employee = Backbone.Model.extend({ urlRoot: "api/employees" }); emp = new Employee({firstName: 'Joe', lastName: 'Smith'}); emp.save();

  25. @ccoenraets h t p://coenraets.org

Recommend


More recommend