検索 - みる会図書館

検索対象: Building the Realtime User Experience

Building the Realtime User Experienceから 118件ヒットしました。

Building the Realtime User Experience


Buy this book and get access tO the online edition for 45 days—for free! With Safari B00k5 OnIine, you can: Access the contents ofthousands of technology and business b00k5 第 Quickly search over 7000 bOOks and certification guides 第 DownIoad whole books 0 「 chapters in PDF format, at no extra COSt, tO print 0 「 read on the go Copy and paste code 第 Save up t0 35 % on O'Reilly print books ー New! Access mobile-friendly books directly from cell phones and mobile devices Stay up-to-date on emerging topics before the b00k5 are published 第 Get on-demand access tO evolving manuscripts. 第 lnteract directly with authors of upcoming books Ex が 0 thousands Of hou 「 5 ofvideo on technology and design topics ー Learn from expert video tutorials 第 WatCh and replay recorded conference sessions こ 観 力 Ⅲ Ⅲ , パ れ ea' ″ 物 : 盟 で を 伝 ド 行 ⅲ g the 0 ' RE に げ ・ 8 リ 〃 d 加 9 the ReaItime UserExperience ByTed Roden 」 une 2010 爲 34.99 ISBN 9780596806156 TO try out Safari and the online edition ofthis book FREE fo 「 45 days, go tO ″ ″ Ⅳ .0 i 〃 'y. ( om / 90 0 e 0 と 厄 d and enter the coupon code DDTXZAA. TO see the complete Safari Library, visit safari.oreilly.com/ 0 REILLY 鸞 fa ri 、 .0 re Ⅲ y.com 02009 0 ・ Reilly Media. 旧 (. 0 ・ Reilly logo is a registered trademark of 0 ・ Reilly Media,lnc. 00000 Spreading the knowledge of innovators

Building the Realtime User Experience


With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access tO manuscripts in development and POSt feedback for the authors. Copy and paste code samples, organize your favorites, down- load chapters, bookmark key sections, create notes, print out pages, and benefit from tons Of Other time-saving features. O'ReiIIy Media has uploaded this book to the Safari Books OnIine service. To have full digital access t0 this b00k and others on similar topics from O'Reilly and other pub- lishers, sign up for free at 印 : / ん リ . 覊 角 わ 00 た so ⅲ 巳 co 襯 . HOW t0 Contact Us Please address comments and questions concerning this bOOk tO the publisher: O'ReiIIy Media, lnc. 1005 Gravenstein Highway North SebastopoI, CA 95472 800 ー 998 ー 9938 ()n the United States or Canada) 70 み 82 屮 0515 (international or local) 707 829-0104 (fax) We have a web page for this book, where we list errata, examples, and any additional information. Y()II can access thiS page at: : 〃 ル ル ル .0 尾 〃 い . co 襯 ん 酊 alog / 9780596806756 TO C01 れ 1 れ ent or ask technical questions about this bOOk, send email [ 0 : わ 00 た 甲 化 s 行 0 れ [email protected] 尾 〃 い . co 川 For more information about our bOOkS, conferences, Resource centers, and the O'ReiIIy Network, see our website at: AcknowIedgments This book would not exist without Nick BiIton, who thought it was a great idea and had an address book big enough [ 0 getthe ball moving. l'd also like [ 0 thank everybody in the Research and Development group at the New York 石 川 お for their excitement and for allowing me to focus on these topics during my day job. Preface ー

Building the Realtime User Experience


BuiIding the ReaItime U 史 「 Experience by Ted Roden Copyright ◎ 2010 Ted R0den. AII rights reserved. printed in the United States Of America. PubIished by O'Reilly Media, lnc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472. O'Reilly books may be purchased for educational, business, or sales promotional use. Online editions are alSO available for most titles ( わ れ p : 〃 川 ). sa. / 4 ⅱ わ 00 た SO れ ″ 〃 e 工 0 川 ). For more information, contact our corporate/institutional sales department: (80()) 998-9938 or co 甲 ora 惚@0 尾 〃 い . co 川 . Editor: Simon St. Laurent Production Editor: Kristen Borg Copyeditor: Genevieve d'Entremont Proofreader: Teresa Barensfeld Production Services: MoIIy Sharp lndexer: Ellen Troutman Cover Designer: Karen Montgomery te 「 iO 「 Designer: David Futato lllustrator: Robert Romano Printing History: July 2010: First Edition. NutsheII Handbook, the Nutshell Handbook 10g0 , and the O'Reilly logo are registered trademarks of O'ReiIIy Media, lnc. BuiIding ビ Realtime User Ex 〃 げ 海 1 記 , the image of a myna bird, and related trade dress are trademarks 0f O'Reilly Media, lnc. Many Of the designations used by manufacturers and sellers tO distinguish their products are claimed as trademarks. Where those designations appear in this b00k, and O'Reilly Media, lnc. , was aware 0f a trademark claim, the designations have been printed in caps or initial caps. WhiIe every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or om1SSions, or for damages resulting frOI れ the use Of the information con- tained herein. ー This book uses RepKoverTM, a durable and 飛 、 ible lay-flat binding. ISBN: 978-0-596-80615-6 [M] 1277147714

Building the Realtime User Experience


Constant width bold Shows commands or other textthat should be typed literally by the user. 朝 月 stant width ゴ t ゴ c Shows text that should be replaced with user-supplied values or by values deter- mined by context. ThiS icon signifies a tip, suggestion, or general note. ThiS icon indicates a warning or caution. Using C0de ExampIes This book is here to help you get your job done. ln general, you may use the code in this bOOk in your programs and documentation. You dO not need tO contact us for permission unless you re reproducing a significant portion Of the COde. For example, writing a program that uses several ChunkS Of COde from this bOOk does not require permission. Selling or distributing a CD-ROM 0f examples from O'Reilly b00ks does require permission. Answering a question by citing this bOOk and quoting example COde does not require permission. lncorporating a significant amount Of example COde from this bOOk intO your product's documentation does require permission. We appreciate, but dO not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: "Building ビ Realtime User Experience by Ted Roden. Copyright 2010 0'ReiIIy Media, lnc. , 97 & O ー 596-80615-6. ' ' lfyou feel your use 0f code examples falls outside fair use or the permission given above, feel free tO contact us at 〃 er 川 な 0 〃 S (@ore 〃 い . CO 襯 . [email protected] Books OnIine ・ ・ 》 Safari Books Online is an on-demand digitallibrary that lets you easily Safarl search over 7,500 technology and creative reference bOOks and videos tO 日 00k5 0 れ u00 find the answers you need quickly. x ー Preface

Building the Realtime User Experience


Chartbeat Chartbeat iS a paid web service that enables users tO monitor web traffic in realtime through a web-based user interface, an iPhone application, and SMS alerts. lnstallation ontO a website iS as simple as pasting in a bit ofJavaScript COde. Once installed, a user can start viewing stats through the web interface ( 中 : / / 訪 4 れ . co 川 な (see Fig- ure 9-1 ) or by downloading the iPhone application. ヨ ・ = ゆ 。 - - ☆ 物 ! ゆ : 〃 ( ha れ . ( om / d hbQ 第 - に “ ィ れ & k 戔 1 み 2 ら ) 讀 お 朝 6 を 4 を 2 気 歙 ! 朝 市 要 き い ・ て 工 om chart Rea ト 川 iO ! 10 ・ 亂 な 3 に 「 リ : ) : を iPP0 聳 。 A い 0 は し 5 : 5 ! 1 第 Historical 36 people on avc.com ; 物 ツ や の 二 罅 7 行 ツ 新 ⅱ を 0 new ・ 一 一 ・ 24 験 第 明 opie 「 e 記 衂 OP Ⅷ 加 0 OP 池 給 Page density Å Vc Empowering YO 第 ~ Team 9 「 物 物 朝 ミ ル 第 い 28 0 8 Page load time a 純 国 0 を 0 Recent リ 5 町 0a90 め 0 を m 当 ま Raw hits Empo 電 ⅲ 10 YO Te 第 62 5 純 000 池 30 紐 を mpo 報 町 9Y0 い 了 耐 を 0 第 靆 321 : 20 pm Conversations 第 行 ed w 0 = aVC ℃ 0 第 17 Geolocations Twee に 日 g Ⅲ ℃ 9-1. Monitoring 4 ル e 伝 e ル わ C わ の ・ e On top of viewing standard analytics, such as the number 0f people looking at a site at a given time, Chartbeat alSO enables users [ 0 track whO is talking about a certain website on servlces such as Twitter. lt alSO Offers fairly robust alerting tOOls. For example, Chartbeat serves as a simple uptime monitor, sending out SMS alerts if it notices that the site has stopped responding t0 HTTP requests. On the other hand, a user can configure Chartbeat [ 0 send out alerts via SMS or through push notification on the iPhone application if site activity goes beyond predetermined limits. Figure 屮 2 shows the iPhone application. 186 ー Chapter 9 : Measuring User Engagement: Analytics on the Realtime Web

Building the Realtime User Experience


Q 日 い は 知 は 恒 し 0 第 0 を は fo ド 露 大 do 医 の Ⅵ 朝 tO 「 0 を 一 ls Ⅵ 、 滝 0 「 、 ⅵ 0 の い 、 ま - Ⅵ tO ー 物 223573 新 5 0 ′ D に い 、 第 日 0 : ー 20 3 3 気 ( 0 を 第 朝 Y : む れ OW 叫 [ 測 第 ) 田 を は 0 , を 第 0 ー 0 物 5 に を ⅳ も p び 0 ロ 川 ⅲ do 魯 を xp, 5 “ に に ” R 、 山 0 い 」 工 物 田 Y ⅵ ng / 新 ⅵ 0 0 " path い ョ 山 。 れ ) ・ - Re 汁 代 h を ゆ : / / に い れ 1 を ⅲ 0 は 3k0 ・ の 0 / に を 00k / 物 00 行 さ 物 0 い tra ( い " 0 : D 0 鄧 d uve 0 5 ” ch Ⅵ 、 i を 研 0 「 y 10 を 謝 新 si ー ー ー い P400 ⅵ に 物 ま ー ー マ 「 社 00P き 00 ⅵ 0 物 5 / ⅵ を ー 」 こ al 、 d TO T ⅲ に Sp に れ ヒ 0 、 に ( 0 れ イ 、 . ー Av 00 第 引 要 T に : 0 、 0 ぐ 0 録 疾 新 0 ′ # 2235 お い ) 0 ⅱ 0 ⅲ efe : 最 を 編 0 ト 可 れ 田 、 k は i 日 0 、 ま 0 ・ 0 国 / を し を 00i 引 W00 k00 住 い 第 R に PO 杙 5 新 、 化 0 「 # 223572 ( 2 ) ー - Ⅵ 朝 t ( 物 2 ) 3572 住 AnalytiG 第 礰 物 3 お 5 ( 切 虱 研 0 ls を Manage k に y 朝 に 飜 い ) ~ 、 No に iong OW 、 0 ′ : ド ⅳ 0 ー 0 第 3 国 0 M 物 ら 5 ( ′ 000 材 を を 0 ⅳ tiO い : ー ノ 80X80 り = ィ ( u は om し i ト p 10d 阯 山 ( 2 ) ( u ″ 0 最 ツ ⅵ ⅲ 讐 / m 朝 1 市 / 引 0 川 平 ・ い 0 Ⅵ 新 新 、 飛 0 ′ 物 223563 ( 4 ) ⅵ 0 ion Path ( 2 ョ は ns ) 響 00 世 0 - W 、 に Tracking 田 A 謝 扣 、 0 Ⅵ 、 世 0 ′ # 223540 ( 2 ) W00 M 田 わ 総 A 代 - 引 い for 物 0 議 物 い : 00 飛 羅 hackroid い ) 「 、 新 吶 い ) t 研 H 減 0 Ⅳ TO を Ⅵ 虱 5 ー T 破 P み 0 ⅵ 物 当 : 2 ー A 第 00 に 00 ⅵ 0W5. ツ is 2 Ⅵ 虱 0 ′ # 223570 ( 2 ) T 武 物 れ に 当 p : 2 第 ( 0 ds ヨ Av に 一 00 新 を Time: 22 を ( 0 物 ds. 、 れ い ) . 、 Ⅵ tO ー 物 2 フ ? 571 新 0 「 # 2 ー 6328 い ) Visitor 0 ls を 第 日 0 : 17 第 阯 2 3,Country: は 産 を 灯 00d0 は お れ 0 淑 Ⅵ 破 # 223459 ( 9 ) 梁 第 B ′ 0 物 日 ′ に 3 , 円 毎 n : 響 ⅲ dows 第 靆 の 5 に に を 朝 ( 。 川 い ) ( r ′ に れ 日 y ⅵ に 物 ⅲ g な nem し 物 れ 物 新 i ト 0 i を 0 田 LCOt ル W ト 引 tes : i は れ ト 0 ド に ェ 0 を れ 代 Visitor # 223555 い 2 ) 、 avigation path ( 3 actions) rcounts(3) 響 0 Members Area - [ 00 Ⅵ 、 代 研 # 223534 い 5 ) W00 a - Website ヨ ⅲ 0 and 物 ル t に 、 Altime 炻 : 3 ? ? 5 5 TOday Ⅵ を な : ー 3 り 4 TOday P ョ 0 齢 : 3962 , M000 g Ⅲ ℃ 9-3. Monitoring 4 ル e わ ro リ g わ [ 厖 Ⅳ 0 叩 ra d お た 〃 〃 〃 わ 〃 WOOP な 、 ・ 。 第 き 可 oy 気 h の を ~ 0 新 ( kS い : A er 90 ⅵ 0 0 is 0 、 01 ⅵ 、 な W に い れ 0 0 0 : )an 31 を 2010 4 : 33 : 42 PM YO : 0432 : 5 ヨ he Ⅱ 0 •A chat 代 q リ e 虹 has been 5 に ( OVi 引 tO 「 # 5. A 10 Ⅵ 引 ! 4 TOd Ⅵ 引 い : 2 Today ね 9 iews , M 総 日 Dashboard 第 し ⅳ 。 0 」 立 田 ・ ( h す R 総 po 5 AnalYtics を Chat ー Visitor # 4 を Visitor 5 , M 議 n 90 。 ヤ ・ Filters 、 No i ( 朝 を ( リ 0 Map ・ 第 、 。 T 叫 Vis れ 0 に 0 」 [ 00k 0 HiStory ー [ は ( 0 を 内 誂 i0 ル 50 Hope 謝 い 5 weti.. F Ⅲ ℃ 9 ー 4. [ ⅲ g chat ↓ ⅵ 店 a s 夜 ・ via Ⅱ / 00 観 Chapter 9 : Measuring UserEngagement: Analytics on the Realtime Web 188

Building the Realtime User Experience


url: script: main. py inbound services : xmpp—message This file simply lays out the details of your application for both the actual App Engine service and the launcher application. Once you ve created and saved that file, we can set up this application in GoogleAppEngineLauncher. From the File menu, select "Add an Existing Application," click the browse button, and select the directory containing the app. ツd襯/ file (see Figure 10 ー 1 ). CoogleAppEngineLauncher 電 R れ き を こ 6 の し を の 物 : 譱 [ 00 を SDK て on & 0 に FdiÜqy ・ bi Add Existin Ap が に ユ 朝 on Settin 5 Path: l/IJsers/troden/ipandemic/appengine Po 心 8091 Cancel 十 Figure 7 0-7.1 川 〃 0 ⅲ れ g ourexisting Ⅳ 可 e ル わ レ ⅲ 甲 化 App Engine ID Although the official App Engine application ID for the public iPandemic application is ipandemicapp, it's mapped [ 0 the 印 : 〃 ル ル ル . ゆ 4 〃 川 に co 川 4 、 URL. Google App Engine allows you to map custom domains [ 0 your application. Throughoutthe rest of this of this chapter, you'll need to use the URL assigned [ 0 you in place of w . ipandemic. ( om. Goog 厄 Maps API Key On the client side of this application, we re going to be using the Google Maps API to display the maps and draw the spread of each of the germs. AIthough this service is free tO use, even for an unlimited amount Of traffic, it does require an API key. TO get one of these keys, head over to the GoogIe Maps API site ( 印 : / ん 0 . goog . co 川 ん 〃 な / 川 〃 s / Getting Set 叩 ー 219

Building the Realtime User Experience


The only difference between this verSIOn Of drawCircle and the verSIOn we made in a 〃 〃 ビ 〃 g わ le / 立 4 c / ツ s is that this one draws far more points in the circle than the one designed for the mobile phone. Again, it's importantto tailor the code for the device on which it will run. If you run this application from a publicly accessible location, you'll be able t0 see the germs on the screen. If a germ gets deleted from the iPandemic application, it will disappear from this screen in a matter Of milliseconds. That event would have triggered a delete germ call on CommandCenter on the game side 0f the application. That call would have been followed by a callto update on the same CommandCenter object. That method would ping the PubSubHubbub server, which would grab the feed and immediately notify this application. If you start this server, you should see something like Figure l() ー 13. ÄiPandemic ー ( on び 引 ( 色 x 人 。 、 ← 今 C ☆ ふ は p : / / ( d (. ip d を ⅶ (. ( om : 8088 / ipandemic ー CO セ て 01 Center East S め Sa 愴 Ⅱ は 日 Terrain A 0 れ , 、 : を 下 朝 第 「 第 。 。 = D い YO 「 に ド C い ⅲ 3 に 卩 、 は こ a 然 : ト こ : い 0 ′ 、 气 R005 の V 引 ! 、 ツ 朝 ⅵ 幻 10wn や ー 朝 偽 e 月 い い 、 曇 ま ams 冰 ド 0 ま を 0 驀 い : : 第 ⅳ 市 9 Av• 誉 「 、 下 0 直 G 物 、 二 印 、 0 歔 ツ n ま 当 を 第 5 288 ー Ch 叩 ter10: Puttinglt Together 日 gu 尾 70-13. W 酊 訪 g 夜 ・ 川 s 平 尾 ad ⅲ 尾 4 伽 川 e GO し h16

Building the Realtime User Experience


Sites ー 第 。 .-aIlAT&T 2 : 59 PM 33 people on aVC.com mon 物 ツ rnax: 156 mon 物 ツ min: 0 10 00 物 ー ー ー 3 ⅲ A VC な 曼 c な 00 お 0 0 ! レ 第 物 を に マ 朝 h 9 は Strangelove A VC / マ 0 000 物 協 す ま 0 ・ 新 m tr 増 日 og Reading Mainstream? TOP pages 7 6 2 日 g レ 尾 9-2. Monitoring ル わ ル わ ビ C わ の ・ 舫 P わ 0 月 e 〃 〃 〃 c わ 〃 W0 叩 「 a Another service providing realtime analytics tracking is called Woopra ( 印 : 〃 ル ル ル . ル 00 〃 r 砒 CO 襯 . ThiS service is alSO installed by adding some JavaScript COde tO a site and then watching the statistics as quickly as they are collected. However, one differ- entiating factor Of Woopra iS that it requires users tO install a Java-based desktop application [ 0 monitor the traffic (see Figure 9 ー 3 ). Although Woopra lacks the alerting capability of Chartbeat, it does allow website owners tO interact with their users on a very personallevel. From the 、 ' oopra interface, a Woopra subscriber can initiate an instant message chat session with any user wh() is currently viewing the website (see Figure 9 ー 4 ). Realtime AnaIytics Services ー 187

Building the Realtime User Experience


numbers center the map on the lower part Of Manhattan, SO feel free [ 0 change that [ 0 whatever makes sense for your user base. Then, we add a method called initialize that just sets up the map by centering it on the default location and loading the default user interface elements. This method is actually called from CO 川 川 の 滬 ィ e 厩 げ . / 山 司 through the onload tag on the b0dy element. We've now got the shell Of an application ready tO run. Let's start up the server and ensure everything iS working. From your terminal window, start the server: $ python server ・ py Now if you point your browser to / 襯 〃 : / / loc わ 0 止 8088 , you should see a page similar to Figure 1() -11. ← 今 。 ☆ = h p : / / lo ( 記 host : 8088 / ・ も 04 In 工 000q10 み 000u0 セ iPandemic ー Comand Center S ョ 地 10 ! ⅵ ル 0 れ 4 傘 5 New Yo 水 こ を 訂 、 れ は 、 0 府 し 278 ー Ch 叩 ter 10 : Putting 則 Together 日 g Ⅲ ℃ 7 0- 月 . The わ co 川 襯 の 滬 記 厩 夜 ・