INTRODUCTION

THE AMAZING SUCCESS OF THE IPHONE and iPad over the past four years has proven that application developers are now smack deep in a brave new world of sophisticated, multifunctional mobile applications. No longer do applications and various media need to live in separate silos. Instead, mobile web-based applications can bring together elements of web apps, native apps, multimedia video and audio, and the mobile device.

This book covers the various aspects of developing web-based applications for IOS. Specifically, you will discover how to create a mobile application from the ground up, utilize existing open source frameworks to speed up your 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.

WHO THIS BOOK IS FOR

This book is aimed primarily for beginning and intermediate web developers who want to build new applications for IOS or migrate existing web apps to this platform. In general, readers will find it helpful to have a working knowledge of the following technologies:

  • HTML/XHTML
  • CSS
  • JavaScript
  • Ajax

However, if you are a less experienced working with these technologies, be sure to take advantage of the early chapters at the start of the book.

WHAT THIS BOOK COVERS

This book introduces readers to the web application platform for IOS. It guides readers through the process of building new applications from scratch and migrating existing web applications to this new mobile platform. As it does so, it 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.

HOW THIS BOOK IS STRUCTURED

The chapter-level breakdown is as follows:

1. Introducing IOS Development Using Web Technologies. Explores the Safari development platform and walks you through different ways you can develop apps for IOS.

2. Working with Core Technologies. Provides an overview of some of the key technologies you’ll be working with as you develop IOS web apps.

3. The Document Object Model. Explores how you can work with an HTML page as a tree in order to navigate and control various parts in your app.

4. Writing Your First Hello World Application. Guides you through the steps needed to create your first IOS app.

5. Enabling and Optimizing Web Sites for iPhone and iPad. Covers how to make an existing website compatible with mobile versions of Safari and then how to optimize the site for use as a full-fledged web application.

6. Designing the iPhone UI. Gives an overview of the key design concepts and principles you need to use when developing a highly usable interface for Safari on iPhone and iPod touch devices.

7. Designing for iPad. Looks at how to design UI’s for the iPad and how they differ from iPhone designs.

8. Styling with CSS. Discusses specific Safari-specific styles that are useful for developing web apps for IOS.

9. Programming the Interface. Provides a code-level look at developing an iPhone and iPad web application interface.

10. Handling Touch Interactions and Events. The heart of an IOS device is its touch screen interface. This chapter explores how to handle touch interactions and capture JavaScript events.

11. Special Effects and Animation. The Safari canvas provides an ideal environment for advanced graphic techniques, including gradients and masks

12. Integrating with IOS Services. Discusses how a web application can integrate with core services, including Phone, Mail, Google Maps, and GPS.

13. Packaging Apps as Bookmarks: Bookmarklets and Data URLs. This chapter explains how you can use two little used web technologies to support limited offline support.

14. Programming the Canvas. The mobile version of Safari provides full support for canvas drawing and painting, opening up opportunities for developers. This chapter dives into these advanced techniques.

15. Offline Applications. Covers how you can use HTML 5 offline cache to create local web apps that don’t need a live server connection.

16. Building with Web App Frameworks. Highlights the major open source iPhone web app frameworks and shows you how to be productive quickly with each of them.

17. Bandwidth and Performance Optimizations. Deals with the all-important issue of performance of web-based applications and what techniques developers can do to minimize constraints and maximize bandwidth and app execution performance.

18. Debug and Deploy. Discusses various methods of debugging Safari web applications.

19. Preparing for Native IOS Development. Walks you through all of the steps needed to join the Apple Developer Program and obtaining necessary credentials for publishing to the App Store.

20. PhoneGap: Native Apps from Your HTML, CSS, and JavaScript. How do you know when you need to move your web app to a native iPhone? This chapters explores migration strategies and shows you how you can take your Web app and wrap it inside of a native IOS shell.

21. Submitting Your App to the App Store. This final chapter wraps up the discussion by showing you how to take your app and submit it to the App Store for public distribution.

WHAT YOU NEED TO USE THIS BOOK

In order to work with the examples of the book, you will need:

  • iPhone, iPad, or iPod touch
  • Safari for Mac or Windows

The complete source code for the examples is available for download from our website at www.wrox.com.

CONVENTIONS

To help you get the most from the text and keep track of what’s happening, we’ve used a number of conventions throughout the book.

TRY IT OUT

The Try It Out is an exercise you should work through, following the text in the book.

1. They usually consist of a set of steps.

2. Each step has a number.

3. Follow the steps through with your copy of the database.

How It Works

After each Try It Out, the code you’ve typed will be explained in detail.

image

WARNING Boxes with a warning icon like this one hold important, not-to-be-forgotten information that is directly relevant to the surrounding text.

image

NOTE The pencil icon indicates notes, tips, hints, tricks, or asides to the current discussion.

As for styles in the text:

  • We highlight new terms and important words when we introduce them.
  • We show keyboard strokes like this: Ctrl+A.
  • We show file names, URLs, and code within the text like so: persistence.properties.
  • We present code in two different ways:
We use a monofont type with no highlighting for most code examples.
We use bold to emphasize code that is particularly important in the present context or to show changes from a previous code snippet.

SOURCE CODE

As you work through the examples in this book, you may choose either to type in all the code manually, or to use the source code files that accompany the book. All the source code used in this book is available for download at http://www.wrox.com. When at the site, simply locate the book’s title (use the Search box or one of the title lists) and click the Download Code link on the book’s detail page to obtain all the source code for the book. Code that is included on the website is highlighted by the following icon:

image

Listings include the filename in the title. If it is just a code snippet, you’ll find the filename in a code note such as this:

Code snippet filename

image

NOTE Because many books have similar titles, you may find it easiest to search by ISBN; this book’s ISBN is 978-1-118-15900-2.

Once you download the code, just decompress it with your favorite compression tool. Alternately, you can go to the main Wrox code download page at http://www.wrox.com/dynamic/books/download.aspx to see the code available for this book and all other Wrox books.

ERRATA

The editors and I worked hard to ensure that the contents of this book are accurate and that there are no errors either in the text or in the code examples. However, in cases future IOS releases impact what’s been said here, I recommend making a visit to www.wrox.com and checking out the book’s Errata link. You will be taken to a page which lists all errata that has been submitted for the book and posted by Wrox editors.

If you discover an issue that is not found on the Errata page, I would be grateful for you to let us know about it. To do so, go to www.wrox.com/contact/techsupport.shtml and provide this information in the online form. The Wrox team will double check your information and, as appropriate, post it on the Errata page as well as correct the problem in future versions of the book.

P2P.WROX.COM

For author and peer discussion, join the P2P forums at p2p.wrox.com. The forums are a web-based system for you to post messages relating to Wrox books and related technologies and interact with other readers and technology users. The forums offer a subscription feature to e-mail you topics of interest of your choosing when new posts are made to the forums. Wrox authors, editors, other industry experts, and your fellow readers are present on these forums.

At http://p2p.wrox.com, you will find a number of different forums that will help you, not only as you read this book, but also as you develop your own applications. To join the forums, just follow these steps:

1. Go to p2p.wrox.com and click the Register link.

2. Read the terms of use and click Agree.

3. Complete the required information to join, as well as any optional information you wish to provide, and click Submit.

4. You will receive an e-mail with information describing how to verify your account and complete the joining process.

image

NOTE You can read messages in the forums without joining P2P, but in order to post your own messages, you must join.

Once you join, you can post new messages and respond to messages other users post. You can read messages at any time on the Web. If you would like to have new messages from a particular forum e-mailed to you, click the Subscribe to this Forum icon by the forum name in the forum listing.

For more information about how to use the Wrox P2P, be sure to read the P2P FAQs for answers to questions about how the forum software works, as well as many common questions specific to P2P and Wrox books. To read the FAQs, click the FAQ link on any P2P page.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset