ISBN 9789350234747,Iphone Javascript Cookbook

Iphone Javascript Cookbook



Shroff Publishers & Distributors Pvt Ltd

Publication Year 2011

ISBN 9789350234747

ISBN-10 9350234742


Number of Pages 340 Pages
Language (English)

Computer And Internet

Undoubtedly, the iPhone is one of the most exciting mobile devices in the world. Its iOS is used in other Apple devices such as the iPad and iPod Touch. With this book you'll learn how to build and develop applications for these devices without applying Apple's burdensome and at times restrictive technologies. Just use your experience and knowledge combined with web front-end technologies like JavaScript to build quality web apps. Nobody will know you haven't used Objective-C and Cocoa. The iPhone JavaScript Cookbook offers a set of practical and clear recipes with a step-by-step approach for building your own iPhone applications applying only web technologies such as JavaScript and AJAX. Web developers won't need to learn a new programming language for building iOS applications with a native look and feel. The first part of the book introduces you to the world of iPhone applications. Understanding how it works is required for designing good user interfaces for this device. You will continue learning about how to apply multimedia features to your applications. Common features of web applications, such as AJAX and SQL, can also be applied to our iPhone applications. The third part of the book explains how to deal with specific features of iPhone such as the accelerometer. At the end, you learn how to offer additional features through external websites. With the iPhone JavaScript Cookbook, you will be able to develop outstanding web applications with a for Apple's mobile devices, offering your users all of the advantages of the native look and feel. What you will learn from this book : Installing and configuring a set of frameworks to make your life easier for developing web applications for iPhone Designing graphical user interfaces for iPhone applications using XHTML, CSS, and JavaScript Working with different events, actions, and effects, including touch gestures, multi-touch events, drag & drop, and sliding Dealing with images and pictures including accessing the device's camera Adding video and sound for your iPhone web applications Applying AJAX for better performance in web applications Differences between native and web applications for iPhone Working with data and SQL using the new HTML 5 features of Safari Mobile Accessing phone-specific features such as the Address Book for contacts Recognizing accelerometer movements and other features about positioning and geolocation Integrating your application with popular third-party websites and services such as Facebook, Twitter, and Flickr Approach Written in a cookbook style, this book offers solutions using a recipe-based approach. Each recipe contains step-by-step instructions followed by an analysis of what was done in each task and other useful information. The cookbook approach means you can dive into whatever recipes you want in no particular order. Who this book is written for This book is for web developers interested in applying their knowledge for building web applications for iOS devices. You can develop your own iPhone web applications using nothing but JavaScript combined with XHTML and CSS. You can even give these apps a native look and feel though you won't be able to submit them to the App Store. You will develop an application for iOS without having to learn the Objective-C programming language. This is the book for any iPhone developer looking to side-step Apple's totalitarian App Store regime. About the Author Arturo Fernandez Montoro is a web software engineer, developer, author, and technical writer specialized in Free and Open Source Software. His professional experience includes technologies like Django, Rails, J2EE, PHP, XHTML, CSS and JavaScript, working as software developer and architect, project manager, sysadmin, and consultant for various companies in Europe. Since 2002 he has been writing for various Linux and Open Source printed and on-line magazines like Todo Linux, Linux+, Linux Magazine, Free Software Magazine, and Rails Magazine. Currently, Arturo works as a Python/Django developer contributing to one of the most important and most visited websites in Spain. Table of Contents Preface Chapter 1: Frameworks Make Life Easier Introduction Installing the iUI framework Installing the UiUIKit framework Installing the XUI framework Installing the iWebKit framework Installing the WebApp.Net framework Installing the PhoneGap framework Installing the Sencha Touch framework Installing the Apple Dashcode framework Chapter 2: Building Interfaces Introduction Creating a toolbar Modifying the default status bar Creating a footer Creating a back button Creating a button for the toolbar Building a breadcrumb menu Building the duo navigation buttons Building the lists for items Building menus using lists Creating the toggle buttons Creating a modal box with buttons Building a search dialog Building the information fields Building forms with checkboxes, radio buttons, select fields, and text fields Creating and customizing a notification box Building a chat-style interface Creating a date picker Using different tabs Chapter 3: Events and Actions Introduction Identifying the devices Viewing applications in full screen Detecting full screen or browser mode Scaling to device width Preventing scaling Detecting one-finger events Detecting multi-touch events Preventing the default behavior for events Detecting rotation events Implementing drag-and-drop Adding visual effects Running your web application without Internet access Chapter 4: A Picture Speaks a Thousand Words Introduction Choosing an icon image for the application Specifying a splash image Displaying an image inside a container Creating a grid with images Creating a carousel for images Rotating images Scaling an image by applying animations Taking and displaying pictures Drawing geometric figures Applying colors Working with gradients Adding an activity indicator Chapter 5: Mastering Sound and Music Introduction Making a beep alert Making a vibrate alert Creating an iPod playlist and playing a specific item Loading an iTunes playlist Playing an audio file Playing a video Recording an audio Chapter 6: Exchanging Data: AJAX Introduction How to send HTTP requests Processing JSON responses Sending cross-domain requests Chapter 7: Working with Data: Storage and SQL Introduction Creating a database Creating a table Inserting records Searching and selecting records Deleting records Saving and reading preferences Storing data in session Chapter 8: This is a Phone Introduction Calling a number Sending an SMS to a number Selecting contacts Creating a new contact Searching and displaying contacts Chapter 9: Location, Location, Location Introduction Detecting current orientation Identifying the current location Opening Google Maps at a specific location Calculating distances between two points Chapter 10: Web 2.0 Integration Introduction Embedding an RSS feed Opening a YouTube video Posting on your Facebook wall Retrieving recent tweets from Twitter Displaying photos from Flickr Index