, 81 package manager, 141–144 page transitions, 216 pageX, 117 pageY, 117 Paint.NET, 439 parseInt, 83 517 bindex.indd 517 9/23/11 10:43:17 AM passwords – Representation State Transfer passwords, 474, 475 path, 51 paths, 33 clear, 43 moveTo, 44 pause, 289, 501 People, 397, 404, 409, 427, 429 “people”, 426 percentmmobile.com, 456 period, 160 PhoneGap Android, 283, 288, 436 Appcelerator, 377, 378 deviceready, 294 direct message app, 407 DOM, 294 events, 501 FeedHenry, 374 hybrid native apps, 3, 274 icons, 437 index.html, 282 iPhone, 436 JavaScript, 289 navigator.device, 420 Objective-C, 282 Safari, 401–402 splash screen, 438 wrappers, phonegap.jar, 286, 288 phonegap.js, 290 photo-blogging app See Lifestream app Photoshop, 439 picTake, 303 pictures storing, Amazon S3, 306–310 uploading, Lifestream app, 295–306, 336–345 picUpload, 304, 357 pingdom.com, 61 pixels Android, 438 CSS, 125 HTML, 125 icons, 437–438 iPhone, 437 platform-as-a-service, 371 FeedHenry, 373 plist, 437 plus, 90 PNG format, 437 ‘portrait’, 76 portrait orientation, 438 position callback functions, 52, 73 coords, 73 lastx, 52 lasty, 52 POST, 144 collect, 330 curl, 159 HTTP, 330, 346, 388, 392 api-cmdline.js, 202 REST, 179 SOAP, 178 JSON, 331 post, 144, 332 HTTP, 343 stream, 343 pre, 14 premium service, app as, 459–460 prepend, 486 preventDefault event handlers, 124 ontouchstart, 44 profile_image_url, 390 properties CSS, 83 JavaScript key/value pairs, 10–11 JSON, 50 provisioning profi le, 277, 281 ps, 65 Public DNS, AWS, 60 public private key pairs AWS, 64 EC2 instances, 56 $pull, 344 pullToRefresh, 486 push, 10, 14 PUT, 244 HTTP, 388 api-cmdline.js, 202 REST, 179 REST, 237 put, 196 knox, 244 putapp, 195 PutAttributes, 181 putImageData, 474 putItem, 186 putitem, 196 PuTTY, 64 Python, 475 R race conditions, 137 Rackspace, RAM Android, 287 memcached, 260 rapid development, readjson, 158, 159 realistic wire frames, 398 rect, 33 Redis, 489 refresh, 90, 220–221 Inbox, 428 Register, 496 register, 316, 330, 357 registered device, 276 Xcode, 277 remove, 107 render, 411 Representation State Transfer (REST), 178–179 Amazon S3, 237 HTTP, 288, 387 518 bindex.indd 518 9/23/11 10:43:18 AM req – shared-nothing architecture Twitter, 387 URL, 179 req HTTP, 329 json, 331 req.params.name, 159 reqtokens, 420 cache, 419 Request, 140, 144 request, 328 Request Instances Wizard, 56 require, 304 require(‘http’), 140 research, 316 resources, 182 Response, 140, 144 Response.end, 141 REST See Representation State Transfer Restore button, 473 restricted.pwd, 474, 475 result, 186 resume, 289, 501 Retina, 438 return, 243 rightout, 123, 126 root, 300 root user, 64 rotate, 125 rotation gesture events, 124 zoom, 126 rotation, 118, 125–126 gesturechange, 125 round-robin algorithm, 257 router, 144 rubber-band effect, 294 S S3 See Amazon S3 s3-get.js, 246 s3-put.js, 243, 246, 487 Safari alert, 404 Dev Center, 21 HTTP, 413 index.html, 414 jqmob.html, 87 PhoneGap, 401–402 todo.html, 97, 100 view.html, 24 Web Inspector, 21, 411, 415 MIME, 114 WebKit, 3, 20–21 Save button, 473 saveEntry, 163, 404 saveitems, 107 saveon, 102 scalability, databases, 180 Scalable Vector Graphics (SVG), 32 scale, 118 gesturechange, 126 schema, 145 Amazon SimpleDB, 181 scope, JavaScript functions, 19 scp, 66 screen_name, 390 screenshots, 439–440 screenX, 117 screenY, 117 script, 11, 24 head, 497 index.html, 422 iScroll, 477 iscroll.js, 217 src, 290 URL, 367 scrollers, 220 scrolling data-position=”fixed”, 215 iScroll, 219 jQuery Mobile, 89, 215 ontouchmove, 42 scroll-is.css, 484 scroll-slide.css, 484 sdberr, 194 SDKs See software development kits Search, 496 search, 357 searchbutton, 289 SeaShore, 439 sec, 160 security groups, 60 SELECT, 195 Select, 182 select, 91 self, 419 self-signed certificates, 442 sendjson, 158, 159 ajax, 166 timesync, 203 sendmsg, 421 sendstats, 167 navigator.onLine, 166 server, 141 server offset, 197 server.follow.js, 333, 336, 337 server.js, 317 server.*.js, 328 server.mongo.js, 328, 336 server.post.js, 337, 339, 355, 361 collect, 340 server-side JavaScript, 4, 136–150 server.social.js, 361 service, 366 set, 489 $set, 149 setitem, 265 setTimeout, 472 iScroll, 487 touchend, 478 shal.js, 414 shared-nothing architecture, 257 519 bindex.indd 519 9/23/11 10:43:19 AM show – thundering herd problem show, 412 showcon, 303 showfollowers, 357 showfollows, 357 showimages, 357, 495 Sign In button, 410, 413 signing in, 247–255 Facebook, 253–255 Twitter, 248–252 Simple Object Access Protocol (SOAP), 178 Amazon S3, 237 Simple Storage Service (S3) See Amazon S3 SimpleDB See Amazon SimpleDB simpledb, 182–188 callback functions, 185–186 Node, 185 npm, 185 sin function, 125, 126 size, 50 slideshare.net, 467 slideUp, 82, 102 SMS launching, 230 SOAP See Simple Object Access Protocol Social, 414 accounts, 424 clear, 502 delmsg, 503 getmsgs, 424, 430 getpeople, 430 Inbox, 428–429 OAuth, 417 social networking, 387–432 See also Facebook; LinkedIn; Twitter Lifestream app, 357–367 software development kits (SDKs) Android, 3, 283 FeedHenry, 375 iPhone, software-as-a-service, 372 someText, 17 span, 101 splash screen, 131–132 Android, 438 Java, 438–439 landscape orientation, 438 portrait orientation, 438 splice, 107 src img, 303 script, 290 SSH, 64 EC2 instances, 58 Node, 138 ssh, 66 -A, 476 -i, 64 ssh, 64 stackoverflow.com, 37 standards compliant, star, 90 start, 123 startup screens, 131–132 startupdeathclock.com, 76, 77 stat, 243 status, 115 statuses, 391 stick sessions, 257 stream, 316 config.max_stream_ size, 344 post, 343 user, 343 StreamBuffer, 345 stroke, 33, 43, 44, 50 context, 39 path, 51 strokeStyle, 33, 43 style, 24 subscription-based services, 459 Subversion, 65 sudo, 64 sudo -s, 142 superclass, 419 SVG See Scalable Vector Graphics swapCache, 115 swipe, 118, 501, 503 jQuery Mobile, 107 swipe gesture, 126–127 swipeleft, 118 swiperight, 118 symbolic links, 283, 436 syncitems, 483, 484 T tap, 117 event handlers, 95 jQuery Mobile, 95 tap function, 215 taphold, 117 target, 117 target=”_blank”, 366 targetTouches, 116 templates hide and clone, 410 HTML, 404 Xcode, 282 text, 392, 401 itemdata, 102 text/html, 114 text/plain, 141 thinkgeek.com, 466 this, 83 Network, 419 threads, 137 throw, 243 thundering herd problem, 260, 264 520 bindex.indd 520 9/23/11 10:43:20 AM time synchronization – URL time synchronization, 196–198 timesync, 202 sendjson, 203 toDataURL, 494 To-Do List app, 91–107 cache, 112–113 in cloud, 182–208 cloud analytics, 150–174 command-line, 188–196 icons, 131–132 items, 107 JSON, 106 saving, 103–107 startup screen, 131–132 synchronizing, 203–208 time synchronization, 196–198 updating, 164–167 web service, 198–203 todo.css, 92, 93–94 div, 98 todo.html, 93, 95–96, 112 Android, 97 div, 99, 103 iPhone, 97 Safari, 97, 100 ul, 99 todo.js, 92, 94, 99–100, 165, 476 todo.manifest, 112, 113 token, 316, 330 tonvo See direct message app top, 123 TopNav, 405, 406, 427 views, 412 total, 173 totalinperiod, 173 touch events, 115–127 jQuery Mobile, 117–118 Node, 137 WebKit, 115–116 touchcancel, 116 touchend, 116 setTimeout, 478 touches, 116, 117 touch.html, 122 touchmove, 116, 125 Inbox, 428 touch-sensitive drawing app, 32–52 DRY, 46–52 fi nger touches, 39–45 touchstart, 116 Inbox, 428 jQuery, 123 tox, 44 toy, 44 tracer bullets, 34–36, 152–160 Amazon SimpleDB, 183–188 transactions, 180 trends, 391 trigger, 427 Twitter for, 417 Android, 413 developer console, 393–395 direct message app, 395–432 entities, 390–391 HTTP, 413 index.html, 365 iPhone, 413 JavaScript, 390 JSON, 387, 389, 425 Lifestream app, 357–367 localStorage, 425 OAuth, 247–248, 364, 388, 393 REST, 387 service, 366 signing in, 248–252 URL, 413 usage limits, 390 U Ubuntu, 26 AWS, 60 EC2 instances, 56 Node, 138 upstart, 496 UDID, 276–277 iPhone, 490 Xcode, 277 ul remove, 107 todo.html, 99 UNCACHED, 115 unfollow, 336 unique identifiers, 166 unit testing, 317, 328, 400 universally unique identifier (UUID), 240, 310 UNIX, 65 update, 149, 356–357 “update-inbox”, 427, 428, 429 “update-people”, 427, 428, 429 UPDATEREADY, 115 upload, 343 JSON, 345 Node, 345 upserts, 163 upstart, 496 URL connect, 159, 334 customized, 413 Facebook, 255 http_get, 357 Lifestream app, 341, 364 :name, 159 Node, 158 OAuth, 418 REST, 179 scheme, 230 script, 367 Twitter, 413 521 bindex.indd 521 9/23/11 10:43:21 AM url – write-through cache url, 328 use case analysis, 395 user, 268 MongoHQ, 328 null, 329 stream, 343 user accounts CSS, 356 HTML, 356 Lifestream app, 346–357 user experience, 211–234 iScroll, 216–222 jQuery Mobile, 212–216 user flow, 397 user sessions, 257 userdetails, 421 username, 316 :username, 316 usernames, 474 ;username/follow, 316 username:password, 474 :username/post, 317 :username/stream, 317 :username/unfollow, 317 :username/upload, 317 users, 391 user-scalable, viewport, 472 util, 141, 401 common, 158 util.debug, 141 util.http_get, 418 util.http_post, 418 Utilities, 26 //utility, 339 //utility functions, 361 util.log, 418 util.params, 419, 420 UUID See universally unique identifier uuid, 310, 480 V val, 160, 161 variables, JavaScript $ (dollar sign), 79 dynamic functions, 19 functions, 45 version number, cache, 114 vertical cloud services, 377, 380, 381, 383 vertical scaling, 256 video, 226–230 video, 226 view.html, 471 nginx, 28 Safari, 24 view.js, 172 viewport head, 37 metatags, 23–24, 37 user-scalable, 472 zoom, 24, 37 views, 397 objects, 405 TopNav, 412 wire frames, 404–405 vScrollbar, 485 -vv, 258 W W3C, 73, 114 waitForSomething, 17 watchPosition, 73–74 web, 58 Web Inspector See Safari web service Amazon S3, 237 To-Do List app, 198–203 WebKit Android, 20–21, 72 animation effects, 123, 476 canvas, 32 HTML5, 72 iPhone, 20–21, 72 JSON, 106 Safari, 3, 20–21 touch events, 115–116 @-webkit-keyframes, 485 -webkit-transform, 123, 125, 127 WebView, weinre, 491 width, 50 win, 186, 194 incr, 269 window, 38 window.applicationCache, 115 window.location.href, 419 window.onload, 24 JavaScript, 42 window onorientationchanged, 76 window.onresize, 74, 76 window.orientation, 74 Windows, IP, 28 nginx, 26 Windows Mobile, 381 window.scrollTo, 472 wire frames, 398, 399 views, 404–405 Wireshark, 179 HTTP, 394 OAuth, 252 work_pic img, 494 wrappers iScroll, 217 Java, 288 jQuery, 494 PhoneGap, write, 244, 246 write-through cache, 260 522 bindex.indd 522 9/23/11 10:43:22 AM WWDR intermediate certificate – zoom WWDR intermediate certificate, 276 www, 282 index.html, 346 X x-amz-acl, 244 Xcode, 490–491 Appcelerator, 377 development certificate, 277 iPhone, 275, 277, 445–446 Lifestream app, 346 registered device, 277 screenshots, 439 templates, 282 UDID, 277 XDK, 383–384 XML, 107 Appcelerator, 381 REST, 178 SOAP, 178 Y YOUR_IP_ADDRESS, 97, 165 touch.html, 122 Twitter, 248 YOUR_TWITTER_KEY, 414, 422 YOUR_TWITTER_SECRET, 414, 422 YouTube, 231 Z z-index, 220 zoom gesture events, 125 gesturechange, 126 Google Maps, 128–131 maximum-scale=1.0, 472 rotation, 126 viewport, 24, 37 zoom, 128 523 bindex.indd 523 9/23/11 10:43:23 AM Try Safari Books Online FREE for 15 days + 15% off for up to 12 Months* Read this book for free online—along with thousands of others— with this 15-day trial offer With Safari Books Online, you can experience searchable, unlimited access to thousands of technology, digital media and professional development books and videos from dozens of leading publishers With one low monthly or yearly subscription price, you get: • Access to hundreds of expert-led instructional videos on today’s hottest topics • Sample code to help accelerate a wide variety of software projects • Robust organizing features including favorites, highlights, tags, notes, mash-ups and more • Mobile access using any device with a browser • Rough Cuts pre-published manuscripts START YOUR FREE TRIAL TODAY! Visit www.safaribooksonline.com/wrox18 to get started *Available to new subscribers only Discount applies to the Safari Library and is valid for first 12 consecutive monthly billing cycles Safari Library is not available in all countries badvert.indd 524 9/26/11 3:17:57 PM Related Wrox Books HTML5 24-Hour Trainer ISBN 978-0-470-64782-0 Written by bestselling author Joseph Lowery and with hours of DVD content created by well-known multimedia and eLearning producer Mark Fletcher, HTML5 24-Hour Trainer brings the new features of HTML5 and the Internet to life JavaScript 24-Hour Trainer ISBN 978-0-470-64783-7 This unique book-and-DVD package shows you how to use JavaScript to make web pages more dynamic and interactive so that you can create a first-rate user experience Packed with expertly written lessons, this must-have book-and-DVD set provides instructional demonstrations on the DVD that enhance your Java Script learning experience through tutorial demos and helpful examples Beginning Android Application Development ISBN 978-1-118-01711-1 This full-color guide offers you a hands-on introduction to creating Android applications for the latest mobile devices Veteran author Wei Meng Lee accompanies each lesson with real-world examples to drive home the content he covers Beginning with an overview of core Android features and tools, he moves at a steady pace while teaching everything you need to know to successfully develop your own Android applications Beginning iOS Application Development ISBN 978-0-470-91802-9 Written by an experienced Apple developer and trainer, this full-color reference serves as an ideal jumping point for creating applications for Apple’s iOS that runs on the iPhone, iPod Touch, and iPad In addition to in-depth coverage of the iOS SDK, the book walks you through the various core aspects of iPhone and iPad development You’ll learn how to take advantage of the tools provided by XCode and you’ll benefit from a solid introduction to Objective-C, which allows you to have a smooth transition to iPhone development from another platform Windows Phone Programming for Android and iOS Developers ISBN 978-1-118-02197-2 With a special focus placed on the new Windows Phone (WP7) design guidelines and technologies, this reference prepares you for making the transition from programming for Android and the iPhone to programming for the exciting new WP7 9781118034699-cover-rb2.indd 9/19/11 1:27 PM Related Wrox Books HTML5 24-Hour Trainer ISBN 978-0-470-64782-0 Written by bestselling author Joseph Lowery and with hours of DVD content created by well-known multimedia and eLearning producer Mark Fletcher, HTML5 24-Hour Trainer brings the new features of HTML5 and the Internet to life JavaScript 24-Hour Trainer ISBN 978-0-470-64783-7 This unique book-and-DVD package shows you how to use JavaScript to make web pages more dynamic and interactive so that you can create a first-rate user experience Packed with expertly written lessons, this must-have book-and-DVD set provides instructional demonstrations on the DVD that enhance your Java Script learning experience through tutorial demos and helpful examples Beginning Android Application Development ISBN 978-1-118-01711-1 This full-color guide offers you a hands-on introduction to creating Android applications for the latest mobile devices Veteran author Wei Meng Lee accompanies each lesson with real-world examples to drive home the content he covers Beginning with an overview of core Android features and tools, he moves at a steady pace while teaching everything you need to know to successfully develop your own Android applications Beginning iOS Application Development ISBN 978-0-470-91802-9 Written by an experienced Apple developer and trainer, this full-color reference serves as an ideal jumping point for creating applications for Apple’s iOS that runs on the iPhone, iPod Touch, and iPad In addition to in-depth coverage of the iOS SDK, the book walks you through the various core aspects of iPhone and iPad development You’ll learn how to take advantage of the tools provided by XCode and you’ll benefit from a solid introduction to Objective-C, which allows you to have a smooth transition to iPhone development from another platform Windows Phone Programming for Android and iOS Developers ISBN 978-1-118-02197-2 With a special focus placed on the new Windows Phone (WP7) design guidelines and technologies, this reference prepares you for making the transition from programming for Android and the iPhone to programming for the exciting new WP7 9781118034699-cover-rb2.indd 9/19/11 1:27 PM ... 3:56:45 PM BEGINNING Mobile Application Development in the Cloud ffirs.indd iii 9/23/11 3:56:45 PM ffirs.indd iv 9/23/11 3:56:45 PM BEGINNING Mobile Application Development in the Cloud Richard... 9/23/11 3:56:45 PM BEGINNING MOBILE APPLICATION DEVELOPMENT IN THE CLOUD INTRODUCTION xxi CHAPTER Introducing Cloud- Based Mobile Apps ... Cloud Richard Rodger John Wiley & Sons, Inc ffirs.indd v 9/23/11 3:56:45 PM Beginning Mobile Application Development in the Cloud Published by John Wiley & Sons, Inc 10475 Crosspoint Boulevard Indianapolis,