SlideShare a Scribd company logo
Building Databound
JavaScript Apps with
KnockoutJS
Jason Beres
Sr VP, Developer Tools, Infragistics
@jasonberes / jasonb@Infragistics.com
Nishanth Anil
Technical Evangelist, Infragistics
@nishanil
Tom Puglisi
Technical Evangelist, Infragistics
tomp@Infragistics.com
• Introduction to MVVM
• MVVM in WPF – recap!
• MVVM in JavaScript
• Enterprise dashboards using HTML5/jQuery
• Q&A
Agenda
Intro to
MVVM
The MVVM Pattern
• Model-View View-Model
• Software architectural design pattern
• Emerged in the 2005 timeframe to support the declarative data binding features of
WPF / XAML
Benefits
• Developer/Designer Collaboration without Conflict - Since the UI is void of any
non-visual code such as business logic, the team’s designer can confidently work
on modifying the code without worrying about breaking the programmer’s code.
• Testable Code - Decoupling the view from the view model enables us to write
clean unit tests.
• Code Maintainability - Testable, decoupled code is easier to maintain. A bug can
be found much more easily if there is only one place to inspect.
WPF/SL MVVM Demo
JavaScript
then, now, & forever!
JavaScript MV* F/Ws
MVVM in
JavaScript
Introducing KnockoutJS
• Knockout is an open source JavaScript library that enables MVVM applications by
implementing binding
• Properties in the Model classes are of type ko.observable
• Observables in JavaScript notify subscribers of property changes
• Supports all major browsers
6+ 2+
Comparing JavaScript to WPF
Runtime
CLR - XAML Binding
Business Logic
C#
Presentation
XAML
Window
Runtime
Browser - Knockout
Business Logic
JS
Presentation
HTML
Page
Step 1: Reference KO in the View
<script type="text/javascript" src="../scripts/ko/knockout-
2.1.0.js"></script>
Step 2: Associate the View Model with the View
<script>
$(document).ready(function () {
// Instantiate the CustomerViewModel model and apply bindings
var customerViewModel = new CustomerViewModel();
ko.applyBindings(customerViewModel);});
</script>
Step 3: Define Declarative Bindings in the View
<div id="ListMenu" >
<ul data-bind="foreach: customers">
<div>
<img width='100' height='100' align='middle' style='padding:5px'
data-bind="attr: { src: pictureURL }"></img>
<a style='font-size:15pt;cursor:pointer;color:#067EBF'
data-bind="text: fullName "></a>
</div>
</ul>
</div>
Understanding Bindings
• Bindings are declared in the visual element mark-up by using the data-bind
attribute.
• These bindings are associated with view model properties that are known as
observables.
• Observables are properties that will automatically issue notifications whenever
their value changes.
function CustomerViewModel() {
var self = this;
// Properties
self.customers = ko.observableArray();
Knockout Bindings
• foreach: Lets you iterate through a loop and apply the same markup to each item
in the list. This is used to render the to-do lists and to-do items. Within the
foreach, the bindings are applied to the elements of the list.
• visible: Used to toggle visibility. Hide markup when a collection is empty, or make
the error message visible.
• value: Used to populate form values.
• click: Binds a click event to a function on the view model.
Knockout & jQuery
• Not a jQuery competitor, Knockout solves a different problem!
• Will work together!
KnockoutJS Demo
Enterprise dashboards using
HTML5/jQuery?
The World’s Most Adva
JavaScript & HTML5
UI Framework
Cross-Platform Web
Development
Build standards-based, touch-enabled HTML5 & jQuery experiences for desktop, tablet &
mobile delivery, including multi-device targeting with frameworks like PhoneGap and MVC.
• HTML5, CSS3, jQuery based toolkit
• Pure Client-Side Performance
• jQuery Core + jQuery Mobile Library
• Theme Roller + CSS3 Support
• Touch Everywhere
• Support for MVC2, MVC3, MVC4
KnockOutJS
• Flat, Hierachical, OLAP Pivot Grids
• High performance charting controls
• Geospatial mapping
• Mobile UI controls, Adaptive CSS
Demo: Ignite UI – KnockoutJS
Resources
• Knockout & MVVM Step by Step - http://www.developer-
tech.com/news/2012/dec/13/knockoutjs-mvvm-framework-jquery-developers/
• Building Enterprise dashboards in Ignite UI -
http://www.infragistics.com/products/jquery
Thank You!
Jason Beres
Sr VP, Developer Tools, Infragistics
@jasonberes / jasonb@Infragistics.com
Nishanth Anil
Technical Evangelist, Infragistics
@nishanil

More Related Content

What's hot

Mvc fundamental
Mvc fundamentalMvc fundamental
Mvc fundamental
Nguyễn Thành Phát
 
Comparative analysis of java script framework
Comparative analysis of java script frameworkComparative analysis of java script framework
Comparative analysis of java script framework
Nishant Kumar
 
MSDN - ASP.NET MVC
MSDN - ASP.NET MVCMSDN - ASP.NET MVC
MSDN - ASP.NET MVC
Maarten Balliauw
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
Wayne Tun Myint
 
Itroducing Angular JS
Itroducing Angular JSItroducing Angular JS
Itroducing Angular JS
Carlos Emanuel Mathiasen
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework
Camilo Lopes
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
Sirwan Afifi
 
iOS architecture patterns
iOS architecture patternsiOS architecture patterns
iOS architecture patterns
allanh0526
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentationMaslowB
 
ASP.NET MVC 3
ASP.NET MVC 3ASP.NET MVC 3
ASP.NET MVC 3
Buu Nguyen
 
Angular js up & running
Angular js up & runningAngular js up & running
Angular js up & running
Junaid Baloch
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
Ni
 
Inside Wijmo 5, a Large-scale JavaScript Product
Inside Wijmo 5, a Large-scale JavaScript ProductInside Wijmo 5, a Large-scale JavaScript Product
Inside Wijmo 5, a Large-scale JavaScript Product
Chris Bannon
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
Emily Bauman
 
Knockout js
Knockout jsKnockout js
Knockout js
shobokshi
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
M R Rony
 
Module2
Module2Module2
Module2
Hoàng Lê
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
naral
 
Common iOS Architecture: From MVC to VIPER, with Redux
Common iOS Architecture: From MVC to VIPER, with ReduxCommon iOS Architecture: From MVC to VIPER, with Redux
Common iOS Architecture: From MVC to VIPER, with Redux
Nelson Tai
 

What's hot (20)

Mvc fundamental
Mvc fundamentalMvc fundamental
Mvc fundamental
 
Comparative analysis of java script framework
Comparative analysis of java script frameworkComparative analysis of java script framework
Comparative analysis of java script framework
 
MSDN - ASP.NET MVC
MSDN - ASP.NET MVCMSDN - ASP.NET MVC
MSDN - ASP.NET MVC
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
 
Itroducing Angular JS
Itroducing Angular JSItroducing Angular JS
Itroducing Angular JS
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
iOS architecture patterns
iOS architecture patternsiOS architecture patterns
iOS architecture patterns
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentation
 
ASP.NET MVC 3
ASP.NET MVC 3ASP.NET MVC 3
ASP.NET MVC 3
 
Angular js up & running
Angular js up & runningAngular js up & running
Angular js up & running
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 
Inside Wijmo 5, a Large-scale JavaScript Product
Inside Wijmo 5, a Large-scale JavaScript ProductInside Wijmo 5, a Large-scale JavaScript Product
Inside Wijmo 5, a Large-scale JavaScript Product
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
 
Knockout js
Knockout jsKnockout js
Knockout js
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
 
Module2
Module2Module2
Module2
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
 
Common iOS Architecture: From MVC to VIPER, with Redux
Common iOS Architecture: From MVC to VIPER, with ReduxCommon iOS Architecture: From MVC to VIPER, with Redux
Common iOS Architecture: From MVC to VIPER, with Redux
 

Viewers also liked

Herramientas tic
Herramientas ticHerramientas tic
Herramientas tic
Ronal Diaz Muñoz
 
שווי חברתי של לקוח
שווי חברתי של לקוחשווי חברתי של לקוח
שווי חברתי של לקוח
btob2013
 
TGIF – May, 15 2015 - Have a Bannnnaaanaaa weekend!
TGIF – May, 15 2015 - Have a Bannnnaaanaaa weekend!TGIF – May, 15 2015 - Have a Bannnnaaanaaa weekend!
TGIF – May, 15 2015 - Have a Bannnnaaanaaa weekend!
Reflet Communication
 
TGIF - 2013 - Semaine 07
TGIF - 2013 - Semaine 07TGIF - 2013 - Semaine 07
TGIF - 2013 - Semaine 07
Reflet Communication
 
ushas anatomy notes
ushas anatomy notesushas anatomy notes
ushas anatomy notesakilboby
 

Viewers also liked (6)

Herramientas tic
Herramientas ticHerramientas tic
Herramientas tic
 
שווי חברתי של לקוח
שווי חברתי של לקוחשווי חברתי של לקוח
שווי חברתי של לקוח
 
WP 018 - EcoRessource - WQT e
WP 018 - EcoRessource - WQT eWP 018 - EcoRessource - WQT e
WP 018 - EcoRessource - WQT e
 
TGIF – May, 15 2015 - Have a Bannnnaaanaaa weekend!
TGIF – May, 15 2015 - Have a Bannnnaaanaaa weekend!TGIF – May, 15 2015 - Have a Bannnnaaanaaa weekend!
TGIF – May, 15 2015 - Have a Bannnnaaanaaa weekend!
 
TGIF - 2013 - Semaine 07
TGIF - 2013 - Semaine 07TGIF - 2013 - Semaine 07
TGIF - 2013 - Semaine 07
 
ushas anatomy notes
ushas anatomy notesushas anatomy notes
ushas anatomy notes
 

Similar to Building databound JavaScript apps with Knockoutjs

Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
Betclic Everest Group Tech Team
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
Qamar Abbas
 
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 knockoutAndoni Arroyo
 
A Smooth Transition to HTML5
A Smooth Transition to HTML5A Smooth Transition to HTML5
A Smooth Transition to HTML5
Chris Bannon
 
MVVM for Modern Applications
MVVM for Modern ApplicationsMVVM for Modern Applications
MVVM for Modern Applications
Jeremy Likness
 
Building mvvm & single pageapps in js
Building mvvm & single pageapps in jsBuilding mvvm & single pageapps in js
Building mvvm & single pageapps in jsNish Anil
 
Adopting MVVM
Adopting MVVMAdopting MVVM
Adopting MVVM
John Cumming
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVM
Andrei Popa
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVM
Boulos Dib
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET Webskills
Caleb Jenkins
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
Abhishek Sur
 
Android MVVM
Android MVVMAndroid MVVM
How to Build Composite Applications with PRISM
How to Build Composite Applications with PRISMHow to Build Composite Applications with PRISM
How to Build Composite Applications with PRISM
DataLeader.io
 
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
RapidValue
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
Senthil Kumar
 
Porting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidancePorting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application Guidance
Our Community Exchange LLC
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Gill Cleeren
 
AngularJS is awesome
AngularJS is awesomeAngularJS is awesome
AngularJS is awesome
Eusebiu Schipor
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
RajkumarJangid7
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
Premkumar M
 

Similar to Building databound JavaScript apps with Knockoutjs (20)

Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
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
 
A Smooth Transition to HTML5
A Smooth Transition to HTML5A Smooth Transition to HTML5
A Smooth Transition to HTML5
 
MVVM for Modern Applications
MVVM for Modern ApplicationsMVVM for Modern Applications
MVVM for Modern Applications
 
Building mvvm & single pageapps in js
Building mvvm & single pageapps in jsBuilding mvvm & single pageapps in js
Building mvvm & single pageapps in js
 
Adopting MVVM
Adopting MVVMAdopting MVVM
Adopting MVVM
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVM
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVM
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET Webskills
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Android MVVM
Android MVVMAndroid MVVM
Android MVVM
 
How to Build Composite Applications with PRISM
How to Build Composite Applications with PRISMHow to Build Composite Applications with PRISM
How to Build Composite Applications with PRISM
 
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
Porting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidancePorting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application Guidance
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8
 
AngularJS is awesome
AngularJS is awesomeAngularJS is awesome
AngularJS is awesome
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
 

More from Nish Anil

[MobConf] Go mobile with C#, Visual Studio & Xamarin
[MobConf] Go mobile with C#, Visual Studio & Xamarin[MobConf] Go mobile with C#, Visual Studio & Xamarin
[MobConf] Go mobile with C#, Visual Studio & Xamarin
Nish Anil
 
[MobConf] Programming wearables in c#
[MobConf] Programming wearables in c#[MobConf] Programming wearables in c#
[MobConf] Programming wearables in c#
Nish Anil
 
APAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsAPAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.Forms
Nish Anil
 
[Bdotnet] Cloud connected mobile apps
[Bdotnet] Cloud connected mobile apps[Bdotnet] Cloud connected mobile apps
[Bdotnet] Cloud connected mobile apps
Nish Anil
 
Evolve recap XHackers, Bangalore
Evolve recap XHackers, BangaloreEvolve recap XHackers, Bangalore
Evolve recap XHackers, Bangalore
Nish Anil
 
iOS & Android Dev in C# & Visual Studio using Xamarin
iOS & Android Dev in C# & Visual Studio using XamariniOS & Android Dev in C# & Visual Studio using Xamarin
iOS & Android Dev in C# & Visual Studio using Xamarin
Nish Anil
 
Using mvvm on the web using knockoutjs & ignite ui
Using mvvm on the web using knockoutjs & ignite uiUsing mvvm on the web using knockoutjs & ignite ui
Using mvvm on the web using knockoutjs & ignite uiNish Anil
 
Infragistics: Getting Started with MVVM in WPF & Silverlight
Infragistics: Getting Started with MVVM in WPF & SilverlightInfragistics: Getting Started with MVVM in WPF & Silverlight
Infragistics: Getting Started with MVVM in WPF & Silverlight
Nish Anil
 

More from Nish Anil (8)

[MobConf] Go mobile with C#, Visual Studio & Xamarin
[MobConf] Go mobile with C#, Visual Studio & Xamarin[MobConf] Go mobile with C#, Visual Studio & Xamarin
[MobConf] Go mobile with C#, Visual Studio & Xamarin
 
[MobConf] Programming wearables in c#
[MobConf] Programming wearables in c#[MobConf] Programming wearables in c#
[MobConf] Programming wearables in c#
 
APAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsAPAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.Forms
 
[Bdotnet] Cloud connected mobile apps
[Bdotnet] Cloud connected mobile apps[Bdotnet] Cloud connected mobile apps
[Bdotnet] Cloud connected mobile apps
 
Evolve recap XHackers, Bangalore
Evolve recap XHackers, BangaloreEvolve recap XHackers, Bangalore
Evolve recap XHackers, Bangalore
 
iOS & Android Dev in C# & Visual Studio using Xamarin
iOS & Android Dev in C# & Visual Studio using XamariniOS & Android Dev in C# & Visual Studio using Xamarin
iOS & Android Dev in C# & Visual Studio using Xamarin
 
Using mvvm on the web using knockoutjs & ignite ui
Using mvvm on the web using knockoutjs & ignite uiUsing mvvm on the web using knockoutjs & ignite ui
Using mvvm on the web using knockoutjs & ignite ui
 
Infragistics: Getting Started with MVVM in WPF & Silverlight
Infragistics: Getting Started with MVVM in WPF & SilverlightInfragistics: Getting Started with MVVM in WPF & Silverlight
Infragistics: Getting Started with MVVM in WPF & Silverlight
 

Recently uploaded

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 

Recently uploaded (20)

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 

Building databound JavaScript apps with Knockoutjs

  • 1. Building Databound JavaScript Apps with KnockoutJS Jason Beres Sr VP, Developer Tools, Infragistics @jasonberes / jasonb@Infragistics.com Nishanth Anil Technical Evangelist, Infragistics @nishanil Tom Puglisi Technical Evangelist, Infragistics tomp@Infragistics.com
  • 2. • Introduction to MVVM • MVVM in WPF – recap! • MVVM in JavaScript • Enterprise dashboards using HTML5/jQuery • Q&A Agenda
  • 4. The MVVM Pattern • Model-View View-Model • Software architectural design pattern • Emerged in the 2005 timeframe to support the declarative data binding features of WPF / XAML
  • 5. Benefits • Developer/Designer Collaboration without Conflict - Since the UI is void of any non-visual code such as business logic, the team’s designer can confidently work on modifying the code without worrying about breaking the programmer’s code. • Testable Code - Decoupling the view from the view model enables us to write clean unit tests. • Code Maintainability - Testable, decoupled code is easier to maintain. A bug can be found much more easily if there is only one place to inspect.
  • 10. Introducing KnockoutJS • Knockout is an open source JavaScript library that enables MVVM applications by implementing binding • Properties in the Model classes are of type ko.observable • Observables in JavaScript notify subscribers of property changes • Supports all major browsers 6+ 2+
  • 11. Comparing JavaScript to WPF Runtime CLR - XAML Binding Business Logic C# Presentation XAML Window Runtime Browser - Knockout Business Logic JS Presentation HTML Page
  • 12. Step 1: Reference KO in the View <script type="text/javascript" src="../scripts/ko/knockout- 2.1.0.js"></script>
  • 13. Step 2: Associate the View Model with the View <script> $(document).ready(function () { // Instantiate the CustomerViewModel model and apply bindings var customerViewModel = new CustomerViewModel(); ko.applyBindings(customerViewModel);}); </script>
  • 14. Step 3: Define Declarative Bindings in the View <div id="ListMenu" > <ul data-bind="foreach: customers"> <div> <img width='100' height='100' align='middle' style='padding:5px' data-bind="attr: { src: pictureURL }"></img> <a style='font-size:15pt;cursor:pointer;color:#067EBF' data-bind="text: fullName "></a> </div> </ul> </div>
  • 15. Understanding Bindings • Bindings are declared in the visual element mark-up by using the data-bind attribute. • These bindings are associated with view model properties that are known as observables. • Observables are properties that will automatically issue notifications whenever their value changes. function CustomerViewModel() { var self = this; // Properties self.customers = ko.observableArray();
  • 16. Knockout Bindings • foreach: Lets you iterate through a loop and apply the same markup to each item in the list. This is used to render the to-do lists and to-do items. Within the foreach, the bindings are applied to the elements of the list. • visible: Used to toggle visibility. Hide markup when a collection is empty, or make the error message visible. • value: Used to populate form values. • click: Binds a click event to a function on the view model.
  • 17. Knockout & jQuery • Not a jQuery competitor, Knockout solves a different problem! • Will work together!
  • 20. The World’s Most Adva JavaScript & HTML5 UI Framework
  • 21. Cross-Platform Web Development Build standards-based, touch-enabled HTML5 & jQuery experiences for desktop, tablet & mobile delivery, including multi-device targeting with frameworks like PhoneGap and MVC. • HTML5, CSS3, jQuery based toolkit • Pure Client-Side Performance • jQuery Core + jQuery Mobile Library • Theme Roller + CSS3 Support • Touch Everywhere • Support for MVC2, MVC3, MVC4 KnockOutJS • Flat, Hierachical, OLAP Pivot Grids • High performance charting controls • Geospatial mapping • Mobile UI controls, Adaptive CSS
  • 22. Demo: Ignite UI – KnockoutJS
  • 23. Resources • Knockout & MVVM Step by Step - http://www.developer- tech.com/news/2012/dec/13/knockoutjs-mvvm-framework-jquery-developers/ • Building Enterprise dashboards in Ignite UI - http://www.infragistics.com/products/jquery
  • 24. Thank You! Jason Beres Sr VP, Developer Tools, Infragistics @jasonberes / jasonb@Infragistics.com Nishanth Anil Technical Evangelist, Infragistics @nishanil