Beginning iOS Application Development with HTML and JavaScript

Overview

This book covers the various aspects of developing web-based applications for iOS. Over the past four years, the iPhone and iPad have been amazingly successful. Because of this success, application developers are entering a world of sophisticated, multifunctional mobile applications. Now mobile web-based applications can bring together web apps, native apps, multimedia video and audio, and the mobile device itself. By using this book you will learn how to create a mobile application from beginning to end, ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (27) from $3.05   
  • New (10) from $3.09   
  • Used (17) from $3.05   
Close
Sort by
Page 1 of 1
Showing 1 – 9 of 10
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$3.09
Seller since 2014

Feedback rating:

(265)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
PAPERBACK New 1118159004 XCITING PRICES JUST FOR YOU. Ships within 24 hours. Best customer service. 100% money back return policy.

Ships from: Bensalem, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$3.10
Seller since 2008

Feedback rating:

(4400)

Condition: New
1118159004 SHIPS WITHIN 24 HOURS!! (SAME BUSINESS DAY) GREAT BOOK!!

Ships from: BAY SHORE, NY

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$3.17
Seller since 2013

Feedback rating:

(389)

Condition: New
PAPERBACK New 1118159004! ! KNOWLEDGE IS POWER! ! ENJOY OUR BEST PRICES! ! ! Ships Fast. All standard orders delivered within 5 to 12 business days.

Ships from: Southampton, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$3.09
Seller since 2011

Feedback rating:

(710)

Condition: New
PAPERBACK New 1118159004 SERVING OUR CUSTOMERS WITH BEST PRICES. FROM A COMPANY YOU TRUST, HUGE SELECTION. RELIABLE CUSTOMER SERVICE! ! HASSLE FREE RETURN POLICY, SATISFACTION ... GURANTEED**** Read more Show Less

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$3.18
Seller since 2010

Feedback rating:

(901)

Condition: New
PAPERBACK New 1118159004 Friendly Return Policy. A+++ Customer Service!

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$3.31
Seller since 2010

Feedback rating:

(674)

Condition: New
PAPERBACK New 1118159004! ! ! ! BEST PRICES WITH A SERVICE YOU CAN RELY! ! !

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$3.53
Seller since 2009

Feedback rating:

(2338)

Condition: New
2012-02-01 Paperback 1 New 1118159004 Ships Within 24 Hours. Tracking Number available for all USA orders. Excellent Customer Service. Upto 15 Days 100% Money Back Gurantee. Try ... Our Fast! ! ! ! Shipping With Tracking Number. Read more Show Less

Ships from: Bensalem, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$21.98
Seller since 2008

Feedback rating:

(278)

Condition: New
1118159004 New item in stock, may show minimal wear from storage. No remainder mark. I ship daily and provide tracking! 100% Money Back Guarantee!

Ships from: FORT MYERS, FL

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$21.98
Seller since 2013

Feedback rating:

(3)

Condition: New
PAPERBACK New 1118159004 New item in stock, may show minimal wear from storage. No remainder mark. I ship daily and provide tracking! 100% Money Back Guarantee!

Ships from: LEHIGH ACRES, FL

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing 1 – 9 of 10
Close
Sort by
Sending request ...

Overview

This book covers the various aspects of developing web-based applications for iOS. Over the past four years, the iPhone and iPad have been amazingly successful. Because of this success, application developers are entering a world of sophisticated, multifunctional mobile applications. Now mobile web-based applications can bring together web apps, native apps, multimedia video and audio, and the mobile device itself. By using this book you will learn how to create a mobile application from beginning to end, utilizing open source frameworks to speed up development times, emulate the look and feel of built-in Apple applications, capture finger touch interactions, and optimize applications for Wi-Fi and wireless networks.

The book introduces you to the web application platform for iOS. It also guides you through the process of building new applications from scratch as well as migrating existing web applications to this new mobile platform. By doing this, the book helps readers design a user interface that is optimized for iOS touch-screen displays and integrate their applications with iPhone services, including Phone, Mail, Google Maps, and GPS.

This book is aimed at beginning and intermediate web developers who want to learn how to build new applications for iOS or migrate existing web apps to this platform. In general, you will find it helpful if you have a working knowledge of these technologies:

  • HTML/XHTML
  • CSS
  • JavaScript
  • Ajax
Read More Show Less

Product Details

  • ISBN-13: 9781118159002
  • Publisher: Wiley
  • Publication date: 2/1/2012
  • Edition number: 1
  • Pages: 432
  • Product dimensions: 7.40 (w) x 9.20 (h) x 0.90 (d)

Meet the Author

Richard Wagner is Lead Product Architect of Mobile/Web at Maark, LLC. He is an experienced web designer and developer and the author of several web-related books on the underlying technologies of the iPhone application platform.
Read More Show Less

Read an Excerpt

Beginning iOS Application Development with HTML and JavaScript


By Richard Wagner

John Wiley & Sons

Copyright © 2012 John Wiley & Sons, Ltd
All right reserved.

ISBN: 978-1-1181-5900-2


Chapter One

Introducing iOS Development Using Web Technologies

WHAT YOU WILL LEARN IN THIS CHAPTER:

* Using Safari on iOS as a development environment

* Developing touch-oriented apps

* Setting up your development environment

The introduction of the iPhone, and the subsequent unveilings of the iPod touch and iPad, revolutionized the way people interacted with hand-held devices. No longer did users have to use a keypad for screen navigation or browse the Web through "dumbed down" pages. These mobile devices brought touch screen input, a revolutionary interface design, and a fully functional web browser right into the palms of people's hands.

Seeing the platform's potential, the developer community jumped on board. Although native applications may receive most of the attention, you can still create apps for iOS devices without writing a single line of Objective-C. In fact, the Safari on iOS browser provides a compelling application development platform for web developers who want to create custom apps for iOS using familiar web technologies.

DISCOVERING THE SAFARI ON IOS PLATFORM

An iOS web application runs inside the built-in Safari browser that is based on web standards, including the following:

* HTML/XHTML (HTML 4.01 and XHTML 1.9, XHTML mobile profile document types)

* CSS (CSS 2.1 and partial CSS3)

* JavaScript (ECMAScript 3 (ECMA 262), JavaScript 1.4)

* AJAX (for example, XMLHTTPRequest)

* SVG (Scalable Vector Graphics) 1.1

* HTML5 media tags

* Ancillary technologies (video and audio media, PDF, and so on)

Safari on iOS (which I refer to throughout the book interchangeably as Safari or Safari on iOS) becomes the platform upon which you develop applications and becomes the shell in which your apps must operate (see Figure 1-1).

Safari is built with the same open source WebKit browser engine as Safari for OS X and Safari for Windows. However, although the Safari family of browsers is built on a common framework, you'll find it helpful to think of Safari on iOS as a close sibling to its Mac and Windows counterparts rather than as an identical twin to either of them. Safari on iOS, for example, does not provide the full extent of CSS or JavaScript functionality that its desktop counterpart does.

In addition, Safari on iOS provides only a limited number of settings that users can configure. As Figure 1-2 shows, users can turn off and on support for JavaScript, plug-ins, and a pop-up blocker. Users can also choose whether they want to always accept cookies, accept cookies only from sites they visit, or never accept cookies. A user can also manually clear the history, cookies, and cache from this screen.

Quite obviously, native apps and Web apps are not identical to each other — both from developer and end-user standpoints. From a developer standpoint, the major difference is the programming language — utilizing Web technologies rather than Objective-C. However, there are also key end-user implications, including the following:

* Performance: The performance of a Safari-based web application is not going to be as responsive as a native compiled application, both because of the interpretive nature of the programming languages as well as the fact that the application operates over Wi-Fi and 3G networks. (Remember, some iPad models and all models of the iPod touch support Wi-Fi access only.) However, in spite of the technological constraints, you can perform many optimizations to achieve acceptable performance.

* Launching: Native applications are all launched from the main Home screen of the iOS device (see Figure 1-3). In the original iPhone OS release, Apple provided no way for web apps to be launched from here, which meant that web apps to be accessed from the Safari Bookmarks list. Fortunately, the most recent iOS enables users to add "Web Clip" icons for their web app (such as the Color Mail web app shown in Figure 1-4) so that they can appear on the Home screen, too.

* User interface (UI): Native iOS applications often adhere to Apple UI design guidelines. When you design a web app, you should never feel compelled to try to perfectly re-create a native-looking UI. At the same time, you should create a UI that is ideally suited for a mobile, touch device. Fortunately, using open source frameworks and standard web technologies, you can do so using a combination of HTML, CSS, and JavaScript. Figures 1-5 and 1-6 compare the UI design of a native application and a Safari-based web app.

What's more, recent upgrades to the iOS now enable you to hide all Safari browser UI elements through meta tags, so you can essentially emulate the look and feel of a native app. (See Figure 1-7.)

KEY SAFARI FEATURES FOR WEB DEVELOPERS

There are several capabilities available to web app developers with the recent releases of iOS. These are highlighted in the following list.

* Geolocation: Safari on iOS supports HTML5 geolocation capabilities, which enables JavaScript to interact with the iPhone or iPad's GPS service to retrieve the current location of the device (see Figures 1-8 and 1-9). As a result, you can create apps that can broadcast the location of a GPS-enabled iOS device.

Google, for example, uses this capability with its Web-based Latitude service for sharing your location with your friends.

* HTML5 Media Tags: Safari on iOS supports HTML5 video and audio elements for embedding video and audio content in Web pages. These new elements eliminate the need for complicated embed and object tags for embedding multimedia elements and enable you to utilize a powerful JavaScript API. What's more, because iOS devices don't support Flash, you can use the video tag to embed QuickTime .mov files. Because Safari is the first major browser to provide full support for HTML5 media tags, you have to be careful in their usage on standard websites because other browsers may not support it yet. However, because you are creating an app specifically for iOS, you can make full use of these tags.

* CSS animation and effects: The new release of Safari supports CSS animation, which enables you to manipulate elements in various ways, such as scaling, rotating, fading, and skewing. Safari on iOS also supports CSS effects, which enable you to create gradients, masks, and reflections entirely through CSS.

* SVG: SVG (Scalable Vector Graphics) is an XML-based format for creating static and animated vector graphics. With SVG support, Safari on iOS not only provides a way to work with scalable graphics, but actually provides a technology that could replace the need for Flash to create animated media.

FOUR WAYS TO DEVELOP WEB APPS FOR IOS

A web application that you can run in any browser and an iOS web application are certainly made using the same common ingredients — HTML, CSS, JavaScript, and AJAX — but they are not identical. In fact, there are four approaches to consider when developing for iOS devices:

* Level 1 — Fully compatible website or application: The ground level approach is to develop a website or app that is "iOS friendly" and is fully compatible with the Apple mobile devices (see Figure 1-10). These sites avoid using technologies that the Apple mobile devices do not support, including Flash, Java, and other plug-ins. The basic structure of the presentation layer also maximizes use of blocks and columns to make it easy for users to navigate and zoom within the site. This basic approach does not do anything specific for iOS users, but makes sure that there are no barriers to a satisfactory browsing experience.

* Level 2 — Website or application optimized for Safari on iOS: The second level of support for iOS is to not only provide a basic level of experience for the user of Safari on iOS but also to provide an optimized user experience for users who use Safari browsers, such as utilizing some of the enhanced WebKit CSS properties supported by Safari.

* Level 3 — Dedicated mobile website or application: A third level of support is to provide a website or app tailored to the viewport dimensions of iPhone and/or iPad and provide a strong web browsing experience for all mobile device users (see Figures 1-11 and 1-12). However, although these sites are tailored for mobile viewing, they are not designed to take full advantage of iOS capabilities. And, in many cases, these are often stripped-down versions of a more complete website or application.

* Level 4 — iOS web application: The final approach is to provide a web application that is designed exclusively for iPhone and/or iPad and has a UI design that resembles a native app or one that takes full advantage of the capabilities of iOS devices (see Figure 1-13). One of the design goals is to minimize users' awareness that they are even inside of a browser environment. Moreover, a full-fledged iOS application will, as is relevant, integrate with iOS-specific services, including Phone, Mail, and Maps apps.

Therefore, as you consider your application specifications, be sure to identify which level of user experience you want to provide iOS users and design your application accordingly. In this book, I focus primarily on developing web applications optimized for iOS.

THE FINGER IS NOT A MOUSE

As you develop applications for iOS, one key design consideration that you need to drill into your consciousness is that the finger is not a mouse. On the desktop, a user can use a variety of input devices — such as an Apple Magic Mouse, a Logitech trackball, or a laptop touchpad. But, on screen, the mouse pointer for each of these pieces of hardware is always identical in shape, size, and behavior. However, on iOS, the pointing device is always going to be unique. Ballerinas, for example, probably input with tiny, thin fingers, while NFL players use big, fat input devices. Most of the rest of us will fall somewhere in between. Additionally, fingers are also not nearly as precise as mouse pointers are, making interface sizing and positioning issues very important, whether you are creating an iOS-friendly website or a full-fledged iPhone or iPad web application.

Additionally, finger input does not always correspond to a mouse input. A mouse has a left click, right click, scroll, and mouse move. In contrast, a finger has a tap, flick, drag, and pinch. However, as an application developer, you want to manage what types of gestures your application supports. Some of the gestures that are used for browsing websites (such as the double-tap zoom) are actually not something you normally want to support inside of an iOS web app. Table 1-2 displays the gestures that are supported on iOS as well as an indication as to whether this type of gesture should be supported on a website or full web application.

LIMITATIONS AND CONSTRAINTS

Because iPhone, iPad, and iPod touch are mobile devices, they are obviously going to have resource constraints that you need to be fully aware of as you develop applications. Table 1-3 lists the resource limitations and technical constraints. What's more, certain technologies (listed in Table 1-4) are unsupported, and you need to steer away from them when you develop for iOS devices.

SETTING UP YOUR DEVELOPMENT ENVIRONMENT ON A LOCAL NETWORK

Because iOS does not allow you to access the local file system, you cannot place your application directly onto the device itself. As a result, you need to access your web application through another computer. On a live application, you obviously want to place your application on a publicly accessible Web server. However, testing is another matter. If you have a Wi-Fi network at your office or home, I recommend running a web server on your main desktop computer to use as your test server during deployment.

If you are running Mac OS X, you already have Apache web server installed on your system. To enable iOS access, go to System Preferences, Sharing Services and turn the Web Sharing option on (see Figure 1-14). When this feature is enabled, the URL for the website is shown at the bottom of the window. You use this base URL to access your web files from an iOS device.

You can add files either in the computer's website directory (/Library/WebServer/Documents) or your personal website directory (/Users/YourName/Sites) and then access them from the URL bar on your iPhone or iPad (see Figure 1-15).

EXERCISES

1. What's the difference between a native iOS app and a web app?

2. Can a web app be placed on the Home screen alongside native apps?

3. Does finger input always correspond to mouse input?

Answers to the Exercises can be found in Appendix A.

WHAT YOU LEARNED IN THIS CHAPTER

TOPIC KEY CONCEPTS

Key Safari features for developers Geolocation support, HTML5 media tags, CSS animation and effects, and SVG

Supporting mobile devices on your Level 1: Fully compatible website/application website Level 2: Website/application optimized for Safari on iOS

Level 3: Dedicated mobile website/application

Level 4: iOS web application

(Continues...)



Excerpted from Beginning iOS Application Development with HTML and JavaScript by Richard Wagner Copyright © 2012 by John Wiley & Sons, Ltd. Excerpted by permission of John Wiley & Sons. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

INTRODUCTION xxiii

PART I: GETTING STARTED

CHAPTER 1: INTRODUCING IOS DEVELOPMENT USING WEB TECHNOLOGIES 3

CHAPTER 2: WORKING WITH CORE TECHNOLOGIES 15

CHAPTER 3: THE DOCUMENT OBJECT MODEL 47

CHAPTER 4: WRITING YOUR FIRST HELLO WORLD APPLICATION 65

CHAPTER 5: ENABLING AND OPTIMIZING WEB SITES FOR THE IPHONE AND IPAD 79

PART II: APPLICATION DESIGN

CHAPTER 6: DESIGNING THE IPHONE UI 99

CHAPTER 7: DESIGNING FOR IPAD 117

CHAPTER 8: STYLING WITH CSS 135

PART III: APPLICATION DEVELOPMENT

CHAPTER 9: PROGRAMMING THE INTERFACE 153

CHAPTER 10: HANDLING TOUCH INTERACTIONS AND EVENTS 189

CHAPTER 11: SPECIAL EFFECTS AND ANIMATION 207

CHAPTER 12: INTEGRATING WITH IOS SERVICES 223

CHAPTER 13: PACKAGING APPS AS BOOKMARKS: BOOKMARKLETS AND DATA URLS 235

PART IV: ADVANCED PROGRAMMING TECHNIQUES

CHAPTER 14: PROGRAMMING THE CANVAS 251

CHAPTER 15: OFFLINE APPLICATIONS 269

CHAPTER 16: BUILDING WITH WEB APP FRAMEWORKS 287

CHAPTER 17: BANDWIDTH AND PERFORMANCE

OPTIMIZATIONS 303

CHAPTER 18: DEBUG AND DEPLOY 317

PART V: NEXT STEPS: DEVELOPING NATIVE IOS APPLICATIONS WITH HTML AND JAVASCRIPT

CHAPTER 19: PREPARING FOR NATIVE IOS DEVELOPMENT 333

CHAPTER 20: PHONEGAP: NATIVE APPS FROM YOUR HTML, CSS, AND JAVASCRIPT 345

CHAPTER 21: SUBMITTING YOUR APP TO THE APP STORE 363

APPENDIX: EXERCISE ANSWERS 375

INDEX 381

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)