Mobile web app dev with PhoneGap
This course material is written by makzan.
Table of Content
- Prefix
- Introduction – Getting ready.
- Project 1 – Twenty Five Timer
- Project 2 – Customize Page Transition
- Project 3 – Welcome Screen
- Project 4 – Rain or Not
- Project 5 – Exchange Rate
- Project 6 – HTML5 Cheatsheet
- Project 7 – Books to Buy
- Project 8 – Setting Up PhoneGap
- Project 9 – Company Informative App
- Project 10 – Canvas Drawing
- Project 11 – Devices Access
- Project 12 – Distribution Channels
- Appendix
Prefix
This is the handout for my mobile web app dev course hosted in Macao. It focuses on jQuery mobile and PhoneGap.
The type of the course handout uses examples approach. Using step-by-step guide to let readers learn by archiving several projects.
Make sure you check the code example while reading the book.
You can find the course code examples (and handouts from my previous PhoneGap course) in this github page. And you may need some diff tools to compare between steps of the code examples.
If you need reference on using the web standards, I recommend checking the Mozilla Developer Network for reference and StackOverflow for questions and issues.
At the end of the course, you’ll need to deliver and demonstrate a project. Here is the project requirement.
Before getting start, you might want to check a list of learning resources.
Introduction
Getting ready.
- Entering the era of mobile app
- Client-side technology
- Server-side technology
- Web app and Software-as-a-Service
- The modern web
- What is PhoneGap?
- The use of PhoneGap
- Write once & run everywhere?
- The tools we need in this course
- App categories
- Knowing javascript
- Choosing javascript ui frameworks
- Going MVC
- Idea and execution
- jQuery project boilerplate
Note. If you find boring setting up a new jQuery mobile project each time, you may start with this starter kit.
Project 1
Getting started.
- Twenty five timer
- Linking pages
- Timer logic — Entry point
- Timer logic — Timer ticker
- Timer logic — Core
- Timer logic — Time’s up
- About function context
- TouchStart and TouchEnd event
Project 2
Customize page transition.
- Transition
- Customize page transition
- Page transition — The CSS part
- Sequential and simultaneous
- Enhance the transition with blur filter
- Exercises
- Quiz time
Project 3
Welcome screen.
- Changing the app style
- Adding tutorial page at the beginning
- Adding SwipeJS to welcome page
- Welcome tutorial with style
- The done button
Project 4
Rain or not.
- Example weather app for Macao
- The OpenWeatherMap
- $.getJSON
- Parse JSON
- Code for rain
- JSON with padding
- Preparing graphics
- Crafting our Rain-or-Not app
- Refactoring
- Refactoring again
- Getting weather from location
- Getting user location
- Fetch weather from location
- Integrating location into our app
Project 5
Exchange rate.
- Exchange rate example – Planning
- Exchange rate example – API
- Exchange rate example – Exchange function
- Exchange rate example – Full example
- Challenges
Project 6
HTML5 cheatsheet.
- Example: HTML5 Cheatsheet – List view in jQuery mobile
- Example: HTML5 Cheatsheet – Moving data from HTML to Javascript
- Example: HTML5 Cheatsheet – Showing more detail
- Challenges
- Refractoring
- Obsolated tags
- Adding links
- Adding an icon
- Divider
- Filtering
- Listview exercise
- Nested list
- List with tabs
Project 7
Books wishlist example.
- Example: Books to buy
- Books-to-buy Mockup
- Model for adding book
- View for adding book
- Cloning with data
- Remove book entry
- Taking the inputs data
- Introducing LocalStorage
- Converting Objects into JSON String
- More Complex Keys
- Complex Keys – Hands On Exercise
- Saving the book list
- Adding tags as string
- Refractoring the LocalStorage module
- Planning the tags data structure
- Introducing Lo-Dash
- Listing all the tags
- Know which checkboxes are checked
- Adding the ISBNs to tag data
- Getting the book list from tag
- Render book list with argument
- Reseting all data
- Optional – Panel
- Adding Amazon link
- Enhance the remove button in list item
- Books-to-buy challenge
Project 8
Setup PhoneGap.
- When we need PhoneGap?
- Setting up the PhoneGap environment
- Testing on emulator
- Creating Android PhoneGap project
- The node.js approach
Project 9
Company informative app.
- Building a company app
- jQuery Google map
- News page
- News content
- MomentJS
- Gallery
- View photo
- Setup Mongolab
- Feedback form – HTML
- Feedback form – Model
- Feedback form – View
- More controls
- Input range
Project 10
Canvas drawing.
- Canvas drawing
- Using canvas
- Drawing with touch
- Mirror drawing
- Challenge kaleidoscope
- Base64 encode
- List of drawings
- Introducing websql
- Storing drawings in websql
- Phonegap device ready event
- Challenge – Adding Color
- Challenge – Replay Drawing
- Drawing pad future plan
Project 11
Accessing device resources.
- Photo capture
- Capture video
- Capture audio
- Video audio playback
- Inspecting the accelerometer sensor
- Accelerometer value bar chart
- Inspecting the gyroscope sensor
Project 12
Distribution channels.
- Testing web app on devices in local network
- App distribution
- Distributing to the web
- Minify your code
- Adding the web app to iOS home screen
- Phonegap Build
- Publish to App Store
- Publish to Google Play
- Distribution is just the beginning
- Some more tips
Appendix
Misc resources.