modern
play

MODERN WEB APPLICATION DEVELOPMENT WORKFLOW FIRST, LETS LOOK AT - PowerPoint PPT Presentation

MODERN WEB APPLICATION DEVELOPMENT WORKFLOW FIRST, LETS LOOK AT THE PAST THROW A BUNCH OF HTML FILES THROW A BUNCH OF HTML FILES ADD A COUPLE OF CSS FILES THROW A BUNCH OF HTML FILES ADD A COUPLE OF CSS FILES PUT SOME JAVASCRIPT IN ALL THIS


  1. MODERN WEB APPLICATION DEVELOPMENT WORKFLOW

  2. FIRST, LET’S LOOK AT THE PAST

  3. THROW A BUNCH OF HTML FILES

  4. THROW A BUNCH OF HTML FILES ADD A COUPLE OF CSS FILES

  5. THROW A BUNCH OF HTML FILES ADD A COUPLE OF CSS FILES PUT SOME JAVASCRIPT IN ALL THIS

  6. THROW A BUNCH OF HTML FILES ADD A COUPLE OF CSS FILES PUT SOME JAVASCRIPT IN ALL THIS AND CALL IT A DAY...

  7. COME BACK 6 MONTHS LATER AND TRY TO REMEMBER HOW TO MAINTAIN YOUR CODE

  8. Node.js ≠ Server-side JavaScript

  9. Node.js stand alone JavaScript runtime

  10. Node.js stand alone JavaScript runtime using v8, Chrome’s JavaScript engine

  11. Node.js stand alone JavaScript applications

  12. Node.js stand alone JavaScript applications created by JavaScript developers

  13. Node.js stand alone JavaScript applications created by JavaScript developers for JavaScript developers

  14. BRAND NEW WORLD

  15. JAVASCRIPT DEVELOPMENT TOOLS

  16. JAVASCRIPT DEVELOPMENT WORKFLOW

  17. A GOOD DEVELOPMENT WORKFLOW -HELPS YOU GET STARTED

  18. A GOOD DEVELOPMENT WORKFLOW -HELPS YOU GET STARTED -MAINTAINS YOUR DEPENDENCIES

  19. A GOOD DEVELOPMENT WORKFLOW -HELPS YOU GET STARTED -MAINTAINS YOUR DEPENDENCIES -ENFORCES BEST PRACTICES

  20. A GOOD DEVELOPMENT WORKFLOW -HELPS YOU GET STARTED -MAINTAINS YOUR DEPENDENCIES -ENFORCES BEST PRACTICES -PREPARES YOUR TOOLS

  21. A GOOD DEVELOPMENT WORKFLOW -HELPS YOU GET STARTED -MAINTAINS YOUR DEPENDENCIES -ENFORCES BEST PRACTICES -PREPARES YOUR TOOLS -FIGHTS REGRESSIONS

  22. A GOOD DEVELOPMENT WORKFLOW -HELPS YOU GET STARTED -MAINTAINS YOUR DEPENDENCIES -ENFORCES BEST PRACTICES -PREPARES YOUR TOOLS -FIGHTS REGRESSIONS -EASES THE RELEASE PROCESS

  23. HOW TO GET STARTED?

  24. YEOMAN Born in 2012 Various contributors (Employees from Google, Twitter, etc)

  25. YEOMAN scaffolding - structure - compilation - static analysis - dependencies management - development tools - unit testing

  26. YEOMAN download > npm install -g yo “-g” global install

  27. YEOMAN Various generators: ○ Angular ○ Ember ○ Backbone And all the other popular frameworks...

  28. YEOMAN angular.js generator > npm install -g generator-angular

  29. YEOMAN create an Angular project > yo angular

  30. Select some dependencies

  31. Choose some options

  32. It creates the project

  33. It downloads half of the internet

  34. It uses some dark magic

  35. Enjoy the view, Yeoman takes care of everything…

  36. What does the result look like?

  37. STRUCTURE

  38. CONTENT

  39. DEPENDENCIES

  40. DEV TOOLS

  41. IT’S MAGIC! and it will be your job to maintain it...

  42. HAPPY?

  43. BUT HOW DOES IT WORK?

  44. YEOMAN HAS FRIENDS

  45. BOWER

  46. GRUNT

  47. GULP

  48. AND OTHERS

  49. DEPENDENCIES MANAGEMENT

  50. BOWER

  51. BOWER Package manager for the web Born in 2012 Created by Twitter and other contributors over time

  52. BOWER Download > npm install -g bower

  53. Find a package: bower search

  54. Find more information: bower info

  55. BOWER Add a specific dependency > bower install jquery#1.10.2 --save install jquery and save this new dependency

  56. BOWER runtime dependencies in bower.json

  57. DEPENDENCIES

  58. BOWER Add all your dependencies > bower install

  59. See your dependencies: bower list

  60. BOWER Package management always comes with its set of problems:

  61. BOWER Package management always comes with its set of problems: - how can I create a new package?

  62. BOWER Package management always comes with its set of problems: - how can I create a new package? - how can I host a bower repository?

  63. Create a bower package: bower init

  64. BOWER Use bower with Git > bower install https://myrepository.git

  65. BOWER Host multiple versions > git tag -a 1.4 -m 'version 1.4' > bower install https://myrepository.git#1.4

  66. BOWER Download > bower install jquery > bower install git://github.com/jquery/jquery.git

  67. BOWER Registry https://github.com/bower/registry A simple web server listing Git repository URLs

  68. BOWER Register > bower register myrepository https://…git > bower install myrepository

  69. BUILD

  70. GRUNT GULP

  71. GRUNT GULP CONFIGURATION CODE

  72. EQUALLY POWERFUL

  73. GRUNT is a bit older so its ECOSYSTEM is more mature

  74. Grunt and Gulp development tools dependencies in package.json >npm install

  75. DEV TOOLS

  76. GRUNT

  77. GRUNT configuration over code grunt.initConfig({ lint : { src : 'src/<%= pkg.name %>.js' }, concat : { src : [ '<banner:meta.banner>' , '<file_strip_banner:src/<%= pkg.name %>.js>' ], dest : '<%= pkg.name %>.js' } });

  78. GRUNT Configuration in Gruntfile.js

  79. GRUNT Global install before Grunt 0.4 Updating Grunt cannot break existing projects anymore

  80. GRUNT gruntfile.js structure 3 parts: -Task loading -Task configuration -Task registration

  81. GRUNT An example: Static code analysis with JSHINT

  82. GRUNT

  83. HOW DO YOU USE IT? >grunt >grunt jshint:all

  84. GULP

  85. GULP code over configuration gulp.src('src/main.mycss' ) .pipe(stylus()) .pipe(rename({ ext : 'css' })) .pipe(autoprefixer()) .pipe(cssmin()) .pipe(header( '/* All Right Reserved */' )) .pipe(gulp.dest( 'dist'))

  86. GULP Configuration in Gulpfile.js

  87. GULP gulpfile.js structure 3 parts: - task loading - task configuration - task registration

  88. GULP

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend