Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

JavaScript TDD

937 views

Published on

Software Craftsmanship in Israel meeting.
JavaScript and TDD

Published in: Technology
  • Be the first to comment

  • Be the first to like this

JavaScript TDD

  1. 1. Java Script – MVVM & TDDItzik SabanItzik.saban@picscout.com
  2. 2. Agenda•Demonstration of TDD importance•Quick Intro to MVVM & Knockout.js•Quick Intro to jasmine•Example•Practicing
  3. 3. TDD Importance
  4. 4. TDD importancePossible points of failure:• Changes in UI logics• Renaming• Merges• Wrong syntax• etc.
  5. 5. Introduction to MVVM
  6. 6. Introduction to MVVMBad code for testing:
  7. 7. Introduction to MVVMGood code for testing:
  8. 8. Introduction to MVVMModel-View-ViewModel
  9. 9. Introduction to MVVMModel-View-ViewModel• The model is a set of one or morejson objects, usually representingentities in the domain.
  10. 10. Introduction to MVVMModel-View-ViewModel
  11. 11. Introduction to MVVMModel-View-ViewModel• The view is actually the html itself.
  12. 12. Introduction to MVVMModel-View-ViewModel
  13. 13. Introduction to MVVMModel-View-ViewModel• The ViewModel is a javascriptobject which is responsible tohandle the UI logics.
  14. 14. Introduction to MVVMModel-View-ViewModel
  15. 15. Introduction to MVVMModelViewModelBindingMechanism(Knockout.js)View
  16. 16. Introduction to Knockout.js
  17. 17. Introduction to Knockout.jsTextBoxHTML:ViewModel:
  18. 18. Introduction to Knockout.jsComboBoxHTML:ViewModel:
  19. 19. Introduction to Knockout.jsButtonHTML:ViewModel:
  20. 20. Introduction to jasmine
  21. 21. Introduction to jasmin

×