SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
BTE101: Yes, you can use
those modern frameworks
for mobile Domino®
development
Theo Heselmans, Xceed / Engage
About myself
▪ Doing IBM® Notes® Development &

Project Mgt. for over 20 years!
▪ Independent consultant since 2001 for Xceed
▪ Coordinator of Engage (BLUG) past 6 years
▪ IBM® Champion since 2011
@theoheselmans
▪ My 20th Lotusphere, 1st time speaker
▪ Head in the sand for too long
▪ Discovering there's a big world out there,

and it's cool
▪ I like wine and other beverages too
What this IS about
▪ IBM® Notes/Domino® as the ultimate CMS
▪ Building Responsive Hybrid Websites & Mobile Apps
▪ Real live implementations of a few Frameworks/Libraries
▪ Lessons learned
▪ A free Notes CMS database for you to experiment with

Let's have a quick look at it
The Domino 'Stack'
▪ IBM Notes & Domino is a cool 'Stack'
– Powerful (no-SQL) database
– Top-notch security
– Domino Access Service (DAS) for RESTful interfaces
– Flexible development platform
– Great Notes Client
– Proven and out of the box solution (but not free vs open source solutions)
HTML5 / CSS3 Development
▪ HTML5 is stable, powerful and broadly supported
▪ CSS3 is very flexible
▪ Mobile apps are easy to create and test
– Android Chrome & iOS Safari remote debugging is a godsend
– Chrome's Device Mode is brilliant
▪ Off line use of your apps is possible using Manifest & localStorage
▪ Turning HTML5 websites into Apps is possible
– e.g. PhoneGap or Appcelerator Titanium
What's a Framework / Library
▪ My Definition:

Any set of CSS and/or JS code

that do the dirty work for you
– Deal with cross-browser issues
– Responsive & mobile first design in mind
– Reusable components
– HTML - design - code - navigation - data
UI
Architecture
DOM▪ Layered schema:
– UI - Architecture - DOM
– Design - MVC - Supporting libs
Requirements
▪ Frameworks
– As much tailored to your (current) needs
as possible
– Well documented
– Well maintained
– Broadly used
– If MVC: REST support

see John Dalsgaard REST services
▪ Your Skills
– HTML(5)
– CSS(3)
– JavaScript
– REST / JSON
– Notes:
– Formula language
– LotusScript
– XPages
– Domino Access Service
Bootstrap
▪ A Front-End framework

Bootstrap is a free collection of tools for creating websites and web applications.

It contains HTML and CSS-based design templates for grids, typography, forms, buttons,

navigation and other interface components, as well as optional JavaScript extensions
▪ Examples & Demo:
– Countries
– EY: Topics
– Engage: website
▪ Screenshots and HTML
▪ The Good & the Bad
▪ Bootstrap getbootstrap.com
Bootstrap: Basic HTML (Part 1)
<!DOCTYPE HTML><html>
<head>
<title>ConnectED 2015</title>
<link rel="stylesheet" href="/mydb.nsf/css/bootstrap.min.css">
</head>
<body>
Bootstrap: Basic HTML (Part 2)
<!-- Fixed navbar -->
<nav id="nav" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/mydb.nsf/">ConnectED 2015</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="/mydb.nsf/pages/-home">Home</a></li>
<li><a href="/mydb.nsf/pages/bootstrapabout">About</a></li>
</ul>
</div>
</div>
</nav>
Bootstrap: Basic HTML (Part 3)
<!-- Begin page content -->
<div class="container">
Main Content goes here
</div>
<!-- Bootstrap & JQuery core JavaScript -->
<script src="/mydb.nsf/js/jquery-1.11.1.min.js"></script>
<script src="/mydb.nsf/js/bootstrap.min.js"></script>
</body>
</html>
Bootstrap: the good and the bad
▪ The Bad
– Broadly used
– Not an MVC model: only UI
▪ The Good
– August 2010: Twitter released Bootstrap
as open source.
– GitHub: over 75,000 stars

and more than 28,000 forks
– Regular updates: current version 3.3.2
– Many interface components
– Excellent documentation, and many
templates
– Easy to get started and implement
– Broadly used ▪ Tip: Bootstrap for XPages
Ratchet.js
▪ A Front-End framework

Ratchet.js is used to build mobile apps with simple HTML‚ CSS‚ and JS components
▪ Examples & Demo:
– Countries
– Kemin Industries: Lysoforte
▪ Why I changed my mind!
▪ Screenshots and HTML
▪ The Good & the Bad
▪ Ratchet.js goratchet.com
Ratchet.js: Basic HTML (Part 1)
<!DOCTYPE HTML><html>
<head>
<title>ConnectED 2015</title>
<!-- Include the compiled Ratchet CSS -->
<link href="/mydb.nsf/css/ratchet.min.css" rel="stylesheet">
<!-- Include the compiled Ratchet JS-->
<script src="/mydb.nsf/js/ratchet.min.js"></script>
</head>
<body>
Ratchet.js: Basic HTML (Part 2)
<header class="bar bar-nav">
<a class="icon icon-home pull-left" href="#"></a>
<a class="icon icon-compose pull-right"></a>
<a href="#myNavbar">
<h1 class="title">Welcome to Ratchet</h1>
</a>
</header>
<!-- Wrap all non-bar HTML in the .content div (this is actually what scrolls) -->
<div class="content">
Main Content here
</div>
Ratchet.js: Basic HTML (Part 3)
<nav class="bar bar-tab">
<a class="tab-item" href="home">
<span class="icon icon-home"></span><span class="tab-label">Home</span>
</a>
<a class="tab-item" href="about">
<span class="icon icon-person"></span><span class="tab-label">About</span>
</a>
<a class="tab-item" href="countries">
<span class="icon icon-list"></span><span class="tab-label">Countries</span>
</a>
</nav>
</body>
</html>
Ratchet.js: the good and the bad
▪ The Good
– GitHub: over 10,000 stars

and more than 1,000 forks
– Easy to implement
– Separate themes for Android and
iOS
– All basic mobile User Interface
components
– Nice documentation
▪ The Bad
– Relatively young (early 2013)
– Limited number of supported
browsers

- Android: default and Chrome

- iOS: Safari
– Only touch support: difficult to test in
desktop browsers
– Intercepts links
– Not an MVC model: only UI
Backbone.js
▪ A JavaScript library

Backbone.js is a JavaScript library with a RESTful JSON interface

and is based on the model–view–presenter (MVP) application design paradigm

(MVP is a derivative of the model–view–controller (MVC))
▪ Examples & Demo:
– Countries
– A major Navy: mSurvey
▪ Why I changed my mind!
▪ Screenshots, Code and HTML
▪ The Good & the Bad
▪ Backbone.js backbonejs.org
Model
Controller
View
Updates User Events
Events Updates
Backbone.js: Code (Part 1)
// MODEL
var Country = Backbone.Model;
// COLLECTION
var CountryCollection = Backbone.Collection.extend({
model: Country,
url: '../api/data/collections/name/countries?count=300' //use a view via DAS
});
Backbone.js: Code (Part 2)
//VIEW
var CountryView = Backbone.View.extend ({
el: '#countrydiv',
template: _.template($('#country-template').html()),
initialize: function () {
countryList.fetch({ //fetch the data
success: function() { //if successful, render them in the DOM
countryView.render(); }
})
},
render: function () { //render the countries using the template
this.$el.html(this.template({countries: countryList.models}));
return this; }
});
Backbone.js: Code (Part 3)
// RUN IT
var countryList = new CountryCollection(); //create the collection
var countryView = new CountryView(); //create the view
Backbone.js: HTML (Part 4)
<!-- Target DIV -->
<div id="#countrydiv></div>
<!-- Template -->
<script type="text/template" id="country-template">
<div class="table-responsive">
<table class="table table-striped">
<thead><tr><th>Country</th><th>Capital</th></tr></thead>
<tbody>
<% _.each(countries, function(Country) { %>
<tr>
<td><%= Country.get("country") %></td>
<td><%= Country.get("capital") %></td>
</tr>
<% }); %>
</tbody></table></div>
</script>
Backbone.js: the good and the bad
▪ The Good
– GitHub: over 20,000 stars

and more than 4,500 forks
– Good documentation
– Tiny in size (<7 kb)
– Nice integration with Underscore.js,

especially for templates
– Routing is easy
– Widely used
– REST support
▪ The Bad
– Totally different concept
– Steeper learning curve
– Decent knowledge of JS required
– No data binding
– MVC model only: no UI
Knockout.js
▪ A JavaScript Framework

Knockout is a standalone JavaScript implementation of the Model-View-ViewModel pattern

with templates. The underlying principles are therefore:

• a clear separation between domain data, view components and data to be displayed

• the presence of a clearly defined layer of specialized code

to manage the relationships between the view components
▪ Examples & Demo:
– Countries
– mSurvey
– Wine Tasting CRUD
▪ Screenshots, Code and HTML
▪ The Good & the Bad ▪ Knockout.js knockoutjs.com
Model
ViewModel
View
Data
Binding Commands
Knockout.js: Country Code VMMV (Part 1)
function AppViewModel() {

var self = this;

self.countries = ko.observableArray([]); //create empty observable Array



$.getJSON("../GetCountries?openagent", function(data) { //get JSON of all countries

self.countries(data);

});

self.continents = ... //removed the code to get the unique list of continents from the countries

self.filteredCountries = function(cont) { //function to get countries for 1 continent only

return ko.utils.arrayFilter(self.countries(), function(country) {

return (country.continent === cont);

});

};

}

ko.applyBindings(new AppViewModel());
Knockout.js: Country Code HTML (Part 2)
<!-- Tab panes content -->
<div class="tab-content"
data-bind="template: { name: 'continent-template', foreach: continents }">
</div>
Knockout.js: Country Code Templates (Part 3)
<script type="text/html" id="continent-template">

<div class="table-responsive">

<table class="table table-striped table-condensed">

<thead><tr><th>Country</th><th>Capital</th></tr></thead>

<tbody data-bind="template: { name: 'country-template',
foreach: $root.filteredCountries($data) }">
</tbody>

</table>

</div>

</script>


<script type="text/html" id="country-template">

<tr>
<td data-bind="text: country"></td><td data-bind="text: capital"></td>
</tr>

</script>
Knockout.js: Tasting Code
//trigger an AJAX request to get tastings when the main country selection changes

self.maincountry.subscribe( function(newValue) {

$.getJSON('../api/data/collections/name/tastings?count=50&keys=' + newValue,
function(data) {

var mappedTastings = $.map(data, function(item) { return new Tasting(item); });

self.tastings(mappedTastings);

});

});
//part of Saving Code: existing record, so update it (use patch, not post!)

self.saveTasting = function () {
$.ajax(thistasting.updatelink.href, {

data: ko.toJSON(thistasting), 

type: "patch", contentType: "application/json",

success: function(result) { void(0); }

});}
};

Knockout.js: the good and the bad
▪ The Good
– GitHub: close to 6,000 stars

and almost 1,000 forks
– Good documentation and

Interactive tutorials
– Data binding (including attributes)
– Automatic UI refresh
– Built-in Templating
– Mapping via plugin
– REST support
▪ The Bad
– Different concept
– Steeper learning curve
– Decent knowledge of JS required
– Routing not provided
– MVVM model only: no UI
A few interesting Links
▪ 12 Useful JavaScript Resources and Tools smashingapps.com
▪ 35 Best HTML5 Development Tools To Save Your Time smashingapps.com
▪ Javascript Frameworks Comparison:

Angular, Knockout, Ember and Backbone slideshare.net
▪ ToDoMVC (Helping you select an MV* framework) todomvc.com
▪ Rich JavaScript Applications (the 7 Frameworks) blog.stevensanderson.com
▪ Top 50 Developer Tools & Services of 2014 stackshare.io
Notices and Disclaimers
Copyright © 2015 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.
Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional
technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT
SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF
OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided.
Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice.
Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they
may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.
References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business.
Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational
purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation.
It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory
requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will
ensure that the customer is in compliance with any law.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this
publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES,
EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right.
IBM, the IBM logo, ibm.com, BrassRing®, Connections™, Domino®, Global Business Services®, Global Technology Services®, SmartCloud®, Social Business®, Kenexa®, Notes®, PartnerWorld®, Prove It!®,
PureSystems®, Sametime®, Verse™, Watson™, WebSphere®, Worklight®, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names
might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Ashoka-Profile
Ashoka-ProfileAshoka-Profile
Ashoka-Profile
 
Hack IBM Connections - Advance Use - Iframes & more...
Hack IBM Connections - Advance Use - Iframes & more...Hack IBM Connections - Advance Use - Iframes & more...
Hack IBM Connections - Advance Use - Iframes & more...
 
Front end development best practices
Front end development best practicesFront end development best practices
Front end development best practices
 
Community Builder 2.0: Using a new way to build Web-Apps
Community Builder 2.0:Using a new way to build Web-AppsCommunity Builder 2.0:Using a new way to build Web-Apps
Community Builder 2.0: Using a new way to build Web-Apps
 
RESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignRESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web Design
 
Custom Template for Joomla! 3
Custom Template for Joomla! 3Custom Template for Joomla! 3
Custom Template for Joomla! 3
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAs
 
IWMW 2002: Web standards briefing (session C2)
IWMW 2002: Web standards briefing (session C2)IWMW 2002: Web standards briefing (session C2)
IWMW 2002: Web standards briefing (session C2)
 
Mobilizing your Drupal Site - Vancouver League of Drupallers
Mobilizing your Drupal Site - Vancouver League of DrupallersMobilizing your Drupal Site - Vancouver League of Drupallers
Mobilizing your Drupal Site - Vancouver League of Drupallers
 
The Server Side of Responsive Web Design
The Server Side of Responsive Web DesignThe Server Side of Responsive Web Design
The Server Side of Responsive Web Design
 
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentEECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
 
HTML5 and Joomla! 2.5 Template
HTML5 and Joomla! 2.5 TemplateHTML5 and Joomla! 2.5 Template
HTML5 and Joomla! 2.5 Template
 
Building jQuery Mobile Web Apps
Building jQuery Mobile Web AppsBuilding jQuery Mobile Web Apps
Building jQuery Mobile Web Apps
 
Better Design Built Faster: Using New UI Technologies to Speed Development
Better Design Built Faster: Using New UI Technologies to Speed DevelopmentBetter Design Built Faster: Using New UI Technologies to Speed Development
Better Design Built Faster: Using New UI Technologies to Speed Development
 
Joomla Explained - As Easy as 1, 2, 3
Joomla Explained - As Easy as 1, 2, 3Joomla Explained - As Easy as 1, 2, 3
Joomla Explained - As Easy as 1, 2, 3
 
Using a CSS Framework
Using a CSS FrameworkUsing a CSS Framework
Using a CSS Framework
 
JavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and LibrariesJavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and Libraries
 
Front end developer responsibilities what does a front-end developer do?
Front end developer responsibilities  what does a front-end developer do?Front end developer responsibilities  what does a front-end developer do?
Front end developer responsibilities what does a front-end developer do?
 
Site Manager rocks!
Site Manager rocks!Site Manager rocks!
Site Manager rocks!
 

Andere mochten auch

Tipos y beneficios de las herramientas web 2.0 en la gerencia educativa
Tipos y beneficios de las herramientas web 2.0 en la gerencia educativaTipos y beneficios de las herramientas web 2.0 en la gerencia educativa
Tipos y beneficios de las herramientas web 2.0 en la gerencia educativa
Karina Rodriguez
 

Andere mochten auch (12)

Storyboard - Demons
Storyboard - DemonsStoryboard - Demons
Storyboard - Demons
 
08 - ACTIVIDAD - SLIDESHARE
08 - ACTIVIDAD - SLIDESHARE08 - ACTIVIDAD - SLIDESHARE
08 - ACTIVIDAD - SLIDESHARE
 
EE_Marshall_ZK
EE_Marshall_ZKEE_Marshall_ZK
EE_Marshall_ZK
 
Question 1
Question 1Question 1
Question 1
 
Tipos y beneficios de las herramientas web 2.0 en la gerencia educativa
Tipos y beneficios de las herramientas web 2.0 en la gerencia educativaTipos y beneficios de las herramientas web 2.0 en la gerencia educativa
Tipos y beneficios de las herramientas web 2.0 en la gerencia educativa
 
Demons - Storyboard
Demons - StoryboardDemons - Storyboard
Demons - Storyboard
 
Tip from ConnectED 2015: Best and Worst Practices Deploying IBM Connections
Tip from ConnectED 2015: Best and Worst Practices Deploying IBM ConnectionsTip from ConnectED 2015: Best and Worst Practices Deploying IBM Connections
Tip from ConnectED 2015: Best and Worst Practices Deploying IBM Connections
 
Social Media, Movements and Political Revolution
Social Media, Movements and Political Revolution Social Media, Movements and Political Revolution
Social Media, Movements and Political Revolution
 
Tip from ConnectED 2015: Using Bootstrap and Ratchet frameworks in Domino mob...
Tip from ConnectED 2015: Using Bootstrap and Ratchet frameworks in Domino mob...Tip from ConnectED 2015: Using Bootstrap and Ratchet frameworks in Domino mob...
Tip from ConnectED 2015: Using Bootstrap and Ratchet frameworks in Domino mob...
 
Tip from IBM Connect 2014: Extend Your Security into the Cloud with IBM Smart...
Tip from IBM Connect 2014: Extend Your Security into the Cloud with IBM Smart...Tip from IBM Connect 2014: Extend Your Security into the Cloud with IBM Smart...
Tip from IBM Connect 2014: Extend Your Security into the Cloud with IBM Smart...
 
Medios de transmision
Medios de transmisionMedios de transmision
Medios de transmision
 
цифровий звук
цифровий звукцифровий звук
цифровий звук
 

Ähnlich wie Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domino Apps!

Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Jeremy Likness
 
Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...
Lucas Jellema
 

Ähnlich wie Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domino Apps! (20)

The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
 
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachJDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
Building Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN StackBuilding Modern Web Apps with MEAN Stack
Building Modern Web Apps with MEAN Stack
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
Using Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino AppsUsing Cool New Frameworks in (Mobile) Domino Apps
Using Cool New Frameworks in (Mobile) Domino Apps
 
Meanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore ChandraMeanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore Chandra
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 

Mehr von SocialBiz UserGroup

Mehr von SocialBiz UserGroup (18)

Tip from ConnectED 2015: IBM Sametime - Design and Implementation of a Full H...
Tip from ConnectED 2015: IBM Sametime - Design and Implementation of a Full H...Tip from ConnectED 2015: IBM Sametime - Design and Implementation of a Full H...
Tip from ConnectED 2015: IBM Sametime - Design and Implementation of a Full H...
 
Tip from ConnectED 2015: An intro to IBM Security Directory Integrator for IB...
Tip from ConnectED 2015: An intro to IBM Security Directory Integrator for IB...Tip from ConnectED 2015: An intro to IBM Security Directory Integrator for IB...
Tip from ConnectED 2015: An intro to IBM Security Directory Integrator for IB...
 
Tip from ConnectED 2015: Mobile security roundup
Tip from ConnectED 2015: Mobile security roundupTip from ConnectED 2015: Mobile security roundup
Tip from ConnectED 2015: Mobile security roundup
 
Tip from ConnectED: Notes Goes Cloud: The IBM Notes Browser Plug-in Integrate...
Tip from ConnectED: Notes Goes Cloud: The IBM Notes Browser Plug-in Integrate...Tip from ConnectED: Notes Goes Cloud: The IBM Notes Browser Plug-in Integrate...
Tip from ConnectED: Notes Goes Cloud: The IBM Notes Browser Plug-in Integrate...
 
Tip from ConnectED 2015: Managing your Enterprise Data in the Cloud – Securit...
Tip from ConnectED 2015: Managing your Enterprise Data in the Cloud – Securit...Tip from ConnectED 2015: Managing your Enterprise Data in the Cloud – Securit...
Tip from ConnectED 2015: Managing your Enterprise Data in the Cloud – Securit...
 
Tip from ConnectED 2015: Considerations for the cloud
Tip from ConnectED 2015: Considerations for the cloudTip from ConnectED 2015: Considerations for the cloud
Tip from ConnectED 2015: Considerations for the cloud
 
Tip from IBM Connect 2014: Rapid XPages Developing Using the Application Layo...
Tip from IBM Connect 2014: Rapid XPages Developing Using the Application Layo...Tip from IBM Connect 2014: Rapid XPages Developing Using the Application Layo...
Tip from IBM Connect 2014: Rapid XPages Developing Using the Application Layo...
 
Tip from IBM Connect2014: XPages Accessibility
Tip from IBM Connect2014: XPages AccessibilityTip from IBM Connect2014: XPages Accessibility
Tip from IBM Connect2014: XPages Accessibility
 
Tip from IBM Connect 2014: New security features in IBM Domino 8.5.x-9.x
Tip from IBM Connect 2014: New security features in IBM Domino 8.5.x-9.xTip from IBM Connect 2014: New security features in IBM Domino 8.5.x-9.x
Tip from IBM Connect 2014: New security features in IBM Domino 8.5.x-9.x
 
Tip from IBM Connect 2014: Mobile security roundup
Tip from IBM Connect 2014: Mobile security roundupTip from IBM Connect 2014: Mobile security roundup
Tip from IBM Connect 2014: Mobile security roundup
 
Tip from IBM Connect 2014: Socialytics = Social Business, Big Social Data and...
Tip from IBM Connect 2014: Socialytics = Social Business, Big Social Data and...Tip from IBM Connect 2014: Socialytics = Social Business, Big Social Data and...
Tip from IBM Connect 2014: Socialytics = Social Business, Big Social Data and...
 
Tip from IBM Connect 2014: IBM Notes Goes Cloud: How GAD Created an Integrate...
Tip from IBM Connect 2014: IBM Notes Goes Cloud: How GAD Created an Integrate...Tip from IBM Connect 2014: IBM Notes Goes Cloud: How GAD Created an Integrate...
Tip from IBM Connect 2014: IBM Notes Goes Cloud: How GAD Created an Integrate...
 
Tip from IBM Connect 2014: Stepping into the Cloud and Evaluating Your Options
Tip from IBM Connect 2014: Stepping into the Cloud and Evaluating Your OptionsTip from IBM Connect 2014: Stepping into the Cloud and Evaluating Your Options
Tip from IBM Connect 2014: Stepping into the Cloud and Evaluating Your Options
 
Tip from IBM Connect 2014: What You Shouldn't Care About With Cloud, But Do A...
Tip from IBM Connect 2014: What You Shouldn't Care About With Cloud, But Do A...Tip from IBM Connect 2014: What You Shouldn't Care About With Cloud, But Do A...
Tip from IBM Connect 2014: What You Shouldn't Care About With Cloud, But Do A...
 
Tip from IBM Connect 2014: XPages Mobile Development in IBM Domino 9.0.1 and ...
Tip from IBM Connect 2014: XPages Mobile Development in IBM Domino 9.0.1 and ...Tip from IBM Connect 2014: XPages Mobile Development in IBM Domino 9.0.1 and ...
Tip from IBM Connect 2014: XPages Mobile Development in IBM Domino 9.0.1 and ...
 
Tip from IBM Connect 2014: IBM Domino 64-bit: All you need to know
Tip from IBM Connect 2014: IBM Domino 64-bit: All you need to knowTip from IBM Connect 2014: IBM Domino 64-bit: All you need to know
Tip from IBM Connect 2014: IBM Domino 64-bit: All you need to know
 
IBM Domino Designer: Tips and tricks for maximum productivity
IBM Domino Designer: Tips and tricks for maximum productivityIBM Domino Designer: Tips and tricks for maximum productivity
IBM Domino Designer: Tips and tricks for maximum productivity
 
I've Installed Connections Now What?
I've Installed Connections Now What?I've Installed Connections Now What?
I've Installed Connections Now What?
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
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
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domino Apps!

  • 1. BTE101: Yes, you can use those modern frameworks for mobile Domino® development Theo Heselmans, Xceed / Engage
  • 2. About myself ▪ Doing IBM® Notes® Development &
 Project Mgt. for over 20 years! ▪ Independent consultant since 2001 for Xceed ▪ Coordinator of Engage (BLUG) past 6 years ▪ IBM® Champion since 2011 @theoheselmans ▪ My 20th Lotusphere, 1st time speaker ▪ Head in the sand for too long ▪ Discovering there's a big world out there,
 and it's cool ▪ I like wine and other beverages too
  • 3. What this IS about ▪ IBM® Notes/Domino® as the ultimate CMS ▪ Building Responsive Hybrid Websites & Mobile Apps ▪ Real live implementations of a few Frameworks/Libraries ▪ Lessons learned ▪ A free Notes CMS database for you to experiment with
 Let's have a quick look at it
  • 4. The Domino 'Stack' ▪ IBM Notes & Domino is a cool 'Stack' – Powerful (no-SQL) database – Top-notch security – Domino Access Service (DAS) for RESTful interfaces – Flexible development platform – Great Notes Client – Proven and out of the box solution (but not free vs open source solutions)
  • 5. HTML5 / CSS3 Development ▪ HTML5 is stable, powerful and broadly supported ▪ CSS3 is very flexible ▪ Mobile apps are easy to create and test – Android Chrome & iOS Safari remote debugging is a godsend – Chrome's Device Mode is brilliant ▪ Off line use of your apps is possible using Manifest & localStorage ▪ Turning HTML5 websites into Apps is possible – e.g. PhoneGap or Appcelerator Titanium
  • 6. What's a Framework / Library ▪ My Definition:
 Any set of CSS and/or JS code
 that do the dirty work for you – Deal with cross-browser issues – Responsive & mobile first design in mind – Reusable components – HTML - design - code - navigation - data UI Architecture DOM▪ Layered schema: – UI - Architecture - DOM – Design - MVC - Supporting libs
  • 7. Requirements ▪ Frameworks – As much tailored to your (current) needs as possible – Well documented – Well maintained – Broadly used – If MVC: REST support
 see John Dalsgaard REST services ▪ Your Skills – HTML(5) – CSS(3) – JavaScript – REST / JSON – Notes: – Formula language – LotusScript – XPages – Domino Access Service
  • 8. Bootstrap ▪ A Front-End framework
 Bootstrap is a free collection of tools for creating websites and web applications.
 It contains HTML and CSS-based design templates for grids, typography, forms, buttons,
 navigation and other interface components, as well as optional JavaScript extensions ▪ Examples & Demo: – Countries – EY: Topics – Engage: website ▪ Screenshots and HTML ▪ The Good & the Bad ▪ Bootstrap getbootstrap.com
  • 9. Bootstrap: Basic HTML (Part 1) <!DOCTYPE HTML><html> <head> <title>ConnectED 2015</title> <link rel="stylesheet" href="/mydb.nsf/css/bootstrap.min.css"> </head> <body>
  • 10. Bootstrap: Basic HTML (Part 2) <!-- Fixed navbar --> <nav id="nav" class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span> </button> <a class="navbar-brand" href="/mydb.nsf/">ConnectED 2015</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav navbar-right"> <li><a href="/mydb.nsf/pages/-home">Home</a></li> <li><a href="/mydb.nsf/pages/bootstrapabout">About</a></li> </ul> </div> </div> </nav>
  • 11. Bootstrap: Basic HTML (Part 3) <!-- Begin page content --> <div class="container"> Main Content goes here </div> <!-- Bootstrap & JQuery core JavaScript --> <script src="/mydb.nsf/js/jquery-1.11.1.min.js"></script> <script src="/mydb.nsf/js/bootstrap.min.js"></script> </body> </html>
  • 12. Bootstrap: the good and the bad ▪ The Bad – Broadly used – Not an MVC model: only UI ▪ The Good – August 2010: Twitter released Bootstrap as open source. – GitHub: over 75,000 stars
 and more than 28,000 forks – Regular updates: current version 3.3.2 – Many interface components – Excellent documentation, and many templates – Easy to get started and implement – Broadly used ▪ Tip: Bootstrap for XPages
  • 13. Ratchet.js ▪ A Front-End framework
 Ratchet.js is used to build mobile apps with simple HTML‚ CSS‚ and JS components ▪ Examples & Demo: – Countries – Kemin Industries: Lysoforte ▪ Why I changed my mind! ▪ Screenshots and HTML ▪ The Good & the Bad ▪ Ratchet.js goratchet.com
  • 14. Ratchet.js: Basic HTML (Part 1) <!DOCTYPE HTML><html> <head> <title>ConnectED 2015</title> <!-- Include the compiled Ratchet CSS --> <link href="/mydb.nsf/css/ratchet.min.css" rel="stylesheet"> <!-- Include the compiled Ratchet JS--> <script src="/mydb.nsf/js/ratchet.min.js"></script> </head> <body>
  • 15. Ratchet.js: Basic HTML (Part 2) <header class="bar bar-nav"> <a class="icon icon-home pull-left" href="#"></a> <a class="icon icon-compose pull-right"></a> <a href="#myNavbar"> <h1 class="title">Welcome to Ratchet</h1> </a> </header> <!-- Wrap all non-bar HTML in the .content div (this is actually what scrolls) --> <div class="content"> Main Content here </div>
  • 16. Ratchet.js: Basic HTML (Part 3) <nav class="bar bar-tab"> <a class="tab-item" href="home"> <span class="icon icon-home"></span><span class="tab-label">Home</span> </a> <a class="tab-item" href="about"> <span class="icon icon-person"></span><span class="tab-label">About</span> </a> <a class="tab-item" href="countries"> <span class="icon icon-list"></span><span class="tab-label">Countries</span> </a> </nav> </body> </html>
  • 17. Ratchet.js: the good and the bad ▪ The Good – GitHub: over 10,000 stars
 and more than 1,000 forks – Easy to implement – Separate themes for Android and iOS – All basic mobile User Interface components – Nice documentation ▪ The Bad – Relatively young (early 2013) – Limited number of supported browsers
 - Android: default and Chrome
 - iOS: Safari – Only touch support: difficult to test in desktop browsers – Intercepts links – Not an MVC model: only UI
  • 18. Backbone.js ▪ A JavaScript library
 Backbone.js is a JavaScript library with a RESTful JSON interface
 and is based on the model–view–presenter (MVP) application design paradigm
 (MVP is a derivative of the model–view–controller (MVC)) ▪ Examples & Demo: – Countries – A major Navy: mSurvey ▪ Why I changed my mind! ▪ Screenshots, Code and HTML ▪ The Good & the Bad ▪ Backbone.js backbonejs.org Model Controller View Updates User Events Events Updates
  • 19. Backbone.js: Code (Part 1) // MODEL var Country = Backbone.Model; // COLLECTION var CountryCollection = Backbone.Collection.extend({ model: Country, url: '../api/data/collections/name/countries?count=300' //use a view via DAS });
  • 20. Backbone.js: Code (Part 2) //VIEW var CountryView = Backbone.View.extend ({ el: '#countrydiv', template: _.template($('#country-template').html()), initialize: function () { countryList.fetch({ //fetch the data success: function() { //if successful, render them in the DOM countryView.render(); } }) }, render: function () { //render the countries using the template this.$el.html(this.template({countries: countryList.models})); return this; } });
  • 21. Backbone.js: Code (Part 3) // RUN IT var countryList = new CountryCollection(); //create the collection var countryView = new CountryView(); //create the view
  • 22. Backbone.js: HTML (Part 4) <!-- Target DIV --> <div id="#countrydiv></div> <!-- Template --> <script type="text/template" id="country-template"> <div class="table-responsive"> <table class="table table-striped"> <thead><tr><th>Country</th><th>Capital</th></tr></thead> <tbody> <% _.each(countries, function(Country) { %> <tr> <td><%= Country.get("country") %></td> <td><%= Country.get("capital") %></td> </tr> <% }); %> </tbody></table></div> </script>
  • 23. Backbone.js: the good and the bad ▪ The Good – GitHub: over 20,000 stars
 and more than 4,500 forks – Good documentation – Tiny in size (<7 kb) – Nice integration with Underscore.js,
 especially for templates – Routing is easy – Widely used – REST support ▪ The Bad – Totally different concept – Steeper learning curve – Decent knowledge of JS required – No data binding – MVC model only: no UI
  • 24. Knockout.js ▪ A JavaScript Framework
 Knockout is a standalone JavaScript implementation of the Model-View-ViewModel pattern
 with templates. The underlying principles are therefore:
 • a clear separation between domain data, view components and data to be displayed
 • the presence of a clearly defined layer of specialized code
 to manage the relationships between the view components ▪ Examples & Demo: – Countries – mSurvey – Wine Tasting CRUD ▪ Screenshots, Code and HTML ▪ The Good & the Bad ▪ Knockout.js knockoutjs.com Model ViewModel View Data Binding Commands
  • 25. Knockout.js: Country Code VMMV (Part 1) function AppViewModel() {
 var self = this;
 self.countries = ko.observableArray([]); //create empty observable Array
 
 $.getJSON("../GetCountries?openagent", function(data) { //get JSON of all countries
 self.countries(data);
 });
 self.continents = ... //removed the code to get the unique list of continents from the countries
 self.filteredCountries = function(cont) { //function to get countries for 1 continent only
 return ko.utils.arrayFilter(self.countries(), function(country) {
 return (country.continent === cont);
 });
 };
 }
 ko.applyBindings(new AppViewModel());
  • 26. Knockout.js: Country Code HTML (Part 2) <!-- Tab panes content --> <div class="tab-content" data-bind="template: { name: 'continent-template', foreach: continents }"> </div>
  • 27. Knockout.js: Country Code Templates (Part 3) <script type="text/html" id="continent-template">
 <div class="table-responsive">
 <table class="table table-striped table-condensed">
 <thead><tr><th>Country</th><th>Capital</th></tr></thead>
 <tbody data-bind="template: { name: 'country-template', foreach: $root.filteredCountries($data) }"> </tbody>
 </table>
 </div>
 </script> 
 <script type="text/html" id="country-template">
 <tr> <td data-bind="text: country"></td><td data-bind="text: capital"></td> </tr>
 </script>
  • 28. Knockout.js: Tasting Code //trigger an AJAX request to get tastings when the main country selection changes
 self.maincountry.subscribe( function(newValue) {
 $.getJSON('../api/data/collections/name/tastings?count=50&keys=' + newValue, function(data) {
 var mappedTastings = $.map(data, function(item) { return new Tasting(item); });
 self.tastings(mappedTastings);
 });
 }); //part of Saving Code: existing record, so update it (use patch, not post!)
 self.saveTasting = function () { $.ajax(thistasting.updatelink.href, {
 data: ko.toJSON(thistasting), 
 type: "patch", contentType: "application/json",
 success: function(result) { void(0); }
 });} };

  • 29. Knockout.js: the good and the bad ▪ The Good – GitHub: close to 6,000 stars
 and almost 1,000 forks – Good documentation and
 Interactive tutorials – Data binding (including attributes) – Automatic UI refresh – Built-in Templating – Mapping via plugin – REST support ▪ The Bad – Different concept – Steeper learning curve – Decent knowledge of JS required – Routing not provided – MVVM model only: no UI
  • 30. A few interesting Links ▪ 12 Useful JavaScript Resources and Tools smashingapps.com ▪ 35 Best HTML5 Development Tools To Save Your Time smashingapps.com ▪ Javascript Frameworks Comparison:
 Angular, Knockout, Ember and Backbone slideshare.net ▪ ToDoMVC (Helping you select an MV* framework) todomvc.com ▪ Rich JavaScript Applications (the 7 Frameworks) blog.stevensanderson.com ▪ Top 50 Developer Tools & Services of 2014 stackshare.io
  • 31. Notices and Disclaimers Copyright © 2015 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM. Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided. Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice. Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary. References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business. Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation. It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right. IBM, the IBM logo, ibm.com, BrassRing®, Connections™, Domino®, Global Business Services®, Global Technology Services®, SmartCloud®, Social Business®, Kenexa®, Notes®, PartnerWorld®, Prove It!®, PureSystems®, Sametime®, Verse™, Watson™, WebSphere®, Worklight®, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.