You are previewing Creating Mobile Apps with jQuery Mobile.
O'Reilly logo
Creating Mobile Apps with jQuery Mobile

Book Description

Learn to make practical, unique, real-world sites that span a variety of industries and technologies with the world’s most popular mobile development library

  • Write less, do more: learn to apply the jQuery motto to quickly craft creative sites that work on any smartphone and even not-so-smart phones

  • Learn to leverage HTML5 audio and video, geolocation, Twitter, Flickr, blogs, Reddit, Google maps, content management system, and much more

  • All examples are either in use in the real world or were used as examples to win business across several industries

In Detail

jQuery Mobile is a touch-optimized web framework (also known as a JavaScript library or a mobile framework) currently being developed by the jQuery project team. The development focuses on creating a framework compatible with a wide variety of smartphones and tablet computers made necessary by the growing but heterogeneous tablet and smartphone market. The jQuery Mobile framework is compatible with other mobile app frameworks and platforms such as PhoneGap, Worklight, and more.

Creating Mobile Apps with jQuery Mobile reflects the author’s years of experience and exposes every hidden secret which will ease your mobile app development. With just a smattering of design and user experience thrown in, going through this book will allow you to confidently say, “yes, I can do that.”

We’ll start out with effective mobile prototyping and then move directly to the core of what every one of your mobile sites will need. Then, we’ll move on to the fancy stuff.

After creating some basic business templates and a universal JavaScript, we will move into the more interesting side of mobile development but we always try to keep an eye on progressive enhancement. jQuery Mobile is all about reaching everyone. So is this book.

"Creating Mobile Apps with jQuery Mobile" will take your basic mobile knowledge and help you make versatile, unique sites quickly and easily.

Table of Contents

  1. Creating Mobile Apps with jQuery Mobile
    1. Table of Contents
    2. Creating Mobile Apps with jQuery Mobile
    3. Credits
    4. About the Author
    5. About the Reviewers
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. Can we build it? Yes, we can!
      2. What this book covers
      3. What you need for this book
      4. Who this book is for
      5. What we will cover
      6. Why jQuery Mobile
        1. Progressive enhancement and graceful degradation
        2. Accessibility
      7. Conventions
      8. Reader feedback
      9. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Prototyping jQuery Mobile
      1. The game has changed
      2. The mobile usage pattern
      3. HTML prototyping versus drawing
      4. Getting our hands dirty with small business
        1. The rest of the site
      5. Requirements
        1. Alternates to paper prototyping
      6. Summary
    9. 2. A Mom-and-Pop Mobile Website
      1. A new jQuery Mobile boilerplate
        1. Meta viewport differences
        2. Full-site links beyond the industry standard
      2. The global JavaScript
        1. .live versus .on
      3. The global CSS
      4. Breaking the HTML into a server side template
      5. What we need to create our site
        1. Getting Glyphish and defining custom icons
      6. Linking to phones, e-mails, and maps
        1. Custom fonts
        2. Page curl shadow effects for our list items
        3. Optimization: why you should be thinking of it first
        4. The final product
        5. The custom CSS
      7. The resulting first page
      8. Getting the user to our mobile site
        1. Detecting and redirecting using JavaScript
        2. Detecting on the server
      9. Summary
    10. 3. Analytics, long forms, and frontend validation
      1. Google Static Maps
        1. Adding Google Analytics
      2. Long and multi-page forms
      3. Integrating jQuery Validate
      4. E-commerce tracking with Google Analytics
      5. Summary
    11. 4. QR Codes, Geolocation, Google Maps API, and HTML5 Video
      1. QR codes
      2. Geolocation
      3. Integrating the Google Maps API
      4. Geek-out moment—GPS monitoring
      5. Linking and embedding video
      6. Summary
    12. 5. Client-side Templating, JSON APIs, and HTML5 Web Storage
      1. Client-side templating
      2. Patching into JSON APIs (Twitter)
      3. Programmatically changing pages
      4. Generated pages and DOM weight management
      5. Leveraging RSS feeds
        1. Forcing responsive images
      6. HTML5 Web Storage
        1. Browser-based databases (a work in progress)
        2. JSON to the rescue
      7. Leveraging the Google Feeds API
      8. Summary
    13. 6. HTML5 Audio
      1. HTML5 Audio
      2. Fixed position persistent toolbars (really!?)
      3. Controlling HTML5 Audio with JavaScript
      4. HTML5 Audio in iOS is different
      5. The all-in-one solution (multipage made useful)
      6. Saving to the home screen with HTML5 manifest
      7. Summary
    14. 7. Fully Responsive Photography
      1. Creating a basic gallery using PhotoSwipe
      2. Supporting the full range of device sizes – responsive web design
      3. Text readability and responsive design
        1. Smartphone-sized devices
        2. Tablet-sized devices
        3. Desktop-sized devices
      4. Cycling background images
      5. Another responsive approach – RESS
      6. The final code
      7. Summary
    15. 8. Integrating jQuery Mobile into Existing Sites
      1. Detecting mobile – server-side, client-side, and the combination of the two
        1. Browser sniffing versus feature detection
        2. WURFL – server-side database-driven browser sniffing
        3. JavaScript-based browser sniffing
        4. JavaScript-based feature detection using Modernizr
        5. JavaScript-based lean feature detection
        6. Server-side plus client-side detection
      2. Mobilizing full-site pages – the hard way
        1. Know your role
        2. Step 1 of 2 – focus on content, marketing cries foul!
        3. Step 2 of 2 – choose global navigation style and insert
          1. Global nav as a separate page
          2. Global nav at the bottom
          3. Global nav as a panel
        4. The hard way – final thoughts
      3. Mobilizing full-site pages – the easy way
      4. Summary
    16. 9. Content Management Systems and jQM
      1. The current CMS landscape
      2. WordPress and jQuery Mobile
        1. Manually installing the mobile theme switcher
        2. Automatically installing the mobile theme switcher
        3. Configuring the mobile theme switcher
          1. Drupal and jQuery Mobile
      3. Updating your WordPress and Drupal templates
        1. WordPress – Golden Apples jQM Theme
        2. Drupal – jQuery Mobile Theme
      4. Adobe Experience Manager
      5. Summary
    17. 10. Putting It All Together – Flood.FM
      1. A Taste of Balsamiq
      2. Organizing your code
        1. MVC, MVVM, MV*
        2. MV* and jQuery Mobile
        3. The application
        4. The events
        5. The model
      3. Introduction to the Web Audio API
      4. Prompting the user to install your app
      5. New device-level hardware access
        1. Accelerometers
        2. Camera
        3. APIs on the horizon
      6. To app or not to app, that is the question
        1. Raining on the parade (take this seriously)
        2. Three good reasons for compiling an app
          1. The project itself IS the product
          2. Access to native-only hardware capabilities
          3. Push notifications
          4. Supporting current customers
      7. PhoneGap versus Apache Cordova
      8. Summary
    18. Index