SlideShare uma empresa Scribd logo
1 de 21
Java Script – MVVM & TDD
Itzik Saban
Itzik.saban@picscout.com
Agenda
•Demonstration of TDD importance
•Quick Intro to MVVM & Knockout.js
•Quick Intro to jasmine
•Example
•Practicing
TDD Importance
TDD importance
Possible points of failure:
• Changes in UI logics
• Renaming
• Merges
• Wrong syntax
• etc.
Introduction to MVVM
Introduction to MVVM
Bad code for testing:
Introduction to MVVM
Good code for testing:
Introduction to MVVM
Model-View-ViewModel
Introduction to MVVM
Model-View-ViewModel
• The model is a set of one or more
json objects, usually representing
entities in the domain.
Introduction to MVVM
Model-View-ViewModel
Introduction to MVVM
Model-View-ViewModel
• The view is actually the html itself.
Introduction to MVVM
Model-View-ViewModel
Introduction to MVVM
Model-View-ViewModel
• The ViewModel is a javascript
object which is responsible to
handle the UI logics.
Introduction to MVVM
Model-View-ViewModel
Introduction to MVVM
Model
ViewModel
Binding
Mechanism
(Knockout.js)
View
Introduction to Knockout.js
Introduction to Knockout.js
TextBox
HTML:
ViewModel:
Introduction to Knockout.js
ComboBox
HTML:
ViewModel:
Introduction to Knockout.js
Button
HTML:
ViewModel:
Introduction to jasmine
Introduction to jasmin

Mais conteúdo relacionado

Mais procurados

What the heck is a Umbraco property editor value converter?
What the heck is a Umbraco property editor value converter?What the heck is a Umbraco property editor value converter?
What the heck is a Umbraco property editor value converter?
Jeavon Leopold
 

Mais procurados (20)

Node.js primer
Node.js primerNode.js primer
Node.js primer
 
Async js
Async jsAsync js
Async js
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
 
Get MEAN! Node.js and the MEAN stack
Get MEAN!  Node.js and the MEAN stackGet MEAN!  Node.js and the MEAN stack
Get MEAN! Node.js and the MEAN stack
 
Knock out Introduction with samples (jsfiddle.net)
Knock out Introduction with samples (jsfiddle.net)Knock out Introduction with samples (jsfiddle.net)
Knock out Introduction with samples (jsfiddle.net)
 
What the heck is a Umbraco property editor value converter?
What the heck is a Umbraco property editor value converter?What the heck is a Umbraco property editor value converter?
What the heck is a Umbraco property editor value converter?
 
What is node.js
What is node.jsWhat is node.js
What is node.js
 
Mean PPT
Mean PPTMean PPT
Mean PPT
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
 
Introduction to mean stack
Introduction to mean stackIntroduction to mean stack
Introduction to mean stack
 
You know what iMEAN? Using MEAN stack for application dev on Informix
You know what iMEAN? Using MEAN stack for application dev on InformixYou know what iMEAN? Using MEAN stack for application dev on Informix
You know what iMEAN? Using MEAN stack for application dev on Informix
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
 
AS7
AS7AS7
AS7
 
Node, express & sails
Node, express & sailsNode, express & sails
Node, express & sails
 
Node.js with Express
Node.js with ExpressNode.js with Express
Node.js with Express
 
Rethinking The Policy Agent
Rethinking The Policy AgentRethinking The Policy Agent
Rethinking The Policy Agent
 
Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...
Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...
Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...
 
JBoss Wise: breaking barriers to WS testing
JBoss Wise: breaking barriers to WS testingJBoss Wise: breaking barriers to WS testing
JBoss Wise: breaking barriers to WS testing
 
NodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJSNodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJS
 
Kickstarting Node.js Projects with Yeoman
Kickstarting Node.js Projects with YeomanKickstarting Node.js Projects with Yeoman
Kickstarting Node.js Projects with Yeoman
 

Destaque

טלפונים חכמים ואתם
טלפונים חכמים ואתםטלפונים חכמים ואתם
טלפונים חכמים ואתם
Idan ofek
 
מכתב המלצה - לירן פרידמן
מכתב המלצה - לירן פרידמןמכתב המלצה - לירן פרידמן
מכתב המלצה - לירן פרידמן
Liran Fridman
 

Destaque (20)

Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
 
Scala does the Catwalk
Scala does the CatwalkScala does the Catwalk
Scala does the Catwalk
 
Elasticsearch na prática
Elasticsearch na práticaElasticsearch na prática
Elasticsearch na prática
 
HagayOnn_EnglishCV_ 2016
HagayOnn_EnglishCV_ 2016HagayOnn_EnglishCV_ 2016
HagayOnn_EnglishCV_ 2016
 
Not your dad's h base new
Not your dad's h base newNot your dad's h base new
Not your dad's h base new
 
What's the Magic in LinkedIn?
What's the Magic in LinkedIn?What's the Magic in LinkedIn?
What's the Magic in LinkedIn?
 
Scrum. software engineering seminar
Scrum. software engineering seminarScrum. software engineering seminar
Scrum. software engineering seminar
 
Storm at Forter
Storm at ForterStorm at Forter
Storm at Forter
 
טלפונים חכמים ואתם
טלפונים חכמים ואתםטלפונים חכמים ואתם
טלפונים חכמים ואתם
 
Joy of scala
Joy of scalaJoy of scala
Joy of scala
 
Guice - dependency injection framework
Guice - dependency injection frameworkGuice - dependency injection framework
Guice - dependency injection framework
 
1953 and all that. A tale of two sciences (Kitcher, 1984)
1953 and all that. A tale of two sciences (Kitcher, 1984)1953 and all that. A tale of two sciences (Kitcher, 1984)
1953 and all that. A tale of two sciences (Kitcher, 1984)
 
How does the Internet Work?
How does the Internet Work?How does the Internet Work?
How does the Internet Work?
 
מכתב המלצה - לירן פרידמן
מכתב המלצה - לירן פרידמןמכתב המלצה - לירן פרידמן
מכתב המלצה - לירן פרידמן
 
Lessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGLLessons Learned with Unity and WebGL
Lessons Learned with Unity and WebGL
 
How fast ist it really? Benchmarking in practice
How fast ist it really? Benchmarking in practiceHow fast ist it really? Benchmarking in practice
How fast ist it really? Benchmarking in practice
 
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
 
Optimizing DevOps strategy in a large enterprise
Optimizing DevOps strategy in a large enterpriseOptimizing DevOps strategy in a large enterprise
Optimizing DevOps strategy in a large enterprise
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Work-for-hire Game Studios: Elevate Your Game
Work-for-hire Game Studios: Elevate Your GameWork-for-hire Game Studios: Elevate Your Game
Work-for-hire Game Studios: Elevate Your Game
 

Semelhante a JavaScript TDD

Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8
Gill Cleeren
 
Knockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockoutKnockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockout
Andoni Arroyo
 
Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernate
bwullems
 
Lightweight webdev
Lightweight webdevLightweight webdev
Lightweight webdev
damianofusco
 

Semelhante a JavaScript TDD (20)

Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
MVVM - Model View ViewModel
MVVM - Model View ViewModelMVVM - Model View ViewModel
MVVM - Model View ViewModel
 
Adopting MVVM
Adopting MVVMAdopting MVVM
Adopting MVVM
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
Aspnet mvc
Aspnet mvcAspnet mvc
Aspnet mvc
 
MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
 
Angular JS lecture
Angular JS lectureAngular JS lecture
Angular JS lecture
 
Knockout js session
Knockout js sessionKnockout js session
Knockout js session
 
Prism library and MVVM
Prism library and MVVMPrism library and MVVM
Prism library and MVVM
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8
 
MVVM and Prism
MVVM and PrismMVVM and Prism
MVVM and Prism
 
Building single page applications with angular.js
Building single page applications with angular.jsBuilding single page applications with angular.js
Building single page applications with angular.js
 
What is ASP.NET MVC
What is ASP.NET MVCWhat is ASP.NET MVC
What is ASP.NET MVC
 
MVVM frameworks
MVVM frameworksMVVM frameworks
MVVM frameworks
 
Knockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockoutKnockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockout
 
Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernate
 
Spa with angular
Spa with angularSpa with angular
Spa with angular
 
Lightweight webdev
Lightweight webdevLightweight webdev
Lightweight webdev
 
"AngularJS - juče, danas, sutra" by Bogdan Gavrilović
"AngularJS - juče, danas, sutra" by Bogdan Gavrilović"AngularJS - juče, danas, sutra" by Bogdan Gavrilović
"AngularJS - juče, danas, sutra" by Bogdan Gavrilović
 
Introduce MVVM & How to implement it in your iOS app
Introduce MVVM & How to implement it in your iOS appIntroduce MVVM & How to implement it in your iOS app
Introduce MVVM & How to implement it in your iOS app
 

Mais de Uri Lavi (9)

Intro to Mahout
Intro to MahoutIntro to Mahout
Intro to Mahout
 
API Best Practices
API Best PracticesAPI Best Practices
API Best Practices
 
Web Performance 101
Web Performance 101Web Performance 101
Web Performance 101
 
Cloud Aware Architecture
Cloud Aware ArchitectureCloud Aware Architecture
Cloud Aware Architecture
 
Software craftsmanship - 4
Software craftsmanship - 4Software craftsmanship - 4
Software craftsmanship - 4
 
Software Craftsmanship - 3
Software Craftsmanship - 3Software Craftsmanship - 3
Software Craftsmanship - 3
 
Software Craftsmanship - 2
Software Craftsmanship - 2Software Craftsmanship - 2
Software Craftsmanship - 2
 
Software Craftsmanship - 1 Meeting
Software Craftsmanship - 1 MeetingSoftware Craftsmanship - 1 Meeting
Software Craftsmanship - 1 Meeting
 
Effective Code Review
Effective Code ReviewEffective Code Review
Effective Code Review
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

JavaScript TDD

Notas do Editor

  1. This can be achieved by using an MV{X} pattern.