Master your Minecraft
 
 

Special Offers see all

Enter to WIN a $100 Credit

Subscribe to PowellsBooks.news
for a chance to win.
Privacy Policy

Tour our stores


    Recently Viewed clear list


    Q&A | November 20, 2014

    Ron Rash: IMG Powell’s Q&A: Ron Rash



    Describe your latest book/project/work. Something Rich and Strange is a collection of selected stories, including three stories previously... Continue »
    1. $19.59 Sale Hardcover add to wish list

    spacer

On Order

$36.25
New Trade Paper
Currently out of stock.
Add to Wishlist
available for shipping or prepaid pickup only
Qty Store Section
- Local Warehouse Software Engineering- Programming and Languages

Developing Hybrid Applications for the Iphone: Using HTML, CSS, and JavaScript to Build Dynamic Apps for the Iphone (Developer's Library)

by

Developing Hybrid Applications for the Iphone: Using HTML, CSS, and JavaScript to Build Dynamic Apps for the Iphone (Developer's Library) Cover

 

 

Excerpt

*** Developing Hybrid Applications for the iPhone

Preface

This book shows you how to create a new type of iPhone application: hybrid applications written in HTML, CSS, and JavaScript. Hybrid iPhone applications are standalone applications that run like regular applications on your iPhone, but don't require the files to live on a server on the Internet.

Creating hybrid iPhone applications reduces creation time and the learning curve required to get your application into the hands of your customers, because you don't have to learn Objective-C or have an intimate knowledge of the Cocoa frameworks.

Hybrid Application Development Tools

This book covers the two most commonly used open-source JavaScript software packages for writing applications for the iPhone and iPod touch devices: QuickConnectiPhone and PhoneGap. These packages enable you to build applications that access native device features directly from JavaScript, such as vibration, GPS location information, the accelerometer, and many other thingsmdall without writing a single line of Objective-C or Cocoa.

QuickConnectiPhone, downloaded from http://quickconnect.pbwiki.com, exposes the most native device behavior and provides a highly engineered, full-featured framework for development use. QuickConnectiPhone dramatically reduces your application's time-to-market because part of the framework consists of all of the glue code you have to typically write in Objective-C, Cocoa, and JavaScript. Best of all, it does not require a remote server for hosting JavaScript, HTML, and CSS files.

The second package is PhoneGap, downloaded from http://phonegap.com. PhoneGap exposes fewer native behaviors and is a library rather than a full-fledged framework. As a library, PhoneGap enables you to engineer your application any way you want. It does, however, require a remote server for hosting files.

To reduce the learning curve and improve your understanding, good, solid examples are used throughout this book.

If you want to create installable iPhone applications, have the web skills required, and if you want to create dynamic, compelling solutions that people will use, this book shows you how using these two packages.

Table P—1 compares what each package can do at the time of writing this book.

Table P—1: Comparing the Features of QuickConnectiPhone and PhoneGap

Behavior/Data Available

QuickConnectiPhone

PhoneGap

GPS

Yes

Yes

Accelerometer

Yes

Yes

Vibrate

Yes

Yes

System sounds

Yes

Yes

Ad-hoc (Bonjour) networking

Yes

No

Sync cable networking

Yes

No

Browser-based database access

Yes

No

Shipped database access

Yes

No

Drag-and-drop library

Yes

No

AJAX wrapper

Yes

No

Record/Play audio files

Yes

No

Embedded Google maps

Yes

No

Charts and graphs library

Yes

No

How to Use This Book

Each chapter is organized into two parts. The first part shows you how to use the relevant feature of either QuickConnectiPhone or PhoneGap to accomplish a particular task, such as getting the current geolocation of the device. The second part of the chapter shows how the code behind the JavaScript call is written and how it works. You can decide how deep into the JavaScript and Objective-C you want to delve.

The book is organized as follows:

  • Chapter 1, "Developing with Dashcode and Xcode," teaches you how to use Dashcode and Xcode together with QuickConnectiPhone and PhoneGap to quickly create fun-to-use applications that run on the iPhone. This chapter includes basic Dashcode use and methods for moving your Dashcode application into Xcode for compiling and running on devices.
  • Chapter 2, "JavaScript Modularity and iPhone Applications," teaches you how to dramatically reduce your time to market by taking advantage of the modularity of the QuickConnectiPhone framework. How front controllers, application controllers, and JavaScript reflection are used in code is explained.
  • Chapter 3, "Creating iPhone User Interfaces," helps ensure that Apple App Store distribution approves your applications. It describes best practices for creating highly usable iPhone applications. The different types of applications usually created for iPhones are described as well as pitfalls to watch out for.
  • Chapter 4, "GPS, Acceleration, and Other Native Functions with QuickConnectiPhone," shows you how to get GPS, acceleration, and device description information, and it teaches you how to vibrate your phone and play and record audio files. You use the QuickConnectiPhone framework to access and use these device behaviors. These abilities give your applications a truly native, fun feel.
  • Chapter 5, "GPS, Acceleration, and Other Native Functions with PhoneGap," shows you how to get GPS, acceleration, and device description information as well as how to vibrate your phone and play and record audio files. You use the PhoneGap library to access and use these native device behaviors. These abilities give your applications a truly native, fun feel.
  • Chapter 6, "Embedding Google Maps," shows you how to put a Google map inside your application using QuickConnectiPhone. This is one of the most requested pieces of functionality that means you won't have to send your users to the map application!
  • Chapter 7, "Database Access," shows you how to get information from and store data in SQLite databases included in your application created with the QuickConnectiPhone framework. Do you need to ship a predefined set of data in a database with your new applications? Read this chapter.
  • Chapter 8, "Remote Data Access," Do you need to access and use data from remote servers and/or services in your installed application? Chapter 8 shows you how to make this easy with a wrapper that lets you pull information from anywhere. Maybe you need to get data from an online blog and merge it with a Twitter feed. QuickConnectiPhone's remote-data-access module makes it easy.

The following appendices are also included:

  • Appendix A, "Introduction to JSON," provides you with a brief introduction to JavaScript Object Notation (JSON). JSON is one of the most commonly used and easiest ways to transfer your data wherever it needs to go.
  • Appendix B, "The QuickConnectiFamily Development Roadmap," provides you with an overview of the growth of QuickConnectiPhone in the future. If you are planning on creating applications for iPhones and other platforms, such as Google's Android phones, Nokia phones, Blackberries, and desktops such as Mac OS X, Linux, and Windows you should take a look at this appendix.
  • Appendix C, "The PhoneGap Development Roadmap," provides an overview of the growth of PhoneGap in the future. If you plan to create applications for iPhones and other platforms (such as Google's Android phones, Nokia phones, and Blackberries) and desktops (such as Mac OS X, Linux, and Windows), you should take a look at this appendix.

Online Resources

QuickConnectiPhone and PhoneGap are undergoing rapid development. To keep up with the new functions and capabilities and to learn more, use the following links.

QuickConnectiPhone:

  • Download examples and the framework from https://sourceforge.net/projects/quickconnect/.
  • Review the development blog at http://tetontech.wordpress.com.
  • Read the Wiki at http://quickconnect.pbwiki.com/FrontPage.
  • Find the Google group at http://groups.google.com/group/quickconnectiPhone/,
  • Twitter at http://twitter.com/quickconnect.

PhoneGap:

  • Download examples and the framework from https://sourceforge.net/projects/phonegapinstall/.
  • Visit the web site at http://www.phonegap.com/.
  • Read the Wiki at http://phonegap.pbwiki.com/.
  • Find the Google group at http://groups.google.com/group/phonegap.
  • Twitter at http://twitter.com/phonegap.

Prerequisites

You need a basic understanding of HTML, CSS, and Javascript to effectively use this book. If you have created web pages using these tools, you are well on your way to creating iPhone applications. If you need help with Objecive-C in both QuickConnectiPhone and PhoneGap, it is provided. This book is not intended to be an introductory book on Objective-C or on how to use it to develop iPhone applications.

You need to download and install Apple's Xcode tools from the iPhone developer web site at http://developer.apple.com/iphone. This requires Mac OS X 10.5 or greater and an Intel-based Mac.

Although it isn't required, you should also have either an iPhone or an iPod touch, so you can test and run the applications on those devices.

Contacting the Author

To contact the author by email, use quickconnectfamily@gmail.com. For other types of contact, use Twitter, the Wiki, and Google Group links provided earlier.

© Copyright Pearson Education. All rights reserved.

Product Details

ISBN:
9780321604163
Author:
Barney, Lee S.
Publisher:
Addison-Wesley Professional
Author:
Barney, Lee
Subject:
Programming Languages - General
Subject:
Hardware - Handheld Devices
Subject:
Telecommunications
Subject:
IPhone (Smartphone) - Programming
Subject:
Application software -- Development.
Subject:
Data Transmission Systems - General
Subject:
Software Engineering - Programming and Languages
Copyright:
Edition Description:
Trade paper
Series:
Developer's Library
Publication Date:
June 2009
Binding:
TRADE PAPER
Grade Level:
Professional and scholarly
Language:
English
Illustrations:
Y
Pages:
216
Dimensions:
8.80x6.90x.50 in. .75 lbs.

Related Subjects

Computers and Internet » Computers Reference » General
Computers and Internet » Software Engineering » Programming and Languages
Engineering » Communications » Telephony
Science and Mathematics » Electricity » General Electronics

Developing Hybrid Applications for the Iphone: Using HTML, CSS, and JavaScript to Build Dynamic Apps for the Iphone (Developer's Library) New Trade Paper
0 stars - 0 reviews
$36.25 Backorder
Product details 216 pages Addison-Wesley Professional - English 9780321604163 Reviews:
"Synopsis" by ,

“For those not ready to tackle the complexities of Objective-C, this is a great way to get started building iPhone apps. If you know the basics of HTML, JavaScript, and CSS, you’ll be building apps in no time.”

—August Trometer, Owner of FoggyNoggin Software, www.foggynoggin.com

 

Discover the Easier, Faster Way to Build High-Quality iPhone Applications

 

Now, you don’t need to dive headfirst into Objective-C to write state-of-the-art applications for the iPhone. You can use web development tools and technologies you already know: JavaScript, HTML, and CSS. In this book, long-time web and mobile application developer Lee S. Barney shows you how to use the QuickConnect and PhoneGap frameworks to create secure, high-quality, modular hybrid iPhone applications.

 

Lee S. Barney walks you through the entire hybrid iPhone development process, from creating great user interfaces to compiling, deploying, and executing applications. Along the way, he introduces techniques and sample code designed to streamline development, eliminate complexity, optimize performance, and leverage all iPhone’s native capabilities—from its accelerometer and GPS to its built-in database. Coverage includes

 

  • Using Dashcode and Xcode together to create unique, exciting hybrid iPhone applications
  • Using the QuickConnect JavaScript API to perform tasks ranging from vibrating the phone to accessing the accelerometer and GPS location data
  • Accessing native iPhone functionality using the PhoneGap JavaScript API
  • Storing, retrieving, and managing data on the iPhone, even without network access
  • Using XMLHttpRequest to access or synchronize remote data and use web services
  • Creating Google-based maps for your own app that work like those you see in the iPhone’s Maps application

 

This book systematically lowers the barriers to iPhone development, enabling web developers to build any iPhone application they can imagine without long development cycles or steep learning curves!

spacer
spacer
  • back to top

FOLLOW US ON...

     
Powell's City of Books is an independent bookstore in Portland, Oregon, that fills a whole city block with more than a million new, used, and out of print books. Shop those shelves — plus literally millions more books, DVDs, and gifts — here at Powells.com.