phonegap
play

PhoneGap 99 slides of NIWEA Install PhoneGap - PowerPoint PPT Presentation

PhoneGap 99 slides of NIWEA Install PhoneGap http://lmgtfy.com/?q=install+phonegap There are more important things to discuss NIWEA HTML, JavaScript and CSS NIWEA HTML, JavaScript and CSS JavaScript Double-click to edit JavaScript


  1. PhoneGap 99 slides of NIWEA

  2. Install PhoneGap • http://lmgtfy.com/?q=install+phonegap • There are more important things to discuss

  3. NIWEA HTML, JavaScript and CSS

  4. NIWEA HTML, JavaScript and CSS

  5. JavaScript Double-click to edit

  6. JavaScript Double-click to edit It’s all about events ;)

  7. JavaScript ES3 and ES5

  8. JavaScript is a programing language.

  9. JavaScript is a functional programing language.

  10. JavaScript is a functional and object oriented programing language.

  11. JavaScript is a functional and object oriented programing language based on Self.

  12. JavaScript is a functional and object oriented programing language based on Self and Scheme.

  13. JavaScript is a functional and object oriented programing language based on Self and Scheme that was written in 10 days at Netscape.

  14. JavaScript is a functional and object oriented programing language based on Self and Scheme that was written in 10 days at Netscape and it's provably the most innovative language of the decade...

  15. So, how to learn it?

  16. Not by doing!

  17. Seriously...

  18. <script> true === $.inArray('Crockford', gods); </script> • Videos (5 x 1h30') http://yuiblog.com/crockford/ • JavaScript: The Good Parts http://oreilly.com/catalog/9780596517748

  19. What about PhoneGap?

  20. Patience

  21. JSLint Stinks http://jslint.com/ • Global Variables • Semicolon • Scope • Required Blocks • Expression Statements • ...

  22. JSLint Stinks http://jslint.com/ • Indenting • i++ • for ... in • ...

  23. http://lmgtfy.com/?q=jslint+<xsl:variable select="/user/editor"/>

  24. What about PhoneGap?

  25. One more thing…

  26. JSON

  27. { 'user': { "is_logged_in": "false", "favorites": "12", } }

  28. { 'user': { "is_logged_in": "false", "favorites": "12", } }

  29. { "user": { "is_logged_in": "false", "favorites": "12" } }

  30. { "user": { "is_logged_in": false, "favorites": 12 } }

  31. never ever ever never ever never! really! never ever string concatenate json. never. ok?

  32. <?php echo json_encode( array( 'user' => array( 'is_logged_in' => false, 'favorite' => 12 ) ) );

  33. What about PhoneGap?

  34. JS Libraries?

  35. XUI Stinks A simple javascript framework for building mobile web applications.

  36. XUI Stinks A simple javascript framework for building mobile web applications.

  37. jQuery smells like roses. The Write Less, Do More, JavaScript Library

  38. jQuery smells like roses. The Write Less, Do More, JavaScript Library

  39. jQuery.address() Deep linking for the masses

  40. jQote2 [t ʃəˈ ko ʊ te ɪ ] John Resig’s awesome JavaScript Micro-Templating ported to jQuery

  41. jQote2 [t ʃəˈ ko ʊ te ɪ ] John Resig’s awesome JavaScript Micro-Templating ported to jQuery

  42. jQote2 [t ʃəˈ ko ʊ te ɪ ] John Resig’s awesome JavaScript Micro-Templating ported to jQuery

  43. What about PhoneGap?

  44. Image Loading var logo = 'http://www.liip.ch/files/images/team/chregu.png'; $('#somewhere').append('<img/>') .children(':last') .attr('src', logo) .css('display', 'none') .after('<img src="img/loader.gif"/>') .load( function () { var img = $(this); img.next('img').remove(); img.css('display', 'block'); } );

  45. Image Loading var logo = 'http://www.liip.ch/files/images/team/chregu.png'; $('#somewhere').append('<img/>') .children(':last') .attr('src', logo) .css('display', 'none') .after('<img src="img/loader.gif"/>') .load( function () { var img = $(this); img.next('img').remove(); img.css('display', 'block'); } );

  46. Image Loading var logo = 'http://www.liip.ch/files/images/team/chregu.png'; $('#somewhere').append('<img/>') .children(':last') .attr('src', logo) .css('display', 'none') .after('<img src="img/loader.gif"/>') .load( function () { var img = $(this); img.next('img').remove(); img.css('display', 'block'); } );

  47. Image Loading var logo = 'http://www.liip.ch/files/images/team/chregu.png'; $('#somewhere').append('<img/>') .children(':last') .attr('src', logo) .css('display', 'none') .after('<img src="img/loader_pictures.gif"/>') .load( function () { var img = $(this); img.next('img').remove(); img.css('display', 'block'); } );

  48. What about PhoneGap?

  49. Dispatcher

  50. $(function () { // [...] basic setup of the layout, toolbar, ect... $.address.value('index'); $.address.init( function () { $.address.change(ksm.application.processURI); } ); });

  51. $(function () { // [...] basic setup of the layout, toolbar, ect... $.address.value('index'); // #index $.address.init( function () { $.address.change(ksm.application.processURI); } ); });

  52. $(function () { // [...] basic setup of the layout, toolbar, ect... $.address.value(localStorage.getItem('currentPage') || 'index'); $.address.init( function () { $.address.change(ksm.application.processURI); } ); });

  53. $(function () { // [...] basic setup of the layout, toolbar, ect... $.address.value(localStorage.getItem('currentPage') || 'index'); $.address.init( function () { $.address.change(ksm.application.processURI); } ); });

  54. $(function () { // [...] basic setup of the layout, toolbar, ect... $.address.value(localStorage.getItem('currentPage') || 'index'); $.address.init( function () { $.address.change(ksm.application.processURI); } ); });

  55. $(function () { // [...] basic setup of the layout, toolbar, ect... $.address.value(localStorage.getItem('currentPage') || 'index'); $.address.init( function () { $.address.change(ksm.application.processURI); } ); });

  56. ksm.application = { // [...] processURI: function (address) { var module, parameters; // click, click, click // module = 'search'; // parameters = {q: 'ice+cream'} if ('string' === ksm[module].stub) { $('#content').html($(ksm[module].stub)); } if ('function' === typeof ksm[module].init) { ksm[module].init(parameters); } } }

  57. #search?q=ice+cream ksm.application = { // [...] processURI: function (address) { var module, parameters; // click, click, click // module = 'search'; // parameters = {q: 'ice+cream'} if ('string' === ksm[module].stub) { $('#content').html($(ksm[module].stub)); } if ('function' === typeof ksm[module].init) { ksm[module].init(parameters); } } }

  58. ksm.application = { // [...] processURI: function (address) { var module, parameters; // click, click, click // module = 'search'; // parameters = {q: 'ice+cream'} if ('string' === ksm[module].stub) { $('#content').html($(ksm[module].stub)); } if ('function' === typeof ksm[module].init) { ksm[module].init(parameters); } } }

  59. ksm.application = { // [...] processURI: function (address) { var module, parameters; // click, click, click // module = 'search'; // parameters = {q: 'ice+cream'} if ('string' === ksm[module].stub) { $('#content').html($(ksm[module].stub)); } if ('function' === typeof ksm[module].init) { ksm[module].init(parameters); } } }

  60. ksm.application = { // [...] processURI: function (address) { var module, parameters; // click, click, click // module = 'search'; // parameters = {q: 'ice+cream'} if ('string' === ksm[module].stub) { $('#content').html($(ksm[module].stub)); } if ('function' === typeof ksm[module].init) { ksm[module].init(parameters); } } }

  61. $.address.value('#search?q=ice+cream'); $.address.change(ksm.application.processURI); ksm.search.init({q: 'ice+cream'});

  62. ksm.search = (function () { var that, callback; callback = return function (result) { // do your thing... }; that = { init: function (parameters) { $.get( 'http://api.com/search.json', parameters, callback ); ); }; return that; }());

  63. ksm.search = (function () { var that, callback; callback = return function (result) { // do your thing... }; that = { init: function (parameters) { $.get( 'http://api.com/search.json', parameters, callback ); ); }; return that; }());

  64. ksm.search = (function () { var that, callback; callback = return function (result) { // do your thing... }; that = { init: function (parameters) { $.get( 'http://api.com/search.json', parameters, callback ); ); }; return that; }());

  65. ksm.search = (function () { var that, callback; callback = return function (result) { // do your thing... }; that = { init: function (parameters) { $.get( 'http://api.com/search.json', parameters, callback ); ); }; return that; }());

  66. ksm.search = (function () { var that, callback; callback = return function (result) { // do your thing... }; that = { init: function (parameters) { $.get( 'http://api.com/search.json', parameters, callback ); ); }; return that; }());

Recommend


More recommend