intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Building OpenSocial Apps- P9

Chia sẻ: Thanh Cong | Ngày: | Loại File: PDF | Số trang:9

67
lượt xem
4
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Building OpenSocial Apps- P9: Nhà phát triển của Thư viện Series từ Addison-Wesley cung cấp hành nghề lập trình với độc đáo, tài liệu tham khảo chất lượng cao hướng dẫn về các ngôn ngữ lập trình công nghệ mới nhất và họ sử dụng trong công việc hàng ngày của họ. Tất cả các sách trong thư viện của Nhà phát triển được viết bởi chuyên gia công nghệ các học viên những người có kỹ năng đặc biệt tại các tổ chức và trình bày thông tin một cách đó là hữu ích cho các lập trình viên khác....

Chủ đề:
Lưu

Nội dung Text: Building OpenSocial Apps- P9

  1. 374 remote content display tags, OSML remote content display tags, OSML, 226 get_profile function, 190–191 removeGame method, 144–145 get_status function, 191 repeater, displaying friends list, 237–238 get_video function, 193 REpresentational State Transfer APIs. See get_videos function, 191 REST (REpresentational State Transfer) APIs send_notification function, 196–197 republishing live app, 275 set_mood function, 195 requestCreateActivity function. See set_status function, 195 opensocial.requestCreateActivity test pages, 197 requesting data, and performance, 286 REST (REpresentational State Transfer) APIs, requestPermission function, 43–45, 87–88 178–208 requestSendMessage function. See client code, 197–199 opensocial.requestSendMessage friends response from, 211–212 requestShareApp function. See opensocial.requestShareApp friends Web service and paging, 199–203 reserved variable names, 81–82 how Web service is addressed, response structure, adding feed reader to 178–179 app, 96–97 os:DataRequest tag resulting in ResponseItem object. See endpoints, 221 opensocial.ResponseItem overview of, 178 responseJSON property, error handling when paging, 202 porting app to OpenSocial 0.9, 343–348 responseValues, arrays, 74 Profile endpoint, 203–208 responsive performance. See performance, responsive server code, 181–183 REST API list, 183–197 setting up external Iframe app, 179–180 create_album function, 195–196 supported endpoints. See endpoints, supported by MySpace SDK get_activities_atom function, 194–195 supporting XML and JSON get_album function, 184–185 formats, 94 get_albums function, 183 retrieving, friend’s app data, 131–132 get_friends function, 185–187 RockYou! ads, 314–316 get_friends_activities_atom function, RPC. See IFPC (inter-frame procedure call) 195 RSS feeds get_friendship function, 187–188 adding content to feed reader app, get_indicators function, 196 97–98 get_mood function, 187–188 building feed reader UI, 98–101 get_moods function, 188 processing with FEED content type, get_photo function, 190 104–105 get_photos function, 188–190 runOnLoad function, 198–199 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  2. source code 375 S recognizing when new game has started, 145 Sandbox Editor selecting opponent, 138–140 declaring and using basic data, semaphore (flag value), readers-writers 218–219 problem, 52–53 entering and executing code, 215–216 send( ) function, 17 using os:ViewerRequest tag, 236 Send Message, 74–76 Sandbox tool, 214–217, 227–228 send_notification function, 196–197 Save Template button, Template Editor, 84 servers scaling code for REST API, 181–183 advantages of app data P2P play, 147 Data Pipeline tags processed on, BuddyPoke app, 320 221–222 Flixster Movies app, 322 external. See external server commu- using external cloud servers for nications; external servers storage, 64–65 Set Lots of Cookies option, Cookie Jacker, scaling performance 63 application scale definitions, 293 setBackgroundClicked function, 43–44 defined, 284 set_mood function, 195 Internet-scale app guidelines. See set_status function, 195 Internet-scale applications, setTimeout directive, 52–53, 109–110 performance guidelines shared style Content blocks, 231–232 scaling point, 294–295 showCurrentPage method, 290–291 Script tab, Firebug, xxv–xxvi showFeedResults function, 103–104 scripts, 247–248 showViewerBio function, 236–237 SDKs (software development kits) signatures accessing MySpace APIs, 154, 183 function. See function signatures endpoints supported by MySpace, OAuth, 162–164 183–197 simplejson folder, 156–157, 160 secret key, MySpace, 153–154, 183 Small/workgroup scale applications, security 293 app data store limitations, 153 software development kits (SDKs) application, 301–302 accessing MySpace APIs, 154, 183 external server communications, 111 endpoints supported by MySpace, fixing vulnerabilities, 311 183–197 hacking and cracking, 302–303 sorting, fetched lists, 31–33 user data, 301 source code selectedFriend property, FriendPicker, 123 backing up before granting developer selectedOpponentDataCallback function status, 279 app data game store, 131–132 creating “Hello World” app, 4–6 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  3. 376 stability, and responsive performance stability, and responsive performance, creating with Template Editor, 83–84 299–300 defining requestShareApp using, startGamePlayPolling function, 146–147 70–71 static content, and constraints, 92 inline tag. See inline tag templates, status OSML get_status function, 191 notification built-in, 89 set_status function, 195 using opensocial.requestShareApp, 85–86 storage Terms of Use app data store. See app data store app suspension from violating, 280 cookies. See cookies example of app rejection, 270–273 third-party database, 64–65 overview of, 266 styles test pages, REST APIs, 197 custom tag, 241–242 testing shared style Content blocks, 231–232 managing testers, 279 Subversion, 155 message bundles, 257 subviews, OSML, 245–248 OAuth implementation locally, 166–169 success array, responseValues, 74 OpenSocial endpoint errors, 300 surfaces translations, 259–260 adding to gadget file, 229–230 TEXT content type, feed readers, 107–108 creating “Hello World” app, 4–6 TEXT format, partial HTML content, 97 MySpace Open Social, 5 third-party database storage, 64–65 suspension of app, 280 threads, solving readers-writers problem, 51–53 T three-way handshakes, 119, 144 tabs, converting to subviews, 245–248 Tic-Tac-Toe app. See data, getting basic tag templates. See inline tag templates, time-outs, providing, 300 OSML title, message, 75 tags TK’s apps, 322–324 CDATA, 225 tools, MySpace development, xxiv–xxvi Data Pipeline, 219–223 TOP_FRIENDS, filtering friend list, 33 OSML, 225–226 TortoiseSVN, 155 TCP (transmission control protocol), transferring data, three-way handshake, 119 three-way handshakes, 119 translations Template Editor, 83–84 creating first message bundle for, templated apps, 270–271 256–257 templates including and testing, 258–260 creating activities using, 80–83 internationalization and, 255 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  4. utility computing 377 translations, contd. uninstalling apps, 279–280 message bundle, 257–258 universal resource identifiers (URIs), REST, testing, 259–260 178–179 transmission control protocol (TCP), Updates module, Home page, 68–69 three-way handshakes, 119 updating Try App link, 307–308 albums and media items in TTT namespace OpenSocial 0.9, 338–339 defined, 30 app data in Open Social 0.8 and 0.9, 341–343 paging, 37 translations, 260 using data, 37–39 uploading media items, 340–341 TTT.AppDataPlay game object URIs (universal resource identifiers), REST, adding support in game engine, 178–179 133–135 URLs adding user feedback, 135–138 making real MySpace requests, clearing game, 144–145 170–173 implementing logic flow, 138–144 warning when placing in attributes, 251 setting up, 125–133 user data TTT.Game (game engine), 133–135 accessing, 11–14 TTT.Record.Getter object, 169–172 accessing more than just default TTT.Record.Poster object, 169, 172–173 Profile data, 18–19 turn-based gaming, 117–133 accessing Profile information, 15–17 adding FriendPicker, 119–121 using, 19–24 app data game store, 125–133 user interface. See UI (user interface) design overview, 118–119 users overview of, 117–118 adding feedback to P2P game play, using FriendPicker, 121–125 135–138 data security for, 301 U experience/functionality of app, UI (user interface) 271–272, 285 adding FriendPicker to game play, implementing logic for selecting 119–121 opponent, 140 building feed reader, 98–101 retaining by listening to them, 311 building using Inspect feature of viral spreading and. See viral Firebug, xxv spreading using FriendPicker, 121–125 “user’s pick” feed reader, 98 UNAUTHORIZED error, cause of, 26 UTF-8 encoding, for app gadgets, 259 Unicode encoding, and app gadgets, 258 utility computing, 298–299 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  5. 378 validating inputs V viral features and communication, 67–90 validating inputs, 299 getting app listed on friend updates, variables, setting up AppDataPlay game, 79–88 127–128 sending messages and variables, template communications, 74–79 creating templates with Template sending notifications, 88–90 Editor, 84 spreading app to other users, 67–74 data types, 80–81 viral spreading, 309–316 notifications, 89 of BuddyPoke app, 319–320 reserved names, 81 Cubics, 313–314 using opensocial.requestShareApp, Google AdSense, 311–313 86 listening to customers, 311 verify function, OAuth, 157 overview of, 309–311 verify_request function, OAuth, 165–166 Playdom apps using, 325–326 vertical scaling, 297–298 RockYou! ads, 314–316 videos Visit Profile link, 7 fetching, 42–43 fetching with get_video function, 193 W fetching with get_videos function, 192–193 W3C Widgets specification, 260 View Development Version link, “Hello Watch window, Script tab of Firebug, World” app, 6 xxv–xxvi Viewer, 236–237 Web applications, driving performance plateau, 284 accessing more than just default Profile data, 18–19 Web references. See online references accessing Profile information, 15–17 Web service, 202–203 app data store. See app data store Westwood, Dave, 318–319 concept of, 9–10 widget formats, commonly known, 260 creating custom tag template Widgets specification, W3C, 260 definition for, 240–242 win/loss record declaring data in gadget XML for, making MySpace requests, 218–219 169–173 fetching app data for, 342 making simple GET request to save, fetching friend list for, 30–31 158–162 getting information with testing OAuth locally, 166–169 os:ViewerRequest tag, 235–236 updating with signed POST request, os:ViewerRequest tag, 221–222 162–166 permission model for accessing user Windows Sidebar gadget format, 260 data, 10–11 Winloss class, 158–162, 164–166 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  6. Yue, Dan 379 “Word of the Day”, feed reader apps, refactoring to build local app data 110–111 store, 51–52 ws.py script, 158, 164–166 XML. See also gadget XML adding feed reader to app, 98 X content type with parsing, 105–107 XHR (XMLHtppRequest) object handling content for feed reader, 98 asynchronous JavaScript requests, 15 XSS (cross-site scripting) attacks, 303 external server security constraints for, 91 makeRequest as wrapper on top of, Y 94–95 Yahoo! Babelfish, 258 overview of, 94 Yue, Dan, 324–326 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  7. informIT.com THE TRUSTED TECHNOLOGY LEARNING SOURCE InformIT is a brand of Pearson and the online presence for the world’s leading technology publishers. It’s your source for reliable and qualified content and knowledge, providing access to the top brands, authors, and contributors from the tech community. LearnIT at InformIT Looking for a book, eBook, or training video on a new technology? Seek- ing timely and relevant information and tutorials? Looking for expert opin- ions, advice, and tips? InformIT has the solution. • Learn about new releases and special promotions by subscribing to a wide variety of newsletters. Visit informit.com /newsletters. • Access FREE podcasts from experts at informit.com /podcasts. • Read the latest author articles and sample chapters at informit.com /articles. • Access thousands of books and videos in the Safari Books Online digital library at safari.informit.com. • Get tips from expert blogs at informit.com /blogs. Visit informit.com /learn to discover all the ways you can access the hottest technology content. Are You Part of the IT Crowd? Connect with Pearson authors and editors via RSS feeds, Facebook, Twitter, YouTube, and more! Visit informit.com /socialconnect. informIT.com THE TRUSTED TECHNOLOGY LEARNING SOURCE Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  8. Try Safari Books Online FREE Get online access to 5,000+ Books and Videos FREE TRIAL—GET STARTED TODAY! www.informit.com/safaritrial Find trusted answers, fast Only Safari lets you search across thousands of best-selling books from the top technology publishers, including Addison-Wesley Professional, Cisco Press, O’Reilly, Prentice Hall, Que, and Sams. Master the latest tools and techniques In addition to gaining access to an incredible inventory of technical books, Safari’s extensive collection of video tutorials lets you learn from the leading video training experts. WAIT, THERE’S MORE! Keep your competitive edge With Rough Cuts, get access to the developing manuscript and be among the first to learn the newest technologies. Stay current with emerging technologies Short Cuts and Quick Reference Sheets are short, concise, focused content created to get you up-to-speed quickly on new and cutting-edge technologies. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
  9. FREE Online Edition Your purchase of Building OpenSocial Apps includes access to a free online edition for 45 days through the Safari Books Online subscription service. Nearly every Addison- Wesley Professional book is available online through Safari Books Online, along with more than 5,000 other technical books and videos from publishers such as Cisco Press, Exam Cram, IBM Press, O’Reilly, Prentice Hall, Que, and Sams. SAFARI BOOKS ONLINE allows you to search for a specific answer, cut and paste code, download chapters, and stay current with emerging technologies. Activate your FREE Online Edition at www.informit.com/safarifree STEP 1: Enter the coupon code: SGBUPVH. STEP 2: New Safari users, complete the brief registration form. Safari subscribers, just log in. If you have difficulty registering on Safari or accessing the online edition, please e-mail customer-service@safaribooksonline.com Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2