SlideShare a Scribd company logo
1 of 15
Agenda
 What is Knockout.js (KO) ?
 Benefits
 Model View View Model (MVVM)
 Key Features Of KO
 Code Time
 Disadvantages
 References
Page : 2Object Edge Inc
What is Knockout.js ?
Knockout is a JavaScript library that helps you to create
rich, responsive display and user interactive interfaces.
Developed and maintained by Steve Sanderson, a
Microsoft employee In July 5, 2010.
Jquery Vs Knockout
Based on Model-View-View Model pattern
Object Edge Inc Page : 3
Benefits
 Free, open source
 Pure JavaScript (works with any web framework)
 Small & lightweight (40kb minified & 13kb after Zipping)
 No dependencies
 Supports all mainstream browsers (IE6+, FF2+ and
others)
 Fully documented
 Can be used for existing Website
Object Edge Inc Page : 4
MVVM
 Model - Domain Data (e.g. Database Server)
 View – User Interface (HTML)
 View Model
Object Edge Inc Page : 5
Key Features Of KO
 Declarative Bindings : connect data to UI
 Automatic UI Refresh
 Dependency Tracking (using observables)
 Templating
Object Edge Inc Page : 6
Observables / Properties
1. data-bind attributes in HTML
2.ko.observable() - the properties
3.ko.applyBindings() to activate bindings
Example :
<div data-bind="text: message"> </div>
var viewModel = {
message: ko.observable('Welcome')
}
Object Edge Inc Page : 7
Code Time
Object Edge Inc Page : 8
Two Way Binding
Object Edge Inc Page : 9
Declarative Bindings
 Types of binding available :
 Controlling text and appearance :
 visible, text, html, css, style, attr
 Control Flow Statements :
 Foreach, if, ifnot
 Template Binding :
 Native templating, String-based templating
Object Edge Inc Page : 10
Continue ..
Form fields binding
 Value Binding
 Click binding
 Event Binding
 Submit Binding
 Enable Binding
 Disable Binding
 Checked Binding
 Options Binding
 SelectedOptions
Binding
Object Edge Inc Page : 11
Observables
1.Observable
2.Computed Observables
this.fullName = ko.computed(function() {
return this.firstName() + " " + this.lastName();
}, this);
3.Observable Arrays
this.shoppingCart = ko.observableArray([
new Product("Beer", 10.99),
new Product("Brats", 7.99),
new Product("Buns", 1.49)]);
ADD : this.shoppingCart.push(new Product("More Beer", 10.99));
REMOVE : this.shoppingCart.remove(product);
Object Edge Inc Page : 12
Disadvantages
1.Hard to use templates on external files – hard to co-
work
2.Ko is only for two way binding so need to use other
tool or library for other needs.
3.Sometimes hard to debug.
4.Learning curve : Binding Expressions
5.Multiple view models with annoying amount of
similarity
Object Edge Inc Page : 13
References
http://knockoutjs.com/
https://www.tutorialspoint.com/knockoutjs/
https://code.tutsplus.com/categories/knockoutjs
https://www.youtube.com/watch?v=yC9Lt6hTIUE&list=PLo
80fWiInSIONI-Al0iVvq9NNWllM0RrT
Object Edge Inc Page : 14
Any Questions ?
Object Edge Inc Page : 15
Thank You
Object Edge Inc Page : 16

More Related Content

What's hot

2011 - jQuery + SharePoint (TechEd)
2011 - jQuery + SharePoint (TechEd)2011 - jQuery + SharePoint (TechEd)
2011 - jQuery + SharePoint (TechEd)Chris O'Connor
 
Streaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.comStreaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.comMongoDB
 
Knockoutjs Part 4 Bindings Controlling text and appearance
Knockoutjs Part 4  Bindings  Controlling text and appearanceKnockoutjs Part 4  Bindings  Controlling text and appearance
Knockoutjs Part 4 Bindings Controlling text and appearanceBhaumik Patel
 
Introduction to j query
Introduction to j queryIntroduction to j query
Introduction to j querythewarlog
 

What's hot (7)

Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
 
Knockout.js
Knockout.jsKnockout.js
Knockout.js
 
2011 - jQuery + SharePoint (TechEd)
2011 - jQuery + SharePoint (TechEd)2011 - jQuery + SharePoint (TechEd)
2011 - jQuery + SharePoint (TechEd)
 
Streaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.comStreaming Data Pipelines with MongoDB and Kafka at ao.com
Streaming Data Pipelines with MongoDB and Kafka at ao.com
 
Knockoutjs Part 4 Bindings Controlling text and appearance
Knockoutjs Part 4  Bindings  Controlling text and appearanceKnockoutjs Part 4  Bindings  Controlling text and appearance
Knockoutjs Part 4 Bindings Controlling text and appearance
 
handout-05b
handout-05bhandout-05b
handout-05b
 
Introduction to j query
Introduction to j queryIntroduction to j query
Introduction to j query
 

Similar to KO Agenda Overview Benefits Features

Knockoutjs databinding
Knockoutjs databindingKnockoutjs databinding
Knockoutjs databindingBoulos Dib
 
Bringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJSBringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJSBoyan Mihaylov
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationMark Gu
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overviewmdc11
 
The Theory Of The Dom
The Theory Of The DomThe Theory Of The Dom
The Theory Of The Domkaven yan
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NETsalonityagi
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 
Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 
What's New for AJAX Developers in IE8 Beta1?
What's New for AJAX Developers in IE8 Beta1?What's New for AJAX Developers in IE8 Beta1?
What's New for AJAX Developers in IE8 Beta1?Janakiram MSV
 
