Pro jQuery Mobile
Copyright 2011 by Brad Broulik
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-4302-3966-6
ISBN-13 (electronic): 978-1-4302-3967-3
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
President and Publisher: Paul Manning
Lead Editor: Michelle Lowman
Development Editor: Susan Ethridge
Technical Reviewer: Jorge Ramon
Editorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Morgan Ertel,
Jonathan Gennick, Jonathan Hassell, Robert Hutchinson, Michelle Lowman,
James Markham, Matthew Moodie, Jeff Olson, Jeffrey Pepper, Douglas Pundick,
Ben Renow-Clarke, Dominic Shakeshaft, Gwenan Spearing, Matt Wade, Tom Welsh
Coordinating Editor: Jessica Belanger
Copy Editor: Lori Cavanaugh
Compositor: MacPS, LLC
Indexer: SPi Global
Artist: SPi Global
Cover Designer: Anna Ishchenko
Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com
, or visit www.springeronline.com
.
For information on translations, please e-mail rights@apress.com
, or visit www.apress.com
.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk SaleseBook Licensing web page at www.apress.com/bulk-sales
.
The information in this book is distributed on an as is basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.
The source code for this book is available to readers at www.apress.com
. You will need to answer questions pertaining to this book in order to successfully download the code.
To my parents, Luke and Reone for their unconditional love and support.
Mom, you'll be forever missed (1936 2010).
Brad
Contents at a Glance
Contents
About the Author
Brad Broulik is a senior developer specializing in enterprise mobile development at HealthPartners. Prior to mobile development he was the lead software architect at a financial services organization. He has extensive experience with most mobile technologies, particularly jQuery Mobile. He has contributed multiple pull requests to the jQuery Mobile project on GitHub and is actively developing several enterprise mobile apps with jQuery Mobile. He blogs regularly at http://bradbroulik.blogspot.com
, tweets as @BradBroulik, and can be contacted at BradBroulik@gmail.com
. He lives with his wife and daughter in Minnesota and enjoys exercising, outdoor activities, and spending time with family.
About the Technical Reviewer
Jorge Ramon is the founder of a small technology company that focuses on software development and developer education on mobile, web, and desktop technologies. He is also the author of the Ext JS 3.0 Cookbook.
Acknowledgments
I want to extend an enormous amount of appreciation to the entire jQuery Mobile core team: John Resig, Todd Parker, Scott Jehl, Kin Blas, John Bender, and Ghislain Seguin. It has been a pleasure to write about your remarkable creation.
I also want to thank the entire Apress team for their guidance and feedback: Michelle Lowman, editor; Jessica Belanger, coordinating editor; Susan Ethridge, developmental editor; Jorge Ramon, technical reviewer. This book would not have been possible without your help.
I want to especially thank my wife and daughter for their patience, support, and assistance with this project. Thank you!
Introduction
We are currently witnessing a shift in the way enterprises and individuals build and distribute mobile applications. Initially, the strategy was to build separate native apps for each major platform. However, teams quickly realized that maintaining multiple platforms was unsustainable as mobile teams lost their agility. The mobile teams that can build once and ship to all devices tomorrow will have a competitive advantage and jQuery Mobile can help get you there.
jQuery Mobile is a framework for delivering cross-platform mobile web applications with a unified interface. jQuery Mobile combines responsive layouts with progressive enhancement to render the best possible user experience from a single code base. With jQuery Mobile, we will see how to create themable, responsive, native-looking applications for iOS, Android, Windows Phone, Blackberry, and more. We will discover what sets jQuery Mobile apart from other mobile web development platforms and we will walk through practical examples of jQuery Mobile features, including design elements and event handling.