ebook img

Seven Mobile Apps in Seven Weeks Native Apps, Multiple Platforms PDF

366 Pages·2016·13.5 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Seven Mobile Apps in Seven Weeks Native Apps, Multiple Platforms

Early praise for Seven Mobile Apps in Seven Weeks Tony does an excellent job at explaining the Xamarin concepts to first-time users! His fun tutorials keep the reader engaged while teaching them step-by-step to create their first mobile app in C#. ➤ Brandon Minnick Customer-success engineer, Xamarin The mobile software development landscape has never been wider than it is today. Tony Hillerson’s Seven Mobile Apps in Seven Weeks is a wonderful approach to showcasing the many options available for mobile application development. You’ll find this book is a valuable learning asset regardless of whether you’re starting fresh in the industry or looking to pick up experience on another mobile platform. This book is the "Three Wolf Moon" of the mobile software development world. ➤ Joshua Jamison Software engineer, Ride This book will teach you so much about mobile native and hybrid development by taking you on an in-depth journey exploring many approaches to create incred- ible apps across all the major platforms. An incredible and versatile source of knowledge that I recommend to any developer of any level. ➤ Daniel Wanja VP of engineering, Blinker I found this book much more engaging than I had anticipated. I am impressed by the author’s ability to cover the material with a delicate balance between glossing over important details and providing too much detail— overwhelming the reader. I highly recommend this title to anyone interested in a practical head-to-head comparison of modern mobile application-development approaches. ➤ Daniel Lamb Senior software engineer; Technical architect and author, CoStar Group Seven Mobile Apps in Seven Weeks Native Apps, Multiple Platforms Tony Hillerson The Pragmatic Bookshelf Raleigh, North Carolina Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf, PragProg and the linking g device are trade- marks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic books, screencasts, and audio books can help you and your team create better software and have more fun. Visit us at https://pragprog.com. The team that produced this book includes: Jacquelyn Carter (editor) Potomac Indexing, LLC (index) Candace Cunningham, Molly McBeath (copyedit) Gilson Graphics (layout) Janet Furlow (producer) For sales, volume licensing, and support, please contact [email protected]. For international rights, please contact [email protected]. Copyright © 2016 The Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN-13: 978-1-68050-148-3 Encoded using the finest acid-free high-entropy binary digits. Book version: P1.0—July 2016 Contents Acknowledgments . . . . . . . . . . . vii The Story So Far... . . . . . . . . . . . ix 1. Day 0: Setting Up the API . . . . . . . . . . 1 Setting Up and Running the API 1 Reviewing and Testing the Endpoints 3 Now We’re Ready 6 Part I — Official Native Platforms 2. Mobile Web . . . . . . . . . . . . . 9 A World-Clock App 10 Day 1: A Time for Beginnings 11 Day 2: Making Time 21 Day 3: Time to Move 32 Wrapping Up the Web App 48 3. iOS . . . . . . . . . . . . . . . 51 A Weather-Forecast App 52 Day 1: What’s It Like Out? 52 Day 2: What’s It Like There? 66 Day 3: Expanding Our Horizons 80 Wrapping Up iOS 99 4. Android . . . . . . . . . . . . . 101 A Currency-Conversion App 102 Day 1: How Far Does a Dollar Go? 103 Day 2: What Can I Get for a Buck? 117 Day 3: Time Is Money 127 Wrapping Up Android 139 • Contents vi 5. Universal Windows Platform . . . . . . . . 141 A Stock-Quote App 142 Day 1: The Initial Investment 143 Day 2: Trending Up 151 Day 3: A Wider Market 163 Wrapping Up Windows Phone 178 Part II — Cross-Platform Tools 6. RubyMotion . . . . . . . . . . . . 183 A To-Do App 184 Day 1: ✓ Android 185 Day 2: ✓ iOS 206 Day 3: ✓ Cross-Platform 218 Wrapping Up RubyMotion 227 7. Xamarin . . . . . . . . . . . . . 229 A Calculator App 230 Day 1: Adding Up the Platforms 230 Day 2: Dividing Up the Solution 250 Day 3: Subtracting Platform-Specific Code 266 Wrapping Up Xamarin 279 8. React Native . . . . . . . . . . . . 281 A Note-Taking App 282 Day 1: Comparing Notes 283 Day 2: Exchanging Notes 299 Day 3: Taking Note of Where We Are 311 Wrapping Up React Native 324 9. Wrapping Up . . . . . . . . . . . . 327 Official Native Platforms 327 Cross-Platform Tools 329 What’s Next? 332 Index . . . . . . . . . . . . . . 333 Acknowledgments When people ask where I got the concept for this book, I joke that it sprang fully formed into my head because I needed to answer questions about or build apps for multiple mobile platforms so many times. It certainly feels that way, but what most likely happened was that I had hundreds of conversations with coworkers, friends, clients, and industry experts about building apps for multiple platforms. Add to those conversations the great esteem I have for the Seven in Seven series, and you can see how I came to the conclusion to write this book. So, then, thank you to all of my coworkers and friends with whom I’ve had these conversations and built those apps over the years. We commiserated, we argued, we experimented, we built stuff, and I learned a great deal from all of you. Thank you also to Dave and Andy, the publishers; Bruce, the Seven in Seven series editor; and Jackie, the editor of this book, for helping me to make this an addition to the series that I enjoy so much. I really appreciate the opportunity. Writing a book like this, with seven technologies, requires more eyes than just mine on the code; it requires the help of reviewers both reviewing the book as a whole and diving deeply into technologies as experts. Here are the reviewers who made this book possible by finding bugs and corrections and offering style tips and encouragement. Thanks to all of you: Michael Hunter, Kevin Garriott, Daniel Wanja, Loren Sands-Ramshaw, Maricris Nonato, Javier Collado, Alessandro Bahgat, Daniel Lamb, Nishant Srivastava, Gábor László Hajba, Ramaninder Singh Jhajj, Stephen Wolff, Stefan Turalski, Kaan Karaca, Fabrizio Cucci, Jacob Henry, Colin Gray, Seth Howard, Eric Langland, Rob Malko, Brandon Minnick, Jack Moffitt, and Joshua Jamison. Finally, thanks to my wife, Lori, and our kids, Diāna, Lincoln, and Titus, for allowing me the time to write another book. report erratum • discuss The Story So Far... In the beginning there was a mobile platform, and it was good. It ran on the best mobile hardware available, both phones and tablets. It had an app store, where consumers could buy new software for their mobile devices. Developers liked to develop for this platform because the devices had fancy UIs, powerful SDKs were available, and people could make money from the app store to support their development. There was a competing platform, though, and a lot of those devices looked pretty good, too. But it wasn’t that easy to develop on. Its marketplace wasn’t as good and the toolset was really hard to work with. If you were a developer on the first platform, it didn’t seem very appealing to try to learn a whole dif- ferent platform. If you had a good thing going, there was not a lot of value in learning all new tools instead of spending time building apps you already knew how to build. The best bet was to stick with what was comfortable and just ride that gravy train to an early retirement. And then everything changed. The Only Constant In case you didn’t already guess, the mobile platform I was just talking about was Windows Mobile. Back in the days before the iPhone changed the mobile space, Windows Mobile had a pretty good thing going. It already had everything the iPhone introduced: an app store (by a different name) and good tools (for the time), and it ran on pretty sweet devices (by those days’ standards). It had a big competitor, or maybe more than one—who can remember back that far? The point is that if you were making your living by developing Windows Mobile apps then, there’s a really good chance you no longer are. Not that it would have helped to have been proficient at more than one platform when iOS came out and made them all pretty much obsolete. The point is not how many platforms you’re proficient on, but rather how proficient you are at learning new platforms. report erratum • discuss

Description:
Answer the question «Can we build this for ALL the devices?» with a resounding YES. Learn how to build apps using seven different platforms: Mobile Web, iOS, Android, Windows, RubyMotion, React Native, and Xamarin. Find out which cross-platform solution makes the most sense for your needs, whether
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.