Building Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and SalesforceBuilding Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and SalesforceRaymond Gao
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWAREFIWARE
 
Knockout Advanced Concepts By Surekha Gadkari
Knockout Advanced Concepts By Surekha GadkariKnockout Advanced Concepts By Surekha Gadkari
Knockout Advanced Concepts By Surekha GadkariSurekha Gadkari
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Jonas Follesø
 
SharePoint Mobile App Development with Xmarin
SharePoint Mobile App Development with XmarinSharePoint Mobile App Development with Xmarin
SharePoint Mobile App Development with XmarinHector Luciano Jr
 
Knockout mvvm-m1-slides
Knockout mvvm-m1-slidesKnockout mvvm-m1-slides
Knockout mvvm-m1-slidesMasterCode.vn
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 

Similar to KO Agenda Overview Benefits Features (20)

Knockoutjs databinding
Knockoutjs databindingKnockoutjs databinding
Knockoutjs databinding
 
Bringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJSBringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJS
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
 
Knockoutjs
KnockoutjsKnockoutjs
Knockoutjs
 
Edge of the Web
Edge of the WebEdge of the Web
Edge of the Web
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overview
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
The Theory Of The Dom
The Theory Of The DomThe Theory Of The Dom
The Theory Of The Dom
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 
Web app and more
Web app and moreWeb app and more
Web app and more
 
What's New for AJAX Developers in IE8 Beta1?
What's New for AJAX Developers in IE8 Beta1?What's New for AJAX Developers in IE8 Beta1?
What's New for AJAX Developers in IE8 Beta1?
 
Building Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and SalesforceBuilding Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and Salesforce
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
Knockout Advanced Concepts By Surekha Gadkari
Knockout Advanced Concepts By Surekha GadkariKnockout Advanced Concepts By Surekha Gadkari
Knockout Advanced Concepts By Surekha Gadkari
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
SharePoint Mobile App Development with Xmarin
SharePoint Mobile App Development with XmarinSharePoint Mobile App Development with Xmarin
SharePoint Mobile App Development with Xmarin
 
Knockout mvvm-m1-slides
Knockout mvvm-m1-slidesKnockout mvvm-m1-slides
Knockout mvvm-m1-slides
 
Knockoutjs
KnockoutjsKnockoutjs
Knockoutjs
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

KO Agenda Overview Benefits Features

  • 1. Agenda  What is Knockout.js (KO) ?  Benefits  Model View View Model (MVVM)  Key Features Of KO  Code Time  Disadvantages  References Page : 2Object Edge Inc
  • 2. What is Knockout.js ? Knockout is a JavaScript library that helps you to create rich, responsive display and user interactive interfaces. Developed and maintained by Steve Sanderson, a Microsoft employee In July 5, 2010. Jquery Vs Knockout Based on Model-View-View Model pattern Object Edge Inc Page : 3
  • 3. Benefits  Free, open source  Pure JavaScript (works with any web framework)  Small & lightweight (40kb minified & 13kb after Zipping)  No dependencies  Supports all mainstream browsers (IE6+, FF2+ and others)  Fully documented  Can be used for existing Website Object Edge Inc Page : 4
  • 4. MVVM  Model - Domain Data (e.g. Database Server)  View – User Interface (HTML)  View Model Object Edge Inc Page : 5
  • 5. Key Features Of KO  Declarative Bindings : connect data to UI  Automatic UI Refresh  Dependency Tracking (using observables)  Templating Object Edge Inc Page : 6
  • 6. Observables / Properties 1. data-bind attributes in HTML 2.ko.observable() - the properties 3.ko.applyBindings() to activate bindings Example : <div data-bind="text: message"> </div> var viewModel = { message: ko.observable('Welcome') } Object Edge Inc Page : 7
  • 7. Code Time Object Edge Inc Page : 8
  • 8. Two Way Binding Object Edge Inc Page : 9
  • 9. Declarative Bindings  Types of binding available :  Controlling text and appearance :  visible, text, html, css, style, attr  Control Flow Statements :  Foreach, if, ifnot  Template Binding :  Native templating, String-based templating Object Edge Inc Page : 10
  • 10. Continue .. Form fields binding  Value Binding  Click binding  Event Binding  Submit Binding  Enable Binding  Disable Binding  Checked Binding  Options Binding  SelectedOptions Binding Object Edge Inc Page : 11
  • 11. Observables 1.Observable 2.Computed Observables this.fullName = ko.computed(function() { return this.firstName() + " " + this.lastName(); }, this); 3.Observable Arrays this.shoppingCart = ko.observableArray([ new Product("Beer", 10.99), new Product("Brats", 7.99), new Product("Buns", 1.49)]); ADD : this.shoppingCart.push(new Product("More Beer", 10.99)); REMOVE : this.shoppingCart.remove(product); Object Edge Inc Page : 12
  • 12. Disadvantages 1.Hard to use templates on external files – hard to co- work 2.Ko is only for two way binding so need to use other tool or library for other needs. 3.Sometimes hard to debug. 4.Learning curve : Binding Expressions 5.Multiple view models with annoying amount of similarity Object Edge Inc Page : 13
  • 14. Any Questions ? Object Edge Inc Page : 15
  • 15. Thank You Object Edge Inc Page : 16