SlideShare a Scribd company logo
Harnessing jQuery Templates and Data Linkto build dynamic data-driven browser appsBoris Moore
jQuery Templates and Data Linking todayjQuery Templates:https://github.com/jquery/jquery-tmplOfficial plugin – to be ‘owned’ by jQuery UI teamjQuery Data Linkhttps://github.com/jquery/jquery-datalinkMajor revision under wayMoving towards full integration with templatesPreview at end of presentation
What do you use templates for?Harness data, and easily build rich, maintainable, responsive, interactive browser apps…Why? (scenarios)Examples:Movies sampleImage OrganizerSample Viewer
Scenarios using data and templatesRead-only rendering (you may not ‘own’ the data)Data from JSON or JSONP servicesPlus interactivityDifferent views of dataNavigation through dataInteractive dynamic UI is driven by data too. (App state…)Special case: Interactive client apps with local data onlyYou own the dataData from serverMay do initial rendering on server (server-side templates?)Opens the way to progressive enhancement/unobtrusive JavaScriptRound-tripping of dataNow the UI is not just to navigate data,  but  also to modify data and send changes back to server
Drill-down of current features:What you need for read-only rendering…Demos:Rendering Templates: .tmpl();Tags: Content: ${}, {{html}}, {{if}}, {{else}}, {{each}}Javascript in templates: ExpressionsFunctionsTags: Composition{{tmpl}}, {{wrap}}
Drill-down of current features:Adding interactivityDemos:.tmplItem()Accordionplus {{tmpl}} tagRecursive Tree Viewplus {{wrap}} tagTabs view
jQuery Templates tomorrowWhat people wantLessAPI to return HTML as stringRendering performanceSmallMoreInteractivity with less code to writeContextData linkingResponsive UI Client-side user experienceInteractive performanceEditable data with direct binding to templated UIRemote templatesMore features - index, isLast, default values…
Answer – give ‘less’: JQuery Templates ‘core’….render() – returns HTML string:No built-in interactivity support No .tmplItemNo data linkingNo DOM dependencyPure string concatenationCould run on serverAll the same template tags and same JavaScript expression support…FasterSmaller$( "#movieList" ).html(     $( "#movieTemplate" ).render( movies ););
 … and give ‘more’: JQuery Templates ‘interactive views’ (JsViews)Full data link: object or html <-> object or htmlPass in map(s) as options – drill into objects through path, and html through selectorsOr just handle callbackOr use declarative data linkingand…
 … and give ‘more’: JQuery Templates ‘interactive views’ (JsViews)Integrates jQuery templates and Data Link:‘Activates’ template-rendered content: views, and ‘sub-views’(was tmplItem)Observable objects and arrays: Views (tmplItems) “listen” to observable changes on the data!$( "#movieList" ).html(     $( "#movieTemplate" ).render( movies );).dataLink( movies );var index = $.view( element ).index;function setMovieTitle( index ) {    $.setField( movies[index], "Title", "NewTitle" );}function deleteLastMovie() {    $.changeArray( movies, "pop" );}
Preview of less and more: Data Link plus Templates (JsViews)Preview code at https://github.com/borismoore/jsviewsDemos:Less: Render StringSimple insertion in DOM or rendering from serverMore: Data Linked Master-DetailData Linking between objectsMore: DataLink - Templates IntegrationDeclarative data linkingEditable data, for roundtripping
ReferencesjQuery Templates:https://github.com/jquery/jquery-tmpl/ JsViews:https://github.com/borismoore/jsviews/Blog	http://www.borismoore.com/
Ad

More Related Content

What's hot (20)

Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012
livelogos
 
Levent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerLevent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & Polymer
Erik Isaksen
 
Rapid Testing, Rapid Development
Rapid Testing, Rapid DevelopmentRapid Testing, Rapid Development
Rapid Testing, Rapid Development
mennovanslooten
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery Mobile
ejlp12
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slow
dmethvin
 
jQueryTO: State of jQuery March 2013
jQueryTO: State of jQuery March 2013jQueryTO: State of jQuery March 2013
jQueryTO: State of jQuery March 2013
dmethvin
 
A brave new web - A talk about Web Components
A brave new web - A talk about Web ComponentsA brave new web - A talk about Web Components
A brave new web - A talk about Web Components
Michiel De Mey
 
React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix
Chen Lerner
 
CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11
virtualsciences41
 
jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014
dmethvin
 
CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
Zoe Gillenwater
 
Handlebars and Require.js
Handlebars and Require.jsHandlebars and Require.js
Handlebars and Require.js
Ivano Malavolta
 
jQuery Conference Toronto
jQuery Conference TorontojQuery Conference Toronto
jQuery Conference Toronto
dmethvin
 
Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Edition
bensmithett
 
Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap
Rakesh Jha
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
bensmithett
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
Rich Bradshaw
 
Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012
livelogos
 
Levent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerLevent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & Polymer
Erik Isaksen
 
Rapid Testing, Rapid Development
Rapid Testing, Rapid DevelopmentRapid Testing, Rapid Development
Rapid Testing, Rapid Development
mennovanslooten
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery Mobile
ejlp12
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slow
dmethvin
 
jQueryTO: State of jQuery March 2013
jQueryTO: State of jQuery March 2013jQueryTO: State of jQuery March 2013
jQueryTO: State of jQuery March 2013
dmethvin
 
A brave new web - A talk about Web Components
A brave new web - A talk about Web ComponentsA brave new web - A talk about Web Components
A brave new web - A talk about Web Components
Michiel De Mey
 
React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix React basic by Yoav Amit, Wix
React basic by Yoav Amit, Wix
Chen Lerner
 
CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11
virtualsciences41
 
jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014
dmethvin
 
CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
Zoe Gillenwater
 
Handlebars and Require.js
Handlebars and Require.jsHandlebars and Require.js
Handlebars and Require.js
Ivano Malavolta
 
jQuery Conference Toronto
jQuery Conference TorontojQuery Conference Toronto
jQuery Conference Toronto
dmethvin
 
Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Edition
bensmithett
 
Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap
Rakesh Jha
 
Styling components with JavaScript
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
bensmithett
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
Rich Bradshaw
 

Similar to Harness jQuery Templates and Data Link (20)

Workshop supermodel munich
Workshop supermodel munichWorkshop supermodel munich
Workshop supermodel munich
Sonja Madsen
 
CCCDjango2010.pdf
CCCDjango2010.pdfCCCDjango2010.pdf
CCCDjango2010.pdf
jayarao21
 
(Ebook) Practical Web Development by kan
(Ebook) Practical Web Development  by kan(Ebook) Practical Web Development  by kan
(Ebook) Practical Web Development by kan
bopakipawira
 
Approaches to mobile site development
Approaches to mobile site developmentApproaches to mobile site development
Approaches to mobile site development
Erik Mitchell
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
Igor Moochnick
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
Muhammad Nasr
 
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnitWriting and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Alex Chaffee
 
Spsmi13 charts
Spsmi13 chartsSpsmi13 charts
Spsmi13 charts
Derek Gusoff
 
Practical Web Development 1st Edition Wellens Paul 2024 scribd download
Practical Web Development 1st Edition Wellens Paul 2024 scribd downloadPractical Web Development 1st Edition Wellens Paul 2024 scribd download
Practical Web Development 1st Edition Wellens Paul 2024 scribd download
boilaashrul
 
MVC
MVCMVC
MVC
akshin
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
Ivano Malavolta
 
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!
Roberto Messora
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
Robert J. Stein
 
Drupal as a data server
Drupal as a data serverDrupal as a data server
Drupal as a data server
Jay Friendly
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
Flavius-Radu Demian
 
Pablo Villalba -
Pablo Villalba - Pablo Villalba -
Pablo Villalba -
.toster
 
Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4
Boston Area SharePoint Users Group
 
HTML5 data attributes
HTML5 data attributes HTML5 data attributes
HTML5 data attributes
Lennart Schoors
 
Backbone JS for mobile apps
Backbone JS for mobile appsBackbone JS for mobile apps
Backbone JS for mobile apps
Ivano Malavolta
 
web development 7.pptx
web development 7.pptxweb development 7.pptx
web development 7.pptx
harshit762481
 
Workshop supermodel munich
Workshop supermodel munichWorkshop supermodel munich
Workshop supermodel munich
Sonja Madsen
 
CCCDjango2010.pdf
CCCDjango2010.pdfCCCDjango2010.pdf
CCCDjango2010.pdf
jayarao21
 
(Ebook) Practical Web Development by kan
(Ebook) Practical Web Development  by kan(Ebook) Practical Web Development  by kan
(Ebook) Practical Web Development by kan
bopakipawira
 
Approaches to mobile site development
Approaches to mobile site developmentApproaches to mobile site development
Approaches to mobile site development
Erik Mitchell
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
Igor Moochnick
 
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnitWriting and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Writing and Testing JavaScript-heavy Web 2.0 apps with JSUnit
Alex Chaffee
 
Practical Web Development 1st Edition Wellens Paul 2024 scribd download
Practical Web Development 1st Edition Wellens Paul 2024 scribd downloadPractical Web Development 1st Edition Wellens Paul 2024 scribd download
Practical Web Development 1st Edition Wellens Paul 2024 scribd download
boilaashrul
 
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!
Roberto Messora
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
Robert J. Stein
 
Drupal as a data server
Drupal as a data serverDrupal as a data server
Drupal as a data server
Jay Friendly
 
Pablo Villalba -
Pablo Villalba - Pablo Villalba -
Pablo Villalba -
.toster
 
Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4
Boston Area SharePoint Users Group
 
Backbone JS for mobile apps
Backbone JS for mobile appsBackbone JS for mobile apps
Backbone JS for mobile apps
Ivano Malavolta
 
web development 7.pptx
web development 7.pptxweb development 7.pptx
web development 7.pptx
harshit762481
 
Ad

Recently uploaded (20)

Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Ad

Harness jQuery Templates and Data Link

  • 1. Harnessing jQuery Templates and Data Linkto build dynamic data-driven browser appsBoris Moore
  • 2. jQuery Templates and Data Linking todayjQuery Templates:https://github.com/jquery/jquery-tmplOfficial plugin – to be ‘owned’ by jQuery UI teamjQuery Data Linkhttps://github.com/jquery/jquery-datalinkMajor revision under wayMoving towards full integration with templatesPreview at end of presentation
  • 3. What do you use templates for?Harness data, and easily build rich, maintainable, responsive, interactive browser apps…Why? (scenarios)Examples:Movies sampleImage OrganizerSample Viewer
  • 4. Scenarios using data and templatesRead-only rendering (you may not ‘own’ the data)Data from JSON or JSONP servicesPlus interactivityDifferent views of dataNavigation through dataInteractive dynamic UI is driven by data too. (App state…)Special case: Interactive client apps with local data onlyYou own the dataData from serverMay do initial rendering on server (server-side templates?)Opens the way to progressive enhancement/unobtrusive JavaScriptRound-tripping of dataNow the UI is not just to navigate data, but also to modify data and send changes back to server
  • 5. Drill-down of current features:What you need for read-only rendering…Demos:Rendering Templates: .tmpl();Tags: Content: ${}, {{html}}, {{if}}, {{else}}, {{each}}Javascript in templates: ExpressionsFunctionsTags: Composition{{tmpl}}, {{wrap}}
  • 6. Drill-down of current features:Adding interactivityDemos:.tmplItem()Accordionplus {{tmpl}} tagRecursive Tree Viewplus {{wrap}} tagTabs view
  • 7. jQuery Templates tomorrowWhat people wantLessAPI to return HTML as stringRendering performanceSmallMoreInteractivity with less code to writeContextData linkingResponsive UI Client-side user experienceInteractive performanceEditable data with direct binding to templated UIRemote templatesMore features - index, isLast, default values…
  • 8. Answer – give ‘less’: JQuery Templates ‘core’….render() – returns HTML string:No built-in interactivity support No .tmplItemNo data linkingNo DOM dependencyPure string concatenationCould run on serverAll the same template tags and same JavaScript expression support…FasterSmaller$( "#movieList" ).html( $( "#movieTemplate" ).render( movies ););
  • 9. … and give ‘more’: JQuery Templates ‘interactive views’ (JsViews)Full data link: object or html <-> object or htmlPass in map(s) as options – drill into objects through path, and html through selectorsOr just handle callbackOr use declarative data linkingand…
  • 10. … and give ‘more’: JQuery Templates ‘interactive views’ (JsViews)Integrates jQuery templates and Data Link:‘Activates’ template-rendered content: views, and ‘sub-views’(was tmplItem)Observable objects and arrays: Views (tmplItems) “listen” to observable changes on the data!$( "#movieList" ).html( $( "#movieTemplate" ).render( movies );).dataLink( movies );var index = $.view( element ).index;function setMovieTitle( index ) { $.setField( movies[index], "Title", "NewTitle" );}function deleteLastMovie() { $.changeArray( movies, "pop" );}
  • 11. Preview of less and more: Data Link plus Templates (JsViews)Preview code at https://github.com/borismoore/jsviewsDemos:Less: Render StringSimple insertion in DOM or rendering from serverMore: Data Linked Master-DetailData Linking between objectsMore: DataLink - Templates IntegrationDeclarative data linkingEditable data, for roundtripping