[{"data":1,"prerenderedAt":285},["ShallowReactive",2],{"project-6610218":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":43,"post_text":46,"what":47,"said":86,"maker_in_thread":167,"shape":172,"grid":176,"attempts":246,"same_week":247,"maker_shows":35,"maker_hidden":277,"reader_version":278,"card":279},"6610218","Offline","Make your app handle going offline","title","Show HN: Make your app handle going offline","http:\u002F\u002Fgithub.hubspot.com\u002Foffline\u002Fdocs\u002Fwelcome\u002F","github.hubspot.com","afschwartz",1382685172,2013,151,29,125,1739,8,"notable","languages","javascript library","library",[24,25,26,27,28],"offline","ajax","javascript","connectivity","request queue","loved",0.278,{"positive":32,"neutral":33,"mixed":34,"critical":35},6,11,2,1,20,{"idea":38,"execution":40,"design":41,"docs":42},{"positive":34,"critical":39},0,{"positive":35,"critical":39},{"positive":35,"critical":35},{"positive":39,"critical":39},[44,39,44,39,39,44,45,44,39,39,44,39,45,45,39,45,44,35,44,44,44,44,39,39,45,44,45,44,44],3,5,null,{"problem":48,"audience":60,"pricing":46,"motivation":46,"time_to_build":46,"stack":71,"openness":83,"stage":84,"team_size":85},{"value":49,"source":50,"evidence":51},"Apps behave badly when the connection drops; AJAX requests fail or need replaying when back online","inferred",[52,56],{"id":53,"by":54,"text":55},"6610506","WA","> It captures AJAX requests which were made while the connection was down, and remakes them when it's back up, so your app reacts perfectly. Is this something I want as a user?…",{"id":57,"by":58,"text":59},"6610917","Renaud","This comes at the perfect moment for me: I'm building an inventory web app used in warehouses on tablets and I'm faced with connectivity issues (incomplete or fluctuating WiFi…",{"value":61,"source":50,"evidence":62},"Web developers building JavaScript apps",[63,67],{"id":64,"by":65,"text":66},"6612322","zackbloom","I wrote the js in Offline. I agree completely, this is definitely not an attempt to resurrect Google Gears. I would love to see how more people use it, and what sorts of problems…",{"id":68,"by":69,"text":70},"6611179","rmrfrmrf","Why are you critiquing this script like it's a consumer product? Obviously any developer who wishes to use this will have do some extra work to make sure things run smoothly.",[72],{"value":73,"source":50,"evidence":74},"JavaScript",[75,79],{"id":76,"by":77,"text":78},"6610436","ssafejava","You guys have put out some great pieces of JS in the last year and the quality is getting better. I'm a big fan of how this is not jQuery dependent and the code is simple. I've…",{"id":80,"by":81,"text":82},"6610326","contrahax","Why is there a snake game wasting space in the source code?","open_source","launched","company",{"praise":87,"objections":109,"requests":128,"questions":137,"alternatives":159},[88,101],{"value":89,"source":90,"evidence":91},"Clean, small, well-made JavaScript from HubSpot","commenter",[92,93,97],{"id":76,"by":77,"text":78},{"id":94,"by":95,"text":96},"6610914","arvidkahl","The more I look into HubSpot libraries, the more I am amazed by their approach. To the point, small and flexible. And if the only annoyance people can bring up is a snake game,…",{"id":98,"by":99,"text":100},"6610421","drsim","Kudos to hubspot: they're pushing out some nice js pieces from their app",{"value":102,"source":90,"evidence":103},"Useful for apps on flaky connections",[104,105],{"id":57,"by":58,"text":59},{"id":106,"by":107,"text":108},"6611448","alinawab","This is a really useful starting point, thanks for sharing",[110,121],{"value":111,"source":90,"evidence":112},"Replaying queued requests can cause out-of-sync state and unwanted actions",[113,114,118],{"id":53,"by":54,"text":55},{"id":115,"by":116,"text":117},"6610861","pothibo","I think this is a neat proof of concept. However, you have to be extremely careful to not get out of sync hell. I see an enormous load of extra complexities for what seems to be…",{"id":119,"by":116,"text":120},"6611202","Maybe because I've already implemented something like this in the past and I faced a lot of issues with synchronizing multiple states on multiple devices? And I didn't say the…",{"value":122,"source":90,"evidence":123},"Developers must handle duplicate submissions themselves",[124],{"id":125,"by":126,"text":127},"6612242","nathankleyn","You'd need to take care of this anyway, since almost any asynchronous action otherwise carries the danger of being dispatched twice if the UI is left active. Most frequently,…",[129,133],{"value":130,"source":90,"evidence":131},"Option to remake only GET requests",[132],{"id":64,"by":65,"text":66},{"value":134,"source":90,"evidence":135},"Websocket (socket.io) support",[136],{"id":94,"by":95,"text":96},[138,145,152],{"value":139,"source":90,"evidence":140},"How quickly does it detect going offline?",[141,142],{"id":53,"by":54,"text":55},{"id":143,"by":65,"text":144},"6612294","After the first request fails it will confirm it's the connection at fault, and immediately show the message. Depending on the nature of the connection problem this can be…",{"value":146,"source":90,"evidence":147},"What happens on page reload or browser close with queued requests?",[148],{"id":149,"by":150,"text":151},"6626750","uaygsfdbzf","This is just what i need!! For my html5,json,localstorage app. But what if the user press Reload ? But what if the browser crasher or closed normally, does the buffer stay ? if…",{"value":153,"source":90,"evidence":154},"Does it work with AngularJS?",[155],{"id":156,"by":157,"text":158},"6610420","antihero","This looks neat, has anyone tried it with AngularJS?",[160],{"value":161,"source":90,"evidence":162},"Couchbase Lite with PhoneGap connector",[163],{"id":164,"by":165,"text":166},"6612254","jchrisa","We built Couchbase Lite as a serious embedded database for use cases like this. Our PhoneGap connector might be right up your alley. http:\u002F\u002Fmobile.couchbase.com",{"comments":35,"answered":35,"key":168},[169],{"id":170,"text":171},"6610554","If either the native offline event fires (where supported) or a single XHR request has a timeout or error, we fire our offline event, which triggers the UI to update. So in your…",{"commenters":173,"max_depth":44,"maker_replies":35,"first_comment_mins":174,"lifespan_hours":175},21,47,78,[177,179,181,184,187,188,189,191,193,194,195,197,199,201,204,206,208,210,212,215,220,223,226,229,231,233,236,240,244],[53,39,44,178,54,39],"project\u002Fneutral\u002Fidea",[170,39,39,180,11,35],"project\u002Fneutral\u002Fexecution",[182,39,44,178,183,39],"6610729","TobbenTM",[185,39,39,186,69,39],"6611151","commenter\u002Fneutral\u002Fnone",[125,39,39,186,126,39],[143,39,44,180,65,39],[76,35,45,190,77,39],"maker\u002Fpositive\u002Fexecution",[115,34,44,192,116,39],"project\u002Fmixed\u002Fidea",[68,34,39,186,69,39],[119,34,39,186,116,39],[64,34,44,196,65,39],"maker\u002Fneutral\u002Fidea",[198,34,39,186,116,39],"6613229",[98,44,45,200,99,39],"maker\u002Fpositive\u002Fnone",[57,202,45,203,58,39],4,"project\u002Fpositive\u002Fidea",[164,202,39,205,165,39],"other\u002Fneutral\u002Fnone",[94,45,45,207,95,39],"maker\u002Fpositive\u002Fdesign",[209,45,44,196,65,39],"6612365",[80,32,35,211,81,39],"project\u002Fcritical\u002Fdesign",[213,32,44,214,65,39],"6610333","maker\u002Fneutral\u002Fdesign",[216,217,44,218,219,39],"6610966",7,"project\u002Fneutral\u002Fdocs","smcl",[221,217,44,222,65,39],"6612335","maker\u002Fneutral\u002Fdocs",[224,217,44,218,225,39],"6613283","GrinningFool",[227,18,39,205,228,39],"6611626","NARKOZ",[230,18,39,205,65,39],"6612341",[106,232,45,203,107,39],9,[156,234,44,235,157,39],10,"project\u002Fneutral\u002Fnone",[237,33,45,238,239,39],"6610947","project\u002Fpositive\u002Fnone","while1",[241,242,44,218,243,39],"6611064",12,"sifarat",[149,245,44,192,150,39],13,[],[248,253,257,262,267,272],{"id":249,"name":250,"points":251,"category":252},"6617063","A Github for writers?",181,"productivity",{"id":254,"name":255,"points":256,"category":252},"6633273","Gmelius",160,{"id":258,"name":259,"points":260,"category":261},"6642100","Popcorn Messaging",126,"consumer_social",{"id":263,"name":264,"points":265,"category":266},"6630535","matthewisabel.com",92,"data",{"id":268,"name":269,"points":270,"category":271},"6624354","Bitbillpay",80,"finance_crypto",{"id":273,"name":274,"points":275,"category":276},"6605500","Code Climate",63,"dev_tools",false,"v2",{"id":280,"name":5,"line":6,"ai":277,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":281,"top":18,"kw":282,"maker":11,"domain":10,"tier":19,"attempts":39,"strip":283,"url":9,"mix":284,"praise":89,"objection":111,"sub":21},6610218,0.28,[24,25,26,27,28],"30300353003055053133330053533",[32,33,34,35],1794036510888]