SlideShare a Scribd company logo
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

More Related Content

What's hot (20)

PDF
Alex Corbi building a 100 % Open Source based Open Data Platform
Alex Corbi
 
PDF
The WebView Role in Hybrid Applications
Haim Michael
 
PPTX
Shining a light on performance (js meetup)
Yoav Niran
 
DOCX
INTERNSHIP REPORT
Mufaddal Vasi
 
PDF
Schemaorg cmsplugins
STIinnsbruck
 
PDF
Develop Mobile App Using Android Lollipop
Edureka!
 
PDF
BACnet HMI5 - BACnet Touch Panel - BACnet Touch Screen - HMI
bacmove
 
PDF
Learn How to Animate your Android App
Edureka!
 
PDF
Top Web Development Frameworks Comparison: All You Need To Know
PixelCrayons
 
PPT
Cross-Platform Mobile Development in Visual Studio
bryan costanich
 
PPTX
Mobile Development With Flash Platform
Mihai Corlan
 
PDF
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Patrick Lauke
 
PDF
Building a mobile app connected to WordPress with WP-AppKit
Benjamin LUPU
 
PDF
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
Patrick Lauke
 
PPTX
3d web
Kevin Vandecar
 
PDF
Using Android 5.0 Lollipop
Edureka!
 
PDF
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Edureka!
 
PDF
Android development 1july
Edureka!
 
PDF
Introduction to Android Development
Edureka!
 
PDF
A Complete Solution for Web Development
Edureka!
 
Alex Corbi building a 100 % Open Source based Open Data Platform
Alex Corbi
 
The WebView Role in Hybrid Applications
Haim Michael
 
Shining a light on performance (js meetup)
Yoav Niran
 
INTERNSHIP REPORT
Mufaddal Vasi
 
Schemaorg cmsplugins
STIinnsbruck
 
Develop Mobile App Using Android Lollipop
Edureka!
 
BACnet HMI5 - BACnet Touch Panel - BACnet Touch Screen - HMI
bacmove
 
Learn How to Animate your Android App
Edureka!
 
Top Web Development Frameworks Comparison: All You Need To Know
PixelCrayons
 
Cross-Platform Mobile Development in Visual Studio
bryan costanich
 
Mobile Development With Flash Platform
Mihai Corlan
 
Brave new world of HTML5 - WebTech 2010 Milano 09.11.2010
Patrick Lauke
 
Building a mobile app connected to WordPress with WP-AppKit
Benjamin LUPU
 
HTML5 and friends - JISC CETIS Conference 2010 Nottingham 15.11.2010
Patrick Lauke
 
Using Android 5.0 Lollipop
Edureka!
 
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Edureka!
 
Android development 1july
Edureka!
 
Introduction to Android Development
Edureka!
 
A Complete Solution for Web Development
Edureka!
 

Viewers also liked (9)

PPT
Chapter 4 - Classes in Java
Khirulnizam Abd Rahman
 
PPT
Chapter 3 Arrays in Java
Khirulnizam Abd Rahman
 
PPTX
Tips menyediakan slaid pembentangan berkesan - tiada template
Khirulnizam Abd Rahman
 
PPTX
Topik 3 Masyarakat Malaysia dan ICT
Khirulnizam Abd Rahman
 
PPT
Chapter 2 Method in Java OOP
Khirulnizam Abd Rahman
 
PPT
Chapter 5 Class File
Khirulnizam Abd Rahman
 
PPT
Chapter 6 Java IO File
Khirulnizam Abd Rahman
 
PPTX
Topik 4 Teknologi Komputer: Hardware, Software dan Heartware
Khirulnizam Abd Rahman
 
PPT
Chapter 2 Java Methods
Khirulnizam Abd Rahman
 
Chapter 4 - Classes in Java
Khirulnizam Abd Rahman
 
Chapter 3 Arrays in Java
Khirulnizam Abd Rahman
 
Tips menyediakan slaid pembentangan berkesan - tiada template
Khirulnizam Abd Rahman
 
Topik 3 Masyarakat Malaysia dan ICT
Khirulnizam Abd Rahman
 
Chapter 2 Method in Java OOP
Khirulnizam Abd Rahman
 
Chapter 5 Class File
Khirulnizam Abd Rahman
 
Chapter 6 Java IO File
Khirulnizam Abd Rahman
 
Topik 4 Teknologi Komputer: Hardware, Software dan Heartware
Khirulnizam Abd Rahman
 
Chapter 2 Java Methods
Khirulnizam Abd Rahman
 
Ad

Similar to Mobile Web App development multiplatform using phonegap-cordova (20)

PDF
HTML5 and the dawn of rich mobile web applications pt 1
James Pearce
 
PPTX
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Gil Irizarry
 
PDF
HTML5 Technical Executive Summary
Gilad Khen
 
PPTX
Mobile applications for SharePoint using HTML5
Christian Heindel
 
PPTX
H1.pptxjkbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
harinim886
 
PPTX
s1 (1).hvjhbbbbbjkjvbbhjhbhnjkjhnhbjbhkjk
harinim886
 
PPTX
Phone gap
Madhura Keskar
 
PDF
Practical Web Development 1st Edition Wellens Paul
baqrliminola
 
PPT
Introduction to web development
Muhammad Shafiq
 
PPTX
Android App Development using HTML5 Technology
Oon Arfiandwi
 
PDF
How to Develop Cross-Platform Apps
Andrea Tino
 
PPTX
pras ppjznsms zkskmssia znjzmsmsmkM JKamens
RudreshPvb
 
KEY
Android development workshop
Jeff Sonstein
 
PDF
Anatomy of an HTML 5 mobile web app
Ivano Malavolta
 
PDF
Cross platform mobile web apps
James Pearce
 
PDF
Full Stack Development Course in Gurgaon
digitallynikitasharm
 
KEY
Michael Slater Mobile Opportunity
NorthBayWeb
 
PDF
(Ebook) Practical Web Development by kan
bopakipawira
 
PDF
Week 05 Web, App and Javascript_Brandon, S.H. Wu
AppUniverz Org
 
PDF
A Snapshot of the Mobile HTML5 Revolution
James Pearce
 
HTML5 and the dawn of rich mobile web applications pt 1
James Pearce
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Gil Irizarry
 
HTML5 Technical Executive Summary
Gilad Khen
 
Mobile applications for SharePoint using HTML5
Christian Heindel
 
H1.pptxjkbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
harinim886
 
s1 (1).hvjhbbbbbjkjvbbhjhbhnjkjhnhbjbhkjk
harinim886
 
Phone gap
Madhura Keskar
 
Practical Web Development 1st Edition Wellens Paul
baqrliminola
 
Introduction to web development
Muhammad Shafiq
 
Android App Development using HTML5 Technology
Oon Arfiandwi
 
How to Develop Cross-Platform Apps
Andrea Tino
 
pras ppjznsms zkskmssia znjzmsmsmkM JKamens
RudreshPvb
 
Android development workshop
Jeff Sonstein
 
Anatomy of an HTML 5 mobile web app
Ivano Malavolta
 
Cross platform mobile web apps
James Pearce
 
Full Stack Development Course in Gurgaon
digitallynikitasharm
 
Michael Slater Mobile Opportunity
NorthBayWeb
 
(Ebook) Practical Web Development by kan
bopakipawira
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
AppUniverz Org
 
A Snapshot of the Mobile HTML5 Revolution
James Pearce
 
Ad

More from Khirulnizam Abd Rahman (18)

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

Recently uploaded (20)

PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Python basic programing language for automation
DanialHabibi2
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 

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
  • 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