SlideShare uma empresa Scribd logo
1 de 43
23/4/2015 http://blog.kerul.net 1
Mobile Web Apps Development
(Multiplatform using HTML5,
jQuery, PhoneGap/Apache
Cordova)
Khirulnizam Abd Rahman
kerul.net
About Khirulnizam
 Codes in blog.kerul.net
 Certified HRDF Trainer
 Full time Lecturer of Computer Science, Faculty of Information
Science and Technology, Selangor International Islamic
University College (KUIS) – since 2000.
 Avid Android developer since 2010 – MDeC ICONApp 2010.
 Grants MDeC ICON 2010,2011; MDeC ICONdap 2013.
 Apps in Google Play
 SmartSolat using Adobe Air – bit.ly/smartsolat
 Al-Mathurat bersama Ustaz Don – Android bit.ly/new-mathurat
 Al-Mathurat bersama Ustaz Don – iPhone bit.ly/m-mathurat-ios
 Peribahasa Dictionary – 20K ( bit.ly/pbahasa )
 mDictionary – open-sourced ( bit.ly/m-dictionary )
23/4/2015 http://blog.kerul.net 2
Day 1
FRONTE
ND
23/4/2015 ANDROID APP DEVELOPMENT (Hybrid) - blog.kerul.net 3
The Mobile Apps Development Basics with
HTML5
Introduction to Web-based Mobile Apps
Development tools installation.
Web server setup (Apache HTTPd).
HTML and jQuery for the Interface
Basic HTML file.
Text, Fontface, Hyperlinks.
Image, Paragraph, Division, Header.
Division, Header.
CSS.
JavaScript & JQuery mobile framework basics.
Mobile Page Structure
Header
Main Content
Footer
Single-page template structure
Multi-page template structure
Buttons
Transition
Listview
Panel
Hybrid Approach
23/4/2015 http://blog.kerul.net 4
Hybrid Approach – consists
of
 HTML + jQuery (JavaScript, CSS)
 Apache Cordova (HTML to Android
Project)
 Eclipse ADT – to generate APK
 Xcode – to generate iOS app
23/4/2015 http://blog.kerul.net 5
What are tools needed to
develop Android App Hybrid?
 HTML knowledge
 jQuery (JavaScript + CSS framework)
 Apache Cordova
 NodeJS
 Apache Ant
 Latest JDK
 Eclipse ADT Bundle
 Android SDK (for Android app)
 Xcode (for iOS app)
23/4/2015 http://blog.kerul.net 6
Apache Cordova
 Previously known as PhoneGap
 use HTML5 and CSS3 for interface
rendering, and JavaScript for logic
 HTML5 provides better support for GPS,
camera, video, etc.
 includes basic plugins that allow access to
the device's hardware’s.
 embeds HTML5 code inside a native
WebView on the device, using a foreign
function interface to access the native
resources of the device.
23/4/2015 http://blog.kerul.net 7
23/4/2015 http://blog.kerul.net 8
CSS | HTML
JavaScript
Apache ANT
 Apache Ant is a Java library and
command-line tool
 to drive processes described in build
files as targets and extension points
dependent upon each other.
 The main known usage of Ant is the
build of Java applications.
23/4/2015 http://blog.kerul.net 9
NodeJS
23/4/2015 http://blog.kerul.net 10
 Node.js contains a built-in library to
allow applications to act as a Web
server without software such as Apache
HTTP
Where to distribute my
App?
 Play.google.com
 Apple App Store
23/4/2015 http://blog.kerul.net 11
DEMOs
23/4/2015 http://blog.kerul.net 12
LESS plan, MORE do
- Mark Zuckerberg
Next Agenda Day 1
23/4/2015 ANDROID APP DEVELOPMENT (Hybrid) - blog.kerul.net 13
Installing Web Editor
 Use NotePad++
 Or any HTML editor (such as
DreamWeaver)
23/4/2015 http://blog.kerul.net 14
Web Client
 Any web browser could be the web
client
23/4/2015 http://blog.kerul.net 15
What is HTML?
 HyperText Mark-up Language
 Marking up areas with angle brackets or
TAGs
23/4/2015 http://blog.kerul.net 16
HTML Basics Structure
 <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
 Save as index.html
23/4/2015 http://blog.kerul.net 17
Hyperlinks
 <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<a href="http://kerul.net">This is a link</a>
</body>
</html>
23/4/2015 http://blog.kerul.net 18
Images
 <img src="w3schools.jpg" alt="W3Schoo
ls.com" width="104" height="142">
23/4/2015 http://blog.kerul.net 19
Layout using DIV
<div id="header">
<h1>City Gallery</h1>
</div>
<div id="nav">
London<br>
Paris<br>
Tokyo<br>
</div>
<div id="section">
<h1>London</h1>
<p>
London is the capital city of England. It is the most populous city in the United Kingdom,
with a metropolitan area of over 13 million inhabitants.
</p>
<p>
Standing on the River Thames, London has been a major settlement for two millennia,
its history going back to its founding by the Romans, who named it Londinium.
</p>
</div>
<div id="footer">
Copyright © W3Schools.com
</div>
23/4/2015 http://blog.kerul.net 20
CSS?
 Cascading Style Sheet
 Added to HTML4 to provide styles in
HTML elements
23/4/2015 http://blog.kerul.net 21
CSS syntax
 p {
color: red;
text-align: center;
}
23/4/2015 http://blog.kerul.net 22
Simple CSS example - internal
 <head>
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
23/4/2015 http://blog.kerul.net 23
CSS inline
 <h1 style="color:blue;margin-left:30px;">
This is a heading.</h1>
23/4/2015 http://blog.kerul.net 24
CSS example
<!DOCTYPE html>
<html>
<head>
<style>
body {
}
</style>
</head>
<body style=“background-color: #b0c4de;”>
<h1>My CSS web page!</h1>
<p>Hello world! This is a W3Schools.com example.</p>
</body>
</html>
23/4/2015 http://blog.kerul.net 25
JavaScript
 Script to add live interaction to HTML
<!DOCTYPE html>
<html>
<body>
<h1 onmouseover="style.color='red'"
onmouseout="style.color='black'">Mouse
over this text</h1>
</body>
</html>
23/4/2015 http://blog.kerul.net 26
JavaScript Example
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction() {
var x = document.getElementById("fname");
x.value = x.value.toUpperCase();
}
</script>
</head>
<body>
Enter your name: <input type="text" id="fname" onblur="myFunction()">
<p>When you leave the input field, a function is triggered which transforms the
input text to upper case.</p>
</body>
</html>
23/4/2015 http://blog.kerul.net 27
Mobile Web Page
 Create folders in web root as below
23/4/2015 http://blog.kerul.net 28
Copy the template
 css/jquery.mobile.min.css
 js/jquery.min.js
 js/jquery.mobile.min.js
 index.html
The css and js files are available in the
jQuery.mobile
23/4/2015 http://blog.kerul.net 29
Mobile Web page structure
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Page Title</h1>
</div><!-- /header -->
<div role="main" class="ui-content">
<p>Page content goes here.</p>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /footer -->
</div><!-- /page -->
</body>
</html>
23/4/2015 http://blog.kerul.net 30
http://demos.jquerymobile.com/1.4.5/pages/
Head segment
<head>
<title>Page Title</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-
width, initial-scale=1">
<link href="css/jquery.mobile-1.4.5.min.css"
rel="stylesheet" type="text/css" />
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
</head>
23/4/2015 http://blog.kerul.net 31
23/4/2015 http://blog.kerul.net 32
Multipage
23/4/2015 http://blog.kerul.net 33
Changing the Theme
 http://themeroller.jquerymobile.com/
23/4/2015 http://blog.kerul.net 34
Exercise
 Developing department’s 3-page app.
23/4/2015 http://blog.kerul.net 35
Build.phonegap.com
 Fast apps generation
23/4/2015 http://blog.kerul.net 36
23/4/2015 http://blog.kerul.net 37
23/4/2015 http://blog.kerul.net 38
 http://blog.kerul.net/2015/03/buildphone
gapcom-to-generate-signed-apk.html
23/4/2015 http://blog.kerul.net 39
Day 2 - BACKEND
Connecting to Online Database
 Server configuration.
 PHP and MySql connectivity.
 Gui tool to manage data.
 MySql query for selecting data.
 Using PHP to display data.
 Search facilities.
 Filterable in jQueryMobile.
 Inserting a new record.
 Search result listing using AJAX approach.
23/4/2015 http://blog.kerul.net 40
Install the Web Server
 For the back-end
 Apache HTTPd – also available in
XAMPP
 Download at
https://www.apachefriends.org/
 localhost
23/4/2015 http://blog.kerul.net 41
Web root
23/4/2015 http://blog.kerul.net 42
To be continued…
23/4/2015 http://blog.kerul.net 43

Mais conteúdo relacionado

Mais procurados

Cross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual StudioCross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual Studio
bryan costanich
 
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Patrick Lauke
 
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
Patrick Lauke
 
Android development 1july
Android development 1julyAndroid development 1july
Android development 1july
Edureka!
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Edureka!
 

Mais procurados (20)

Alex Corbi building a 100 % Open Source based Open Data Platform
Alex Corbi building a 100 % Open Source based Open Data PlatformAlex Corbi building a 100 % Open Source based Open Data Platform
Alex Corbi building a 100 % Open Source based Open Data Platform
 
The WebView Role in Hybrid Applications
The WebView Role in Hybrid ApplicationsThe WebView Role in Hybrid Applications
The WebView Role in Hybrid Applications
 
Shining a light on performance (js meetup)
Shining a light on performance (js meetup)Shining a light on performance (js meetup)
Shining a light on performance (js meetup)
 
INTERNSHIP REPORT
INTERNSHIP REPORTINTERNSHIP REPORT
INTERNSHIP REPORT
 
Schemaorg cmsplugins
Schemaorg cmspluginsSchemaorg cmsplugins
Schemaorg cmsplugins
 
Develop Mobile App Using Android Lollipop
Develop Mobile App Using Android LollipopDevelop Mobile App Using Android Lollipop
Develop Mobile App Using Android Lollipop
 
BACnet HMI5 - BACnet Touch Panel - BACnet Touch Screen - HMI
BACnet HMI5 - BACnet Touch Panel - BACnet Touch Screen - HMIBACnet HMI5 - BACnet Touch Panel - BACnet Touch Screen - HMI
BACnet HMI5 - BACnet Touch Panel - BACnet Touch Screen - HMI
 
Learn How to Animate your Android App
Learn How to Animate your Android AppLearn How to Animate your Android App
Learn How to Animate your Android App
 
Top Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To KnowTop Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To Know
 
Cross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual StudioCross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual Studio
 
Mobile Development With Flash Platform
Mobile Development With Flash PlatformMobile Development With Flash Platform
Mobile Development With Flash Platform
 
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
 
Building a mobile app connected to WordPress with WP-AppKit
Building a mobile app connected to WordPress with WP-AppKitBuilding a mobile app connected to WordPress with WP-AppKit
Building a mobile app connected to WordPress with WP-AppKit
 
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
 
3d web
3d web3d web
3d web
 
Using Android 5.0 Lollipop
Using Android 5.0 LollipopUsing Android 5.0 Lollipop
Using Android 5.0 Lollipop
 
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
 
Android development 1july
Android development 1julyAndroid development 1july
Android development 1july
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
A Complete Solution for Web Development
A Complete Solution for Web DevelopmentA Complete Solution for Web Development
A Complete Solution for Web Development
 

Destaque (9)

Chapter 4 - Classes in Java
Chapter 4 - Classes in JavaChapter 4 - Classes in Java
Chapter 4 - Classes in Java
 
Chapter 3 Arrays in Java
Chapter 3 Arrays in JavaChapter 3 Arrays in Java
Chapter 3 Arrays in Java
 
Tips menyediakan slaid pembentangan berkesan - tiada template
Tips menyediakan slaid pembentangan berkesan - tiada templateTips menyediakan slaid pembentangan berkesan - tiada template
Tips menyediakan slaid pembentangan berkesan - tiada template
 
Topik 3 Masyarakat Malaysia dan ICT
Topik 3   Masyarakat Malaysia dan ICTTopik 3   Masyarakat Malaysia dan ICT
Topik 3 Masyarakat Malaysia dan ICT
 
Chapter 2 Method in Java OOP
Chapter 2   Method in Java OOPChapter 2   Method in Java OOP
Chapter 2 Method in Java OOP
 
Chapter 5 Class File
Chapter 5 Class FileChapter 5 Class File
Chapter 5 Class File
 
Chapter 6 Java IO File
Chapter 6 Java IO FileChapter 6 Java IO File
Chapter 6 Java IO File
 
Topik 4 Teknologi Komputer: Hardware, Software dan Heartware
Topik 4 Teknologi Komputer: Hardware, Software dan HeartwareTopik 4 Teknologi Komputer: Hardware, Software dan Heartware
Topik 4 Teknologi Komputer: Hardware, Software dan Heartware
 
Chapter 2 Java Methods
Chapter 2 Java MethodsChapter 2 Java Methods
Chapter 2 Java Methods
 

Semelhante a Mobile Web App development multiplatform using phonegap-cordova

Rivera_COSC880_Presentation
Rivera_COSC880_PresentationRivera_COSC880_Presentation
Rivera_COSC880_Presentation
Emanuel Rivera
 
Collaboration Portal for Researchers
Collaboration Portal for ResearchersCollaboration Portal for Researchers
Collaboration Portal for Researchers
Fatemeh Khast Khoda
 
How to build_a_mobile_site_with_drupal
How to build_a_mobile_site_with_drupalHow to build_a_mobile_site_with_drupal
How to build_a_mobile_site_with_drupal
Green For All
 

Semelhante a Mobile Web App development multiplatform using phonegap-cordova (20)

HTML5 and the Open Web Platform - Lecture 03 - Web Information Systems (WE-DI...
HTML5 and the Open Web Platform - Lecture 03 - Web Information Systems (WE-DI...HTML5 and the Open Web Platform - Lecture 03 - Web Information Systems (WE-DI...
HTML5 and the Open Web Platform - Lecture 03 - Web Information Systems (WE-DI...
 
MobileStore.pptx
MobileStore.pptxMobileStore.pptx
MobileStore.pptx
 
Rivera_COSC880_Presentation
Rivera_COSC880_PresentationRivera_COSC880_Presentation
Rivera_COSC880_Presentation
 
State of modern web technologies: an introduction
State of modern web technologies: an introductionState of modern web technologies: an introduction
State of modern web technologies: an introduction
 
Collaboration Portal for Researchers
Collaboration Portal for ResearchersCollaboration Portal for Researchers
Collaboration Portal for Researchers
 
How to build_a_mobile_site_with_drupal
How to build_a_mobile_site_with_drupalHow to build_a_mobile_site_with_drupal
How to build_a_mobile_site_with_drupal
 
Backing yourself into an Accessible Corner
Backing yourself into an Accessible CornerBacking yourself into an Accessible Corner
Backing yourself into an Accessible Corner
 
Best Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppBest Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile App
 
Building web applications using the web.
Building web applications using the web.Building web applications using the web.
Building web applications using the web.
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascript
 
Web Components: Web back to future.
Web Components: Web back to future.Web Components: Web back to future.
Web Components: Web back to future.
 
Bcs 053 solved assignment 2014-15
Bcs 053 solved assignment 2014-15Bcs 053 solved assignment 2014-15
Bcs 053 solved assignment 2014-15
 
Web Technology and Standards Tutorial
Web Technology and Standards Tutorial Web Technology and Standards Tutorial
Web Technology and Standards Tutorial
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Current Toolbox and Pedagogies - October 09
Current Toolbox and Pedagogies - October 09Current Toolbox and Pedagogies - October 09
Current Toolbox and Pedagogies - October 09
 
Drupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xDrupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.x
 
Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta
 
Bootstrap Jump Start
Bootstrap Jump StartBootstrap Jump Start
Bootstrap Jump Start
 
Introduction To Open Web Protocols
Introduction To Open Web ProtocolsIntroduction To Open Web Protocols
Introduction To Open Web Protocols
 
Desenvolvimento Mobile Híbrido
Desenvolvimento Mobile HíbridoDesenvolvimento Mobile Híbrido
Desenvolvimento Mobile Híbrido
 

Mais de Khirulnizam Abd Rahman

Khirulnizam malay proverb detection - mobilecase 19 sept 2012 - copy
Khirulnizam   malay proverb detection - mobilecase 19 sept 2012 - copyKhirulnizam   malay proverb detection - mobilecase 19 sept 2012 - copy
Khirulnizam malay proverb detection - mobilecase 19 sept 2012 - copy
Khirulnizam Abd Rahman
 
Al mathurat sughra - ringkas - m-mathurat
Al mathurat sughra - ringkas - m-mathuratAl mathurat sughra - ringkas - m-mathurat
Al mathurat sughra - ringkas - m-mathurat
Khirulnizam Abd Rahman
 

Mais de Khirulnizam Abd Rahman (18)

Topik 2 Sejarah Perkembanggan Ilmu NBWU1072
Topik 2 Sejarah Perkembanggan Ilmu NBWU1072Topik 2 Sejarah Perkembanggan Ilmu NBWU1072
Topik 2 Sejarah Perkembanggan Ilmu NBWU1072
 
Panduan tugasan Makmal Teknologi Maklumat dalam Kehidupan Insan
Panduan tugasan Makmal Teknologi Maklumat dalam Kehidupan InsanPanduan tugasan Makmal Teknologi Maklumat dalam Kehidupan Insan
Panduan tugasan Makmal Teknologi Maklumat dalam Kehidupan Insan
 
Topik 1 Islam dan Teknologi Maklumat
Topik 1 Islam dan Teknologi MaklumatTopik 1 Islam dan Teknologi Maklumat
Topik 1 Islam dan Teknologi Maklumat
 
Application of Ontology in Semantic Information Retrieval by Prof Shahrul Azm...
Application of Ontology in Semantic Information Retrieval by Prof Shahrul Azm...Application of Ontology in Semantic Information Retrieval by Prof Shahrul Azm...
Application of Ontology in Semantic Information Retrieval by Prof Shahrul Azm...
 
Chapter 1 Nested Control Structures
Chapter 1 Nested Control StructuresChapter 1 Nested Control Structures
Chapter 1 Nested Control Structures
 
Chapter 1 nested control structures
Chapter 1 nested control structuresChapter 1 nested control structures
Chapter 1 nested control structures
 
DTCP2023 Fundamentals of Programming
DTCP2023 Fundamentals of ProgrammingDTCP2023 Fundamentals of Programming
DTCP2023 Fundamentals of Programming
 
Npwu-mpu 3252 Teknologi Maklumat dalam Kehidupan Insan
Npwu-mpu 3252 Teknologi Maklumat dalam Kehidupan InsanNpwu-mpu 3252 Teknologi Maklumat dalam Kehidupan Insan
Npwu-mpu 3252 Teknologi Maklumat dalam Kehidupan Insan
 
Simple skeleton of a review paper
Simple skeleton of a review paperSimple skeleton of a review paper
Simple skeleton of a review paper
 
Airs2014 brochure
Airs2014 brochureAirs2014 brochure
Airs2014 brochure
 
Rangka kursus pembangunan aplikasi android kuiscell khirulnizam
Rangka kursus pembangunan aplikasi android kuiscell   khirulnizamRangka kursus pembangunan aplikasi android kuiscell   khirulnizam
Rangka kursus pembangunan aplikasi android kuiscell khirulnizam
 
Khirulnizam malay proverb detection - mobilecase 19 sept 2012 - copy
Khirulnizam   malay proverb detection - mobilecase 19 sept 2012 - copyKhirulnizam   malay proverb detection - mobilecase 19 sept 2012 - copy
Khirulnizam malay proverb detection - mobilecase 19 sept 2012 - copy
 
Maklumat program al quran dan borang
Maklumat program al quran dan borangMaklumat program al quran dan borang
Maklumat program al quran dan borang
 
Senarai doa al-mathurat sughro - dengan terjemahan
Senarai doa al-mathurat sughro - dengan terjemahanSenarai doa al-mathurat sughro - dengan terjemahan
Senarai doa al-mathurat sughro - dengan terjemahan
 
Al mathurat sughra - ringkas - m-mathurat
Al mathurat sughra - ringkas - m-mathuratAl mathurat sughra - ringkas - m-mathurat
Al mathurat sughra - ringkas - m-mathurat
 
Kemalangan akibat tumpuan terganggu
Kemalangan akibat tumpuan tergangguKemalangan akibat tumpuan terganggu
Kemalangan akibat tumpuan terganggu
 
Android development beginners faq
Android development  beginners faqAndroid development  beginners faq
Android development beginners faq
 
Khirulnizam - students experience in using blog as a learning tool - world co...
Khirulnizam - students experience in using blog as a learning tool - world co...Khirulnizam - students experience in using blog as a learning tool - world co...
Khirulnizam - students experience in using blog as a learning tool - world co...
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Mobile Web App development multiplatform using phonegap-cordova

  • 1. 23/4/2015 http://blog.kerul.net 1 Mobile Web Apps Development (Multiplatform using HTML5, jQuery, PhoneGap/Apache Cordova) Khirulnizam Abd Rahman kerul.net
  • 2. About Khirulnizam  Codes in blog.kerul.net  Certified HRDF Trainer  Full time Lecturer of Computer Science, Faculty of Information Science and Technology, Selangor International Islamic University College (KUIS) – since 2000.  Avid Android developer since 2010 – MDeC ICONApp 2010.  Grants MDeC ICON 2010,2011; MDeC ICONdap 2013.  Apps in Google Play  SmartSolat using Adobe Air – bit.ly/smartsolat  Al-Mathurat bersama Ustaz Don – Android bit.ly/new-mathurat  Al-Mathurat bersama Ustaz Don – iPhone bit.ly/m-mathurat-ios  Peribahasa Dictionary – 20K ( bit.ly/pbahasa )  mDictionary – open-sourced ( bit.ly/m-dictionary ) 23/4/2015 http://blog.kerul.net 2
  • 3. Day 1 FRONTE ND 23/4/2015 ANDROID APP DEVELOPMENT (Hybrid) - blog.kerul.net 3 The Mobile Apps Development Basics with HTML5 Introduction to Web-based Mobile Apps Development tools installation. Web server setup (Apache HTTPd). HTML and jQuery for the Interface Basic HTML file. Text, Fontface, Hyperlinks. Image, Paragraph, Division, Header. Division, Header. CSS. JavaScript & JQuery mobile framework basics. Mobile Page Structure Header Main Content Footer Single-page template structure Multi-page template structure Buttons Transition Listview Panel
  • 5. Hybrid Approach – consists of  HTML + jQuery (JavaScript, CSS)  Apache Cordova (HTML to Android Project)  Eclipse ADT – to generate APK  Xcode – to generate iOS app 23/4/2015 http://blog.kerul.net 5
  • 6. What are tools needed to develop Android App Hybrid?  HTML knowledge  jQuery (JavaScript + CSS framework)  Apache Cordova  NodeJS  Apache Ant  Latest JDK  Eclipse ADT Bundle  Android SDK (for Android app)  Xcode (for iOS app) 23/4/2015 http://blog.kerul.net 6
  • 7. Apache Cordova  Previously known as PhoneGap  use HTML5 and CSS3 for interface rendering, and JavaScript for logic  HTML5 provides better support for GPS, camera, video, etc.  includes basic plugins that allow access to the device's hardware’s.  embeds HTML5 code inside a native WebView on the device, using a foreign function interface to access the native resources of the device. 23/4/2015 http://blog.kerul.net 7
  • 9. Apache ANT  Apache Ant is a Java library and command-line tool  to drive processes described in build files as targets and extension points dependent upon each other.  The main known usage of Ant is the build of Java applications. 23/4/2015 http://blog.kerul.net 9
  • 10. NodeJS 23/4/2015 http://blog.kerul.net 10  Node.js contains a built-in library to allow applications to act as a Web server without software such as Apache HTTP
  • 11. Where to distribute my App?  Play.google.com  Apple App Store 23/4/2015 http://blog.kerul.net 11
  • 12. DEMOs 23/4/2015 http://blog.kerul.net 12 LESS plan, MORE do - Mark Zuckerberg
  • 13. Next Agenda Day 1 23/4/2015 ANDROID APP DEVELOPMENT (Hybrid) - blog.kerul.net 13
  • 14. Installing Web Editor  Use NotePad++  Or any HTML editor (such as DreamWeaver) 23/4/2015 http://blog.kerul.net 14
  • 15. Web Client  Any web browser could be the web client 23/4/2015 http://blog.kerul.net 15
  • 16. What is HTML?  HyperText Mark-up Language  Marking up areas with angle brackets or TAGs 23/4/2015 http://blog.kerul.net 16
  • 17. HTML Basics Structure  <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>This is a Heading</h1> <p>This is a paragraph.</p> </body> </html>  Save as index.html 23/4/2015 http://blog.kerul.net 17
  • 18. Hyperlinks  <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>This is a Heading</h1> <p>This is a paragraph.</p> <a href="http://kerul.net">This is a link</a> </body> </html> 23/4/2015 http://blog.kerul.net 18
  • 19. Images  <img src="w3schools.jpg" alt="W3Schoo ls.com" width="104" height="142"> 23/4/2015 http://blog.kerul.net 19
  • 20. Layout using DIV <div id="header"> <h1>City Gallery</h1> </div> <div id="nav"> London<br> Paris<br> Tokyo<br> </div> <div id="section"> <h1>London</h1> <p> London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants. </p> <p> Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium. </p> </div> <div id="footer"> Copyright © W3Schools.com </div> 23/4/2015 http://blog.kerul.net 20
  • 21. CSS?  Cascading Style Sheet  Added to HTML4 to provide styles in HTML elements 23/4/2015 http://blog.kerul.net 21
  • 22. CSS syntax  p { color: red; text-align: center; } 23/4/2015 http://blog.kerul.net 22
  • 23. Simple CSS example - internal  <head> <style> body { background-color: linen; } h1 { color: maroon; margin-left: 40px; } </style> </head> 23/4/2015 http://blog.kerul.net 23
  • 24. CSS inline  <h1 style="color:blue;margin-left:30px;"> This is a heading.</h1> 23/4/2015 http://blog.kerul.net 24
  • 25. CSS example <!DOCTYPE html> <html> <head> <style> body { } </style> </head> <body style=“background-color: #b0c4de;”> <h1>My CSS web page!</h1> <p>Hello world! This is a W3Schools.com example.</p> </body> </html> 23/4/2015 http://blog.kerul.net 25
  • 26. JavaScript  Script to add live interaction to HTML <!DOCTYPE html> <html> <body> <h1 onmouseover="style.color='red'" onmouseout="style.color='black'">Mouse over this text</h1> </body> </html> 23/4/2015 http://blog.kerul.net 26
  • 27. JavaScript Example <!DOCTYPE html> <html> <head> <script> function myFunction() { var x = document.getElementById("fname"); x.value = x.value.toUpperCase(); } </script> </head> <body> Enter your name: <input type="text" id="fname" onblur="myFunction()"> <p>When you leave the input field, a function is triggered which transforms the input text to upper case.</p> </body> </html> 23/4/2015 http://blog.kerul.net 27
  • 28. Mobile Web Page  Create folders in web root as below 23/4/2015 http://blog.kerul.net 28
  • 29. Copy the template  css/jquery.mobile.min.css  js/jquery.min.js  js/jquery.mobile.min.js  index.html The css and js files are available in the jQuery.mobile 23/4/2015 http://blog.kerul.net 29
  • 30. Mobile Web page structure <!DOCTYPE html> <html> <head> <title>Page Title</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="css/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css" /> <script src="js/jquery-1.11.1.min.js"></script> <script src="js/jquery.mobile-1.4.5.min.js"></script> </head> <body> <div data-role="page"> <div data-role="header"> <h1>Page Title</h1> </div><!-- /header --> <div role="main" class="ui-content"> <p>Page content goes here.</p> </div><!-- /content --> <div data-role="footer"> <h4>Page Footer</h4> </div><!-- /footer --> </div><!-- /page --> </body> </html> 23/4/2015 http://blog.kerul.net 30 http://demos.jquerymobile.com/1.4.5/pages/
  • 31. Head segment <head> <title>Page Title</title> <meta charset="utf-8"> <meta name="viewport" content="width=device- width, initial-scale=1"> <link href="css/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css" /> <script src="js/jquery-1.11.1.min.js"></script> <script src="js/jquery.mobile-1.4.5.min.js"></script> </head> 23/4/2015 http://blog.kerul.net 31
  • 34. Changing the Theme  http://themeroller.jquerymobile.com/ 23/4/2015 http://blog.kerul.net 34
  • 35. Exercise  Developing department’s 3-page app. 23/4/2015 http://blog.kerul.net 35
  • 36. Build.phonegap.com  Fast apps generation 23/4/2015 http://blog.kerul.net 36
  • 40. Day 2 - BACKEND Connecting to Online Database  Server configuration.  PHP and MySql connectivity.  Gui tool to manage data.  MySql query for selecting data.  Using PHP to display data.  Search facilities.  Filterable in jQueryMobile.  Inserting a new record.  Search result listing using AJAX approach. 23/4/2015 http://blog.kerul.net 40
  • 41. Install the Web Server  For the back-end  Apache HTTPd – also available in XAMPP  Download at https://www.apachefriends.org/  localhost 23/4/2015 http://blog.kerul.net 41
  • 43. To be continued… 23/4/2015 http://blog.kerul.net 43