If you purchased this ebook directly from oreilly.com, you have the following benefits:
If you purchased this ebook from another retailer, you can upgrade your ebook to take advantage of all these benefits for just $4.99. to access your ebook upgrade.
Preface
In your pocket is a device that has changed the lives of billions of people all over the world. The third personal screen (after the TV and the computer) is the most personal one, and bringing our services to it is one of the key business priorities of this decade.
Mobile development, however, is a more challenging activity than desktop development. Platforms are severely fragmented, and developers have to work with minimal resources. Fortunately, the mobile web makes it easier to deal with this fragmentation, allowing developers to create applications that run on many more platforms than native (or installable) applications. As we will see later, the mobile web and installable applications are not enemies. In fact, they work together very well.
All of that sounds great: billions of devices, web technologies, multiplatform solutions... wheres the problem? More than half of your desktop web skills and the tips, hacks, and best practices you already know simply do not apply on the mobile web. The mobile web demands new usability patterns, new programming best practices, and new knowledge and abilities.
This is a second edition, prepared two years after the first one. At the time of the first edition there were almost no books, websites, or training courses focused on concrete mobile web programming. Today its more common to find such information; however, its not always good enough. We dont need vague information like this may not work on some phones; we need real, fresh, and working data. On which devices does a solution not work? Why? Is there another solution? That is why Ive written this book: to help developers in programming mobile websites.
You may feel that you are advanced enough to go directly to the code, but I encourage you to start from the beginning of the book if you are new to the mobile world. This is another universe, and every universe has its own rules.
Who This Book Is For
This book is for experienced web developers who want to learn whats different about designing for the mobile web. We will talk about HTML, CSS, JavaScript, Ajax, and server-side code as if you have experience with all those technologies. If you are a web designer with some basic programming skills, you will also find this book useful.
We will cover HTML5 features, but dont worry if you dont have any experience with this platform yet; we will cover it from the ground up, and your HTML 4 and XHTML 1.0 knowledge will be enough.
If you are an individual freelancer, if you work for a company in the areas of programming or web development, or if you work in a web design studio, this book is for you. Perhaps you need to create a mobile application or client for a current desktop service, you want to add new services to your portfolio, or you need to migrate an old mobile website to newer devices.
You may also be a web entrepreneur withor looking fora great idea for mobile devices, and you want to analyze what you can do with current mobile browsers. This book investigates compatibility device by device and discusses advanced features you can implement.
The book will also be useful if you are wondering how to identify devices and deliver proper and compatible content for ad campaigns, to sell content or to deliver free content to mobile users.
Who This Book Is Not For
I dont really want to cut anyone out of the possibility of reading this book, but there are a lot of people who arent likely to benefit from all of it. If you are a graphic designer, you will not find detailed tips and practices in this book, and you are likely to enjoy only the first four chapters.
If you are a web designer without programming skills, are the ones you should read line by line; the rest will be useful to review so you know the capabilities you can request from a developer.
If you are a native mobile developer (iPhone, Android, Java mobile, Windows Phone), some web knowledge will be required in order to understand and follow all the samples in this book.
This is also not a book for learning basic HTML, CSS, or JavaScript. You will not find detailed samples or step-by-step instructions on how to implement every task. It is assumed that you are experienced enough to create code on your own, or at least know how to find out by searching the Web.
If you are a manager, a CTO, a project leader, or an entrepreneur without any web knowledge, you will find the first four chapters useful: they describe the current state of the art in this market and should help you decide how to organize your team.
What Youll Learn
This book is an advanced reference for the mobile web today, and it is the most complete reference available at this time. This may seem an ambitious claim, but it is the truth. This book draws upon a mix of experience and very detailed research and testing not available in other books, websites, or research papers about the mobile web.
Programming the Mobile Web will teach you how to create effective and rich experiences for mobile web browsers, and also how to create native web applications that will be installed in a devices applications menu.
We will not talk only about the star devices, like the iPhone and Android devices; we will also cover mass-market platforms from Nokia, BlackBerry, Amazon, Microsoft, and other vendors.
Other Options
The main challenge looking for books and online resources is finding solutions that contain information, not ones having plenty of maybes, perhapses, and be carefuls.
If you need to learn web technologies, there are plenty of books and resources available. Take a look at oreilly.com/css-html and oreilly.com/javascript for some lists.
If you want a complement to this book in the areas of design, performance, and advanced programming, I recommend the following books:
Mobile Design and Development by Brian Fling (OReilly)
Programming the iPhone User Experience by Toby Boudreaux (OReilly)
JavaScript: The Good Parts by Douglas Crockford (OReilly)
High Performance JavaScript by Nicholas Zakas (OReilly)
High Performance Websites by Steve Souders (OReilly)
Even Faster Web Sites by Steve Souders (OReilly)
Website Optimization by Andrew B. King (OReilly)
Mobile JavaScript Application Development by Adrian Kosmaczewski (OReilly)
Mobile Usability by Jakob Nielsen and Raluca Budiu (New Riders Press)