SlideShare une entreprise Scribd logo
1  sur  35
Apache Cordova In Action
Hazem Saleh
About me
experience
More than ten years of experience in Java
enterprise and mobile solutions.
Apache Committer.
Author of four technical books.
DeveloperWorks Contributing author.
Technical Speaker (JavaOne, ApacheCon,
Geecon,JavaLand …etc)
Advisory Software Engineer in IBM.
Agenda
Apache Cordova Introduction
Configurations
Cordova Command Line
Cordova APIs Overview
Memo Application Demo
Hello World Demo
jQuery Mobile Integration Tips
Apache Cordova Introduction
Platform
HTML CSS
JS
Apache Cordova Introduction
Device native functions examples:
Apache Cordova Introduction
Hybrid Application
(Cordova)
Native Application
Can be uploaded to App
Store
Yes yes
Technology HTML + CSS + JavaScript Native platform
Programming Language
Cross-mobiles support Yes No
Development Speed Faster Slower
Uses Device Native
Features
Yes yes
Hybrid vs Native Application
Apache Cordova Introduction
Cordova is supported on the following platforms:
Apache Cordova Introduction
Challenges of the current mobile apps development:
Many platforms and
devices.
Different skills needed.
Different problem types.
Huge Development and Testing Effort to
have a single application on these platforms.
For Android: Java skills needed.
For iOS: Objective-C (or SWIFT)
skills needed.
For Windows: C# skills needed.
Apache Cordova Introduction
Who can use Cordova?
If you are a web developer and wants to develop a mobile
application that can be deployed on the different app store
portals.
If you are a mobile native developer and wants to develop a
single application on the different mobile platforms without
having to re-implement the application code on every platform.
Agenda
Apache Cordova Introduction
Configurations
Cordova Command Line
Cordova APIs Overview
Memo Application Demo
Hello World Demo
jQuery Mobile Integration Tips
Configuration
1 2 3
Prerequisites:
Node JS.
Target SDK.
From command line:
> sudo npm install -g cordova
To know the
installed version of
Cordova:
> cordova -v
GIT
Agenda
Apache Cordova Introduction
Configurations
Cordova Command Line
Cordova APIs Overview
Memo Application Demo
Hello World Demo
jQuery Mobile Integration Tips
Cordova Command Line
To create an application:
> cordova create <<app_dir>> <<project_id>> <<app_title>>
To add a platform (from the
app folder):
> cordova platform add <<platform_name>>
To build Cordova project:
> cordova build
To deploy the app on
emulator:
> cordova emulate <<platform_name>>
Agenda
Apache Cordova Introduction
Configurations
Cordova Command Line
Cordova APIs Overview
Memo Application Demo
Hello World Demo
jQuery Mobile Integration Tips
HELLO WOLRLD DEMO
Agenda
Apache Cordova Introduction
Configurations
Cordova Command Line
Cordova APIs Overview
Memo Application Demo
Hello World Demo
jQuery Mobile Integration Tips
Cordova APIs Overview
Native device functions are represented as plugins that can be
added and removed using the command line.
Adding camera plugin
example:
> cordova plugin add https://git-wip-
us.apache.org/repos/asf/cordova-plugin-camera.git
Removing Camera plugin
example:
> cordova plugin rm org.apache.cordova.core.camera
Cordova APIs Overview
Device
An object that holds information about the device
hardware and software.
Device information is mainly about:
 Device name.
 Device Platform.
 Device Platform version.
 Device model.
“deviceready” event is an indicator that Cordova finishes
loading and Cordova APIs are ready to be called.
Cordova APIs Overview
Camera
An object that provides an access to the device camera.
It can be used for:
 Capturing a photo using the device’s Camera.
 Picking a photo from the device’s gallery.
navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
destinationType: Camera.DestinationType.DATA_URL
});
function onSuccess(imageData) {
var image = document.getElementById('myImage');
image.src = "data:image/jpeg;base64," + imageData;
}
function onFail(message) {
alert('Failed because: ' + message);
}
Cordova APIs Overview
Media
An object that allows recording and playing back audio
files on the device.
var my_media = new Media("someFile.mp3", onSuccess,
onError);
my_media.play();
function onSuccess() {
console.log("playAudio():Audio Success");
}
function onError(error) {
alert('code: ' + error.code + 'n' + 'message: ' +
error.message + 'n');
}
Cordova APIs Overview
Notification
An object that displays visual, audible, and tactile
notification.
// Show a native looking alert
navigator.notification.alert(
'Cordova is great!', // message
'Cordova', // title
'Ok' // buttonName
);
// Beep four times
navigator.notification.beep(4);
// Vibrate for 3 seconds
navigator.notification.vibrate(3000);
Cordova APIs Overview
Storage
Provides an access to the W3C Web Storage interface:
window.localStorage.setItem("key", "value");
var value = window.localStorage.getItem("key");
window.localStorage.removeItem("key");
window.localStorage.clear();
- Local Storage (window.localStorage).
- Session Storage (window.sessionStorage).
Cordova APIs Overview
Storage
Provides an access to the device Web SQL Database
(Full featured database). Cordova supports IndexedDB
for WP8 and Blackberry 10.
function populateDB(tx) {
tx.executeSql('DROP TABLE IF EXISTS DEMO');
tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
}
function errorCB(err) {
alert("Error processing SQL: " + err.code);
}
function successCB() {
alert("success!");
}
var db = window.openDatabase("Demos", "1.0", "Cordova Demo", 200000);
db.transaction(populateDB, errorCB, successCB);
Cordova APIs Overview
Accelerometer (Capture device motion)
Compass (Get the device direction)
Connection (Get the device connection)
Contacts (Access to device contacts database).
File (Access to device File system based on W3C File API)
Globalization (Access to user locale information)
Events (Handle Apache Cordova life cycle events).
Geolocation (Know your mobile location. API is W3C based)
More APIs:
Agenda
Apache Cordova Introduction
Configurations
Cordova Command Line
Cordova APIs Overview
Memo Application Demo
Hello World Demo
jQuery Mobile Integration Tips
jQuery Mobile Integration
jQuery Mobile is:
One of the most popular User Interface framework for building Mobile
Web applications.
Uses HTML5 + CSS3 for layout pages with minimal scripting.
Compatible with most of the mobile and tablet browsers.
jQuery Mobile Integration
Cordova does not restrict using any specific JavaScript library but using
a JavaScript library will save you a lot of time creating your own
widgets from scratch.
jQuery Mobile is used in the demo application with Cordova to create
the Memo utility.
There are also many cool frameworks you can use in your Cordova
mobile apps such as:
Angular JS + lonic. Dojo mobile Sencha Touch.
jQuery Mobile Integration
Windows Phone 8 Issues:
Fixes:
Trimmed header title.
Footer is not aligned to bottom.
Set ui-header and ui-title classes’
overflow to visible.
Hide System Tray using app config
(shell:SystemTray.isVisible = “False”).
jQuery Mobile Integration
iOS 7 (and 8) Issues:
One of the possible
workarounds:
Collision between jQM header title
and iOS device status bar.
Hide the status bar by adding and
setting two properties in the app's
.plist file:
1. The Status bar is initially hidden
property set to the YES value.
2. The View controller-based status
bar appearance property set to the
NO value
jQuery Mobile Integration
In order to boost the performance of jQuery mobile with
Cordova, it is recommended to disable transition effects as
follows:
$.mobile.defaultDialogTransition = 'none’;
$.mobile.defaultPageTransition = 'none';
jQuery Mobile Integration
• Use cordova-jquery-npm module to speed up adding
ready-made jQuery mobile templates to your existing
Cordova project. Available templates are:
• Multiple pages.
• Persistent Navigation bar for three pages.
• External Panel Template.
• All what you need to do is to run cordova-jquery
command from your project root and follow the
template creation Wizard.
• cordova-jquery-npm module is an open source project
that is available in:
• https://github.com/Open-I-Beam/cordova-jquery-
npm
Agenda
Apache Cordova Introduction
Configurations
Cordova Command Line
Cordova APIs Overview
Memo Application Demo
Hello World Demo
jQuery Mobile Integration Tips
GitHub URL:
https://github.com/hazems/cordova-mega-app
MEMO APPLICATION
JavaScript Quiz
<script>
var someVar = "1";
var someObject = {
someVar: 2,
someMethod: function () {
var someVar = 3;
var _this = this;
setTimeout(function() {
var result = _this.someVar + this.someVar;
alert(result);
}, 10);
}
};
someObject.someMethod();
</script>
Questions
Twitter: @hazems
Blog: http://www.technicaladvices.com
Email: hazems@apache.org

Contenu connexe

Tendances

Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introductionsnevesbarros
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...Wim Selles
 
Apache Cordova: Overview and Introduction
Apache Cordova: Overview and IntroductionApache Cordova: Overview and Introduction
Apache Cordova: Overview and IntroductionGabriele Falasca
 
Java fx smart code econ
Java fx smart code econJava fx smart code econ
Java fx smart code econTom Schindl
 
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...Future Processing
 
Automation Open Source tools
Automation Open Source toolsAutomation Open Source tools
Automation Open Source toolsQA Club Kiev
 
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Sargis Sargsyan
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemAndres Almiray
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with SelendroidVikas Thange
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCPwhbath
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using AppiumMindfire Solutions
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)Hendrik Ebbers
 
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...Edureka!
 
Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021Svetlin Nakov
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
How to generate a rest application - DevFest Vienna 2016
How to generate a rest application - DevFest Vienna 2016How to generate a rest application - DevFest Vienna 2016
How to generate a rest application - DevFest Vienna 2016johannes_fiala
 
API Testing following the Test Pyramid
API Testing following the Test PyramidAPI Testing following the Test Pyramid
API Testing following the Test PyramidElias Nogueira
 

Tendances (20)

Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introduction
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
 
Apache Cordova: Overview and Introduction
Apache Cordova: Overview and IntroductionApache Cordova: Overview and Introduction
Apache Cordova: Overview and Introduction
 
Java fx smart code econ
Java fx smart code econJava fx smart code econ
Java fx smart code econ
 
Agility Requires Safety
Agility Requires SafetyAgility Requires Safety
Agility Requires Safety
 
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...
 
Automation Open Source tools
Automation Open Source toolsAutomation Open Source tools
Automation Open Source tools
 
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with Selendroid
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCP
 
Appium & Jenkins
Appium & JenkinsAppium & Jenkins
Appium & Jenkins
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)
 
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
 
Android programming-basics
Android programming-basicsAndroid programming-basics
Android programming-basics
 
Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021Appium Mobile Testing: Nakov at BurgasConf - July 2021
Appium Mobile Testing: Nakov at BurgasConf - July 2021
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
How to generate a rest application - DevFest Vienna 2016
How to generate a rest application - DevFest Vienna 2016How to generate a rest application - DevFest Vienna 2016
How to generate a rest application - DevFest Vienna 2016
 
API Testing following the Test Pyramid
API Testing following the Test PyramidAPI Testing following the Test Pyramid
API Testing following the Test Pyramid
 

Similaire à Apache Cordova In Action

Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)ejlp12
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy Miles
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkTroy Miles
 
Android App Development using HTML5 Technology
Android App Development using HTML5 TechnologyAndroid App Development using HTML5 Technology
Android App Development using HTML5 TechnologyOon Arfiandwi
 
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfHTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfJAX London
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginnersrajkamaltibacademy
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Phonegap android
Phonegap androidPhonegap android
Phonegap androidumesh patil
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaChristian Heilmann
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSPhilipp Burgmer
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Lou Sacco
 
Ionic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsIonic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsAndreas Sahle
 
android training_material ravy ramio
android training_material ravy ramioandroid training_material ravy ramio
android training_material ravy ramioslesulvy
 
Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Sentinel Solutions Ltd
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonRobert Nyman
 
(Christian heilman) firefox
(Christian heilman) firefox(Christian heilman) firefox
(Christian heilman) firefoxNAVER D2
 
React Native for ReactJS Devs
React Native for ReactJS DevsReact Native for ReactJS Devs
React Native for ReactJS DevsBarak Cohen
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers dssprakash
 

Similaire à Apache Cordova In Action (20)

Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 
Android App Development using HTML5 Technology
Android App Development using HTML5 TechnologyAndroid App Development using HTML5 Technology
Android App Development using HTML5 Technology
 
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfHTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias Wessendorf
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginners
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Phonegap android
Phonegap androidPhonegap android
Phonegap android
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJS
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
Ionic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsIonic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile apps
 
iOS App Using cordova
iOS App Using cordovaiOS App Using cordova
iOS App Using cordova
 
android training_material ravy ramio
android training_material ravy ramioandroid training_material ravy ramio
android training_material ravy ramio
 
HTML5 WebWorks
HTML5 WebWorksHTML5 WebWorks
HTML5 WebWorks
 
Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
(Christian heilman) firefox
(Christian heilman) firefox(Christian heilman) firefox
(Christian heilman) firefox
 
React Native for ReactJS Devs
React Native for ReactJS DevsReact Native for ReactJS Devs
React Native for ReactJS Devs
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
 

Plus de Hazem Saleh

[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScriptHazem Saleh
 
Mockito 2.x Migration - Droidcon UK 2018
Mockito 2.x Migration - Droidcon UK 2018Mockito 2.x Migration - Droidcon UK 2018
Mockito 2.x Migration - Droidcon UK 2018Hazem Saleh
 
JavaScript Unit Testing with an Angular 5.x Use Case 101
JavaScript Unit Testing with an Angular 5.x Use Case 101JavaScript Unit Testing with an Angular 5.x Use Case 101
JavaScript Unit Testing with an Angular 5.x Use Case 101Hazem Saleh
 
Dojo >= 1.7 Kickstart
Dojo >= 1.7  KickstartDojo >= 1.7  Kickstart
Dojo >= 1.7 KickstartHazem Saleh
 
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013Hazem Saleh
 
JSF Mashups in Action
JSF Mashups in ActionJSF Mashups in Action
JSF Mashups in ActionHazem Saleh
 
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013Hazem Saleh
 
JavaScript tools
JavaScript toolsJavaScript tools
JavaScript toolsHazem Saleh
 
Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012Hazem Saleh
 
[JavaOne 2010] Abstract Mashups for Enterprise Java
[JavaOne 2010] Abstract Mashups for Enterprise Java[JavaOne 2010] Abstract Mashups for Enterprise Java
[JavaOne 2010] Abstract Mashups for Enterprise JavaHazem Saleh
 

Plus de Hazem Saleh (11)

[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript
 
Mockito 2.x Migration - Droidcon UK 2018
Mockito 2.x Migration - Droidcon UK 2018Mockito 2.x Migration - Droidcon UK 2018
Mockito 2.x Migration - Droidcon UK 2018
 
JavaScript Unit Testing with an Angular 5.x Use Case 101
JavaScript Unit Testing with an Angular 5.x Use Case 101JavaScript Unit Testing with an Angular 5.x Use Case 101
JavaScript Unit Testing with an Angular 5.x Use Case 101
 
Dojo >= 1.7 Kickstart
Dojo >= 1.7  KickstartDojo >= 1.7  Kickstart
Dojo >= 1.7 Kickstart
 
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
 
JSF Mashups in Action
JSF Mashups in ActionJSF Mashups in Action
JSF Mashups in Action
 
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013
 
JavaScript tools
JavaScript toolsJavaScript tools
JavaScript tools
 
Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012
 
[JavaOne 2010] Abstract Mashups for Enterprise Java
[JavaOne 2010] Abstract Mashups for Enterprise Java[JavaOne 2010] Abstract Mashups for Enterprise Java
[JavaOne 2010] Abstract Mashups for Enterprise Java
 
GMaps4JSF
GMaps4JSFGMaps4JSF
GMaps4JSF
 

Dernier

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Dernier (20)

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

Apache Cordova In Action

  • 1. Apache Cordova In Action Hazem Saleh
  • 2. About me experience More than ten years of experience in Java enterprise and mobile solutions. Apache Committer. Author of four technical books. DeveloperWorks Contributing author. Technical Speaker (JavaOne, ApacheCon, Geecon,JavaLand …etc) Advisory Software Engineer in IBM.
  • 3. Agenda Apache Cordova Introduction Configurations Cordova Command Line Cordova APIs Overview Memo Application Demo Hello World Demo jQuery Mobile Integration Tips
  • 5. Apache Cordova Introduction Device native functions examples:
  • 6. Apache Cordova Introduction Hybrid Application (Cordova) Native Application Can be uploaded to App Store Yes yes Technology HTML + CSS + JavaScript Native platform Programming Language Cross-mobiles support Yes No Development Speed Faster Slower Uses Device Native Features Yes yes Hybrid vs Native Application
  • 7. Apache Cordova Introduction Cordova is supported on the following platforms:
  • 8. Apache Cordova Introduction Challenges of the current mobile apps development: Many platforms and devices. Different skills needed. Different problem types. Huge Development and Testing Effort to have a single application on these platforms. For Android: Java skills needed. For iOS: Objective-C (or SWIFT) skills needed. For Windows: C# skills needed.
  • 9. Apache Cordova Introduction Who can use Cordova? If you are a web developer and wants to develop a mobile application that can be deployed on the different app store portals. If you are a mobile native developer and wants to develop a single application on the different mobile platforms without having to re-implement the application code on every platform.
  • 10. Agenda Apache Cordova Introduction Configurations Cordova Command Line Cordova APIs Overview Memo Application Demo Hello World Demo jQuery Mobile Integration Tips
  • 11. Configuration 1 2 3 Prerequisites: Node JS. Target SDK. From command line: > sudo npm install -g cordova To know the installed version of Cordova: > cordova -v GIT
  • 12. Agenda Apache Cordova Introduction Configurations Cordova Command Line Cordova APIs Overview Memo Application Demo Hello World Demo jQuery Mobile Integration Tips
  • 13. Cordova Command Line To create an application: > cordova create <<app_dir>> <<project_id>> <<app_title>> To add a platform (from the app folder): > cordova platform add <<platform_name>> To build Cordova project: > cordova build To deploy the app on emulator: > cordova emulate <<platform_name>>
  • 14. Agenda Apache Cordova Introduction Configurations Cordova Command Line Cordova APIs Overview Memo Application Demo Hello World Demo jQuery Mobile Integration Tips
  • 16. Agenda Apache Cordova Introduction Configurations Cordova Command Line Cordova APIs Overview Memo Application Demo Hello World Demo jQuery Mobile Integration Tips
  • 17. Cordova APIs Overview Native device functions are represented as plugins that can be added and removed using the command line. Adding camera plugin example: > cordova plugin add https://git-wip- us.apache.org/repos/asf/cordova-plugin-camera.git Removing Camera plugin example: > cordova plugin rm org.apache.cordova.core.camera
  • 18. Cordova APIs Overview Device An object that holds information about the device hardware and software. Device information is mainly about:  Device name.  Device Platform.  Device Platform version.  Device model. “deviceready” event is an indicator that Cordova finishes loading and Cordova APIs are ready to be called.
  • 19. Cordova APIs Overview Camera An object that provides an access to the device camera. It can be used for:  Capturing a photo using the device’s Camera.  Picking a photo from the device’s gallery. navigator.camera.getPicture(onSuccess, onFail, { quality: 50, destinationType: Camera.DestinationType.DATA_URL }); function onSuccess(imageData) { var image = document.getElementById('myImage'); image.src = "data:image/jpeg;base64," + imageData; } function onFail(message) { alert('Failed because: ' + message); }
  • 20. Cordova APIs Overview Media An object that allows recording and playing back audio files on the device. var my_media = new Media("someFile.mp3", onSuccess, onError); my_media.play(); function onSuccess() { console.log("playAudio():Audio Success"); } function onError(error) { alert('code: ' + error.code + 'n' + 'message: ' + error.message + 'n'); }
  • 21. Cordova APIs Overview Notification An object that displays visual, audible, and tactile notification. // Show a native looking alert navigator.notification.alert( 'Cordova is great!', // message 'Cordova', // title 'Ok' // buttonName ); // Beep four times navigator.notification.beep(4); // Vibrate for 3 seconds navigator.notification.vibrate(3000);
  • 22. Cordova APIs Overview Storage Provides an access to the W3C Web Storage interface: window.localStorage.setItem("key", "value"); var value = window.localStorage.getItem("key"); window.localStorage.removeItem("key"); window.localStorage.clear(); - Local Storage (window.localStorage). - Session Storage (window.sessionStorage).
  • 23. Cordova APIs Overview Storage Provides an access to the device Web SQL Database (Full featured database). Cordova supports IndexedDB for WP8 and Blackberry 10. function populateDB(tx) { tx.executeSql('DROP TABLE IF EXISTS DEMO'); tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)'); tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")'); tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")'); } function errorCB(err) { alert("Error processing SQL: " + err.code); } function successCB() { alert("success!"); } var db = window.openDatabase("Demos", "1.0", "Cordova Demo", 200000); db.transaction(populateDB, errorCB, successCB);
  • 24. Cordova APIs Overview Accelerometer (Capture device motion) Compass (Get the device direction) Connection (Get the device connection) Contacts (Access to device contacts database). File (Access to device File system based on W3C File API) Globalization (Access to user locale information) Events (Handle Apache Cordova life cycle events). Geolocation (Know your mobile location. API is W3C based) More APIs:
  • 25. Agenda Apache Cordova Introduction Configurations Cordova Command Line Cordova APIs Overview Memo Application Demo Hello World Demo jQuery Mobile Integration Tips
  • 26. jQuery Mobile Integration jQuery Mobile is: One of the most popular User Interface framework for building Mobile Web applications. Uses HTML5 + CSS3 for layout pages with minimal scripting. Compatible with most of the mobile and tablet browsers.
  • 27. jQuery Mobile Integration Cordova does not restrict using any specific JavaScript library but using a JavaScript library will save you a lot of time creating your own widgets from scratch. jQuery Mobile is used in the demo application with Cordova to create the Memo utility. There are also many cool frameworks you can use in your Cordova mobile apps such as: Angular JS + lonic. Dojo mobile Sencha Touch.
  • 28. jQuery Mobile Integration Windows Phone 8 Issues: Fixes: Trimmed header title. Footer is not aligned to bottom. Set ui-header and ui-title classes’ overflow to visible. Hide System Tray using app config (shell:SystemTray.isVisible = “False”).
  • 29. jQuery Mobile Integration iOS 7 (and 8) Issues: One of the possible workarounds: Collision between jQM header title and iOS device status bar. Hide the status bar by adding and setting two properties in the app's .plist file: 1. The Status bar is initially hidden property set to the YES value. 2. The View controller-based status bar appearance property set to the NO value
  • 30. jQuery Mobile Integration In order to boost the performance of jQuery mobile with Cordova, it is recommended to disable transition effects as follows: $.mobile.defaultDialogTransition = 'none’; $.mobile.defaultPageTransition = 'none';
  • 31. jQuery Mobile Integration • Use cordova-jquery-npm module to speed up adding ready-made jQuery mobile templates to your existing Cordova project. Available templates are: • Multiple pages. • Persistent Navigation bar for three pages. • External Panel Template. • All what you need to do is to run cordova-jquery command from your project root and follow the template creation Wizard. • cordova-jquery-npm module is an open source project that is available in: • https://github.com/Open-I-Beam/cordova-jquery- npm
  • 32. Agenda Apache Cordova Introduction Configurations Cordova Command Line Cordova APIs Overview Memo Application Demo Hello World Demo jQuery Mobile Integration Tips
  • 34. JavaScript Quiz <script> var someVar = "1"; var someObject = { someVar: 2, someMethod: function () { var someVar = 3; var _this = this; setTimeout(function() { var result = _this.someVar + this.someVar; alert(result); }, 10); } }; someObject.someMethod(); </script>

Notes de l'éditeur

  1. Make sure that mega app is running in an emulator before starting …
  2. So, today, We will: Have an introduction about Apache Cordova, we will know: What Apache Cordova is, The differences between mobile web vs Hybrid vs native mobile applications, the current challenges of today’s mobile development and how Apache Cordova can minimize these challenges. We will know how to configure Apache Cordova. We will see how to work with Cordova Command Line Interface in order to create and build a cordova project. Then I will show you how to create and deploy an Apache Cordova application from scratch using CLI. Then we will have an overview of Apache Cordova APIs. And we will explore the jQuery mobile Integration tips with Apache Cordova. Finally, I will show you a real application that supports three mobile platforms (iOS, Android and Windows Phone 8). This application utilizes the device’s audio and camera in order to create a memo utility.
  3. So What is Apache Cordova is a set of APIs which allow accessing the device native functions using JavaScript. Apache Cordova is not only a set of APIs but it also a platform which allows creating mobile apps using common web technologies (HTML, CSS, JavaScript).
  4. Device native function examples are: Accessing the device audio to record and playback voice. Capturing a photo using the device camera. Searching and adding contacts to the device. Accessing the device compass and file system.
  5. Before going into the details of the current mobile apps development, it is important to realize the differences between mobile web apps, hybrid mobile apps, and native mobile apps. Mobile web apps: Are mobile-friendly apps which are displayed correctly on the different resolutions of mobile devices and tablets. Usually require you to be online in order to access it as they are not installed locally in your device. Have limited access to the device native functions by utilizing the HTML 5 APIs such as Geolocation. For Hybrid and native mobile apps: They have the same physical format and they can be uploaded to the app store. However, they uses two different technologies. For Hybrid mobile apps, they uses HTML, CSS and JavaScript while Native mobile apps use the native programming language of the mobile platform. Hybrid mobile apps can work on the different mobile platforms while Native mobile apps work only on the platform they are developed for. …
  6. We have the following challenges in the current mobile application development: We have many platforms. Every platform has many devices. This means that testing your application cross these devices is a real overhead. In order to develop an application cross the different mobile platforms, we need to have different skills in the team. For Android, we need the development team to know Java, for … Because every platform has its own philosophy, we can find different problem types on every mobile platform. For example, sending SMS in Android (and continue the example). Handling these problem types using different programming languages is not an easy task. All of this leads to a huge development and testing effort to have a single application idea developed on these mobile platforms. Apache Cordova could meet these challenges by providing a single programming language to develop cross-mobile platform apps which is JavaScript. This means that you will not have to have different skills in your development team and will have a neat and centralized way to handle the different problem type of every platform.
  7. Start from minute 15 and finish by minute 25 (10 minutes) Explain an app in Android/iOS (and Do not forget to include the structure details)…
  8. You should be here at minute 40.
  9. Explain this in 5 minutes (from 40 to 45)
  10. Here in minute 45 21