<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Teri Chadbourne on Medium]]></title>
        <description><![CDATA[Stories by Teri Chadbourne on Medium]]></description>
        <link>https://medium.com/@EventTeri?source=rss-4f7002092ec------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1odi6Oohw6Lmv2OGsiFNrA.jpeg</url>
            <title>Stories by Teri Chadbourne on Medium</title>
            <link>https://medium.com/@EventTeri?source=rss-4f7002092ec------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 18:04:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@EventTeri/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Offline Camp Oregon, Take 2]]></title>
            <link>https://medium.com/offline-camp/offline-camp-oregon-take-2-7bf94848ec5a?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bf94848ec5a</guid>
            <category><![CDATA[offline-first]]></category>
            <category><![CDATA[offline-camp]]></category>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Fri, 25 Oct 2019 15:12:22 GMT</pubDate>
            <atom:updated>2019-12-09T19:43:03.622Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*2LHUbfRjVJETqLaxWktetg.png" /><figcaption>Pixel art by Tim Swast</figcaption></figure><h4>Sharing diverse perspectives from the Offline First community</h4><p>Offline Camp Oregon 2019 is a wrap! As organizers, we were incredibly grateful to our attendees for their patience and understanding when we had to postpone the the fifth edition of the event due to a local wildfire. Although we lost some of our registered campers due to the reschedule, we gained others, and ultimately on September 27–30 we returned to Cascade Mountain Ranch (home of our 2017 event), outside of Grants Pass, Oregon, gathering 22 awesome humans for another fabulous weekend of relaxation, collaboration, and discussion. In the end, the fire ban was lifted just in time for us to offer our traditional s’more-making evenings around our own campfire.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jqzfGfh_2UXpkaFvYFitdA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N8eqHoNG6YdvBlreBcAx8A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-1YcTHHc0BwZ1DCSoEWYCQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hZmjFpQ-clB_7KotlOBqbQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eGqs3bShe7whvLw1zMnPwg.jpeg" /><figcaption>Scenes from Offline Camp (Image Credit: Matt Davis)</figcaption></figure><p><a href="http://offlinefirst.org/camp">Offline Camp</a> is an opportunity to gather the growing Offline First community for a discussion about development and design practices that can counter the effects of inherently spotty or non-existent network connections. I’ve written before about <a href="https://medium.com/offline-camp/crafting-community-events-that-leave-them-wanting-smore-902974cff4d4">what makes the camp format so special</a>, but long story short, it’s the connections we make with others. And as always, our campers brought a variety of backgrounds and perspectives to the table. From developers to designers, UX professionals, product managers, project coordinators, developer advocates, community leaders, open source project maintainers, decentralized web advocates, and more, each attendee brought a unique perspective to contribute to our wide-ranging discussions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KgxTmnsah7tH13IY" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aKhXfgIim3DOg3EEmXw8EQ.jpeg" /><figcaption>Discussion sessions (Image Credit: Bradley Holt)</figcaption></figure><p><strong>Discussion Sessions</strong></p><p>At the heart of Offline Camp are our unconference discussion sessions, centered on topics proposed and voted on by our campers. As always, campers had a hard time selecting which sessions to attend, so we shared summaries with each other, and hope to share them with you as well. Here are this year’s 15 discussion topics, ranging from technical to philosophical, many of which you’ll see summarized in upcoming posts in this publication:</p><ul><li>Open Source Funding and Business Models of Offline First Apps</li><li>Best Offline First Tools</li><li>Decentralized Identifiers + Autonomic Data</li><li>Offline First for Refugee Camps</li><li>Collaborative Design of Resilient Architecture</li><li>UX Challenges of Offline</li><li>Let’s Get Scuttling (SSB Sync Party)</li><li>Bad Actors in Distributed and/or Offline Apps</li><li>How Would You Build an Offline Chat App?</li><li>Building for Low- to Middle-Income Countries</li><li>Schema Migration in a Decentralized World / Versioning Immutable Data Structures</li><li>When Not to Use a PWA (Native v Mobile)</li><li>Effective Beginner-Friendly Messaging for DWeb</li><li>P2P Mobile</li><li>Inventive Alignment &amp; Power Dynamics</li></ul><h3>R.J. Steinert III on Twitter</h3><p>I made it back to Vermont from @OfflineCamp in Oregon. Stay tuned to find out why I&#39;m thinking about putting tablets in a toaster.</p><h4><strong>Passion Talks</strong></h4><p>Another highlight of camp are passion talks, an opportunity for campers to share 5 minutes of insight on any topic they’re excited about, from Offline First to the broader tech world and beyond. This year’s passion talk topics included:</p><ul><li><a href="https://medium.com/offline-camp/we-should-learn-from-rss-31d100c81d26">RSS and the Open Web</a></li><li>3 Use Cases for Local First</li><li>90s Aesthetics in Modern Tech</li><li>Community Control of Modern Tech</li><li>Retrospective and Hopes for the Offline First Community</li><li>Cross-Platform Offline File Transfers with PWAs</li><li>Braid HTTP State Sync Demo</li><li>Oregonion: A Non-Profit, Encrypted Transit ISP</li><li>Digital Freedom of Assembly</li><li>Mass Migrations</li><li>Git: Not Just for Code</li><li>Quest for Combining Sneakernet and Internet</li><li>Empathy</li><li>It’s Not Enough if It’s Just Used by Enthusiasts</li><li>The Climate is Changing. Why Aren’t We?</li><li>Farm: A Programmable Offline Space</li><li>Organizing Tech Resources</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zt4Tg6wMcgp5SwUEhrsMzw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2YnhXvcYjDSzbboSoV0FQ.jpeg" /><figcaption>Passion talks and morning standup (Image credit: Teri Chadbourne)</figcaption></figure><h4>Upcoming Content and Events</h4><p>We’re looking forward to sharing more detailed coverage of our unconference sessions and passion talks here on Medium in the weeks to come. Following this Medium publication and the <a href="https://twitter.com/offlinecamp">OfflineCamp Twitter account</a> are great ways to stay informed. In the meantime, our <a href="https://medium.com/offline-camp/offline-first-resources-2acc5836e9d4">resources page</a> has tips on where you can study up on Offline First through additional reading material, videos, podcasts, newsletters, and more.</p><p>If you’d like to attend a future camp, you should also sign up <a href="https://offlinecamp.typeform.com/to/V8aSWJ">here</a> for updates. The quick form includes an opportunity to let us know where you think we should host our next event. (Not sure if Offline Camp is for you? Check out our video highlighting our campers’ take on the <a href="https://www.youtube.com/watch?v=FNtpPW_7H1k">unique experience</a>.)</p><h4>Community Support</h4><p>We have a lot of people to thank for the success of Offline Camp Oregon 2019. First and foremost, our campers and the broader Offline First community, without whom none of this would be possible. In addition to the amazing <a href="http://offlinefirst.org/camp/team.html">team of organizers</a> who pulled this event together, we owe a huge debt of gratitude to <a href="https://protocol.ai/">Protocol Labs</a> and <a href="https://www.mongodb.com/">MongoDB</a> for their generous sponsorships, as well as <a href="http://makemodel.co/">Make&amp;Model</a>, <a href="https://fizbuz.com/">FizBuz</a>, and <a href="http://technocation.org/">Technocation, Inc.</a> for their invaluable logistical support. Special thanks to Zak and Michael of Protocol Labs who made our videography possible! <strong>Community building is a team effort, and we couldn’t do it without each and every one of you.</strong> ❤️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Gmuf8Xfr4m5_xrB1" /><figcaption>Offline Camp Organizers Bradley Holt, Teri Chadbourne, and Steve Trevathan (not pictured: Carter Rabasa) (Image Credit: Steven Trevathan)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bf94848ec5a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/offline-camp/offline-camp-oregon-take-2-7bf94848ec5a">Offline Camp Oregon, Take 2</a> was originally published in <a href="https://medium.com/offline-camp">Offline Camp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Join us at Offline Camp Oregon this September]]></title>
            <link>https://medium.com/offline-camp/join-us-at-offline-camp-oregon-this-september-8e88a81d36a7?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e88a81d36a7</guid>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Tue, 06 Aug 2019 16:25:18 GMT</pubDate>
            <atom:updated>2019-08-06T16:25:18.514Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://offlinefirst.org/camp">Offline Camp</a> is an opportunity to gather the growing Offline First community for a discussion about development and design practices that can counter the effect of inherently spotty or non-existent network connections. It’s a <a href="https://www.youtube.com/watch?v=FNtpPW_7H1k">unique experience</a> that we love.</p><p>As you may have heard, we recently <a href="http://offlinefirst.org/camp/reschedule">made the difficult decision to reschedule Offline Camp</a> to <strong>September 27–30, 2019 </strong>due to the Milepost 97 wildfire in nearby Canyonville, Oregon. Although we anticipated that heavy smoke in Grants Pass would have made for an unhealthy experience this past weekend, we’re thrilled by the tremendous progress of fire crews, and we’re excited to breathe much healthier air late next month. (We’re told it’s a gorgeous time of year to visit!)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*fKJ_jUVByz7yrH4l.png" /><figcaption>Cascade Mountain Ranch, home of Offline Camp Oregon 2019</figcaption></figure><p>As editors of the <a href="https://medium.com/offline-camp">Offline Camp Medium publication</a>, we’re tremendously thankful for the many camp alumni and guest authors who’ve shared their perspectives on all aspects of Offline First challenges and solutions since our first camp in June of 2016. We’re so happy to have you, our readers, as part of the Offline First community, and hope you’ll add your voice to the conversation at our rescheduled event.</p><p><strong>We now have tickets available</strong> for our new dates, <strong>September 27–30</strong>, and we’d love to see you at the ranch! You can find all the details, including everything you need to know to apply, on <a href="http://offlinefirst.org/camp/">the Offline Camp website</a>.</p><p><strong>We can’t wait to see you around the campfire.<em>*</em></strong></p><p>Your Offline Camp Organizing Team,<br><a href="https://medium.com/u/4f7002092ec?source=post_page---------------------------">Teri</a>, <a href="https://medium.com/u/b04a3bb1e99b?source=post_page---------------------------">Steve</a>, <a href="https://medium.com/u/46d19877174b?source=post_page---------------------------">Bradley</a>, and <a href="https://medium.com/u/ad5c954d0329?source=post_page---------------------------">Carter</a></p><p>P.S. Can’t make it to Oregon next month? <a href="https://offlinecamp.typeform.com/to/V8aSWJ">Cast your vote</a> for future locations of Offline Camp and we’ll be sure to notify you when our next event is scheduled!</p><p><em>*Campfires during fire season are flame-free.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e88a81d36a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/offline-camp/join-us-at-offline-camp-oregon-this-september-8e88a81d36a7">Join us at Offline Camp Oregon this September</a> was originally published in <a href="https://medium.com/offline-camp">Offline Camp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Join us at Offline Camp this August!]]></title>
            <link>https://medium.com/offline-camp/join-us-at-offline-camp-this-august-95c4b2aaeaaf?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/95c4b2aaeaaf</guid>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Wed, 24 Apr 2019 13:45:57 GMT</pubDate>
            <atom:updated>2019-04-24T13:45:57.021Z</atom:updated>
            <content:encoded><![CDATA[<p>Offline Camp is an opportunity to gather the growing Offline First community for a discussion about development and design practices that can counter the effect of inherently spotty or non-existent network connections. It’s a <a href="https://www.youtube.com/watch?v=FNtpPW_7H1k">unique experience</a> that we love.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*y1mdjNXyJB2uYRaT2rufEQ.png" /><figcaption>Morning Standup at Offline Camp California</figcaption></figure><p>As editors of the Offline Camp Medium publication, we’re tremendously thankful for the many camp alumni and guest authors who have shared their perspectives on all aspects of these Offline First challenges and solutions since our first camp in June of 2016. We’re so happy to have you, our readers, as part of the Offline First community, and hope you’ll add your voice to the conversation at our next camp.</p><p>To thank you for your readership, we’re sharing this early invitation to join us for the next Offline Camp, taking place August 2–5, 2019 in…</p><p>Oh, come on, we’ve labored over a dramatic blog post with intentional suspense for the big reveal. You didn’t think we’d spill the beans in this email, did you? You’ll have to read <a href="https://medium.com/offline-camp/announcing-offline-camp-v5-eb9111fdcc94">the big announcement</a>!</p><p>But we are indeed pre-releasing this GIF to you as a clue:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*H49JLNOj_yJGWjHuZPOwsg.gif" /><figcaption>Confirmed campers for Offline Camp 2019</figcaption></figure><p><strong>We can’t wait to see you around the campfire.</strong></p><p>Your Offline Camp Organizing Team,<br><a href="https://medium.com/u/4f7002092ec">Teri</a>, <a href="https://medium.com/u/b04a3bb1e99b">Steve</a>, <a href="https://medium.com/u/46d19877174b">Bradley</a>, and <a href="https://medium.com/u/ad5c954d0329">Carter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95c4b2aaeaaf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/offline-camp/join-us-at-offline-camp-this-august-95c4b2aaeaaf">Join us at Offline Camp this August!</a> was originally published in <a href="https://medium.com/offline-camp">Offline Camp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decentralization is Not Enough]]></title>
            <link>https://medium.com/offline-camp/decentralization-is-not-enough-75b15b8bc230?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/75b15b8bc230</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[mastodon]]></category>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[offline-first]]></category>
            <category><![CDATA[decentralized]]></category>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Fri, 01 Feb 2019 15:05:33 GMT</pubDate>
            <atom:updated>2019-06-12T13:20:53.365Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BIZY3Uh47-Zo-LprSsLTpQ.png" /><figcaption>An illustration from Nolan Lawson’s “Decentralization is Not Enough”</figcaption></figure><h4>A conversation with Nolan Lawson</h4><p>In his passion talk at Offline Camp Oregon in November of 2017, Nolan Lawson discussed the problems he’s noticed in the Offline First and decentralized web communities, where there’s often too much focus on tech and not enough on people. Nolan’s talk, titled “Decentralization is Not Enough,” explored the ways in which those with the most technical expertise are using their knowledge to build tools they’re passionate about, without successfully making the benefits clear to those around them. The result, he suggests, may be an exclusive safe haven for the technical elite, rather than a compelling movement to change the way technology works for everyone.</p><p>Nolan’s talk resonated strongly with my own experiences in the tech community. When I began co-organizing Offline Camp in 2016, I wasn’t yet a web developer, and I spent a lot of my time surrounded by folks who had brilliant technical skills but didn’t always have a knack for explaining technical concepts in an approachable way. With decentralization in particular, it was hard for me to find clear explanations of the benefits that would justify exploring unfamiliar tools. So a few months after Offline Camp Oregon, Nolan and I sat down together to talk about how best to bridge the communication gap he described in his passion talk. You can find his full 5-minute talk below, followed by an abridged transcript of our conversation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fa6a3aLDzSgI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Da6a3aLDzSgI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fa6a3aLDzSgI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d1eb91e82d613d890d4a2438353e16e/href">https://medium.com/media/9d1eb91e82d613d890d4a2438353e16e/href</a></iframe><h4><strong>Tech literacy creates a two-tiered society</strong></h4><p><strong><em>TC:</em></strong> This was probably my favorite talk of Offline Camp passion talk history because it spoke to my role within the tech community. When I started planning Offline Camp, I was primarily an event planner, and at this point I’m actually a coder. Within Offline First, when we talk about it as a social movement, we have a few different ideas about what it means and where it’s going. It’s very easy for me to get on board with Offline First as a good user experience. It’s very easy to understand in that way, even without any coding skills. It’s very easy to understand the concept of helping people or democratizing access to data. We want to be able to support developing world healthcare and write data to our device, all of that. Where I get lost, and where I think the movement isn’t sustainable, is if we use this message that some people are saying, which is, “Yep, decentralization: that’s the end goal.” That concept doesn’t come across as accessible most of the time.</p><p>As I was just rewatching the video, I was like, two factor authentication, check! I get to be a nerd for that one. Password manager, check! And then as soon as we get into decentralization, well… if you hadn’t asked me if I wanted to be on Mastodon, I wouldn’t be on Mastodon. What the heck does <em>federated</em> mean? What’s a <em>server instance</em>? You’re right, I have no idea what you’re talking about. It sounds incredibly intimidating, in the same way it used to be, on a more simple level, to imagine someone building their own website from scratch, without Geocities or Squarespace. To an outsider, it feels like the difference between using systems that are in place and building your thing from scratch. And I hear people framing it in a way that makes me understand some of the issues they’re trying to address, but not in a way that makes me understand what I would do next and convinces me that I would actually be capable of doing such things, which makes me worried about the packaging for the movement if that’s presented as the goal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h9qEkGzYXErIoMn6fmkBMw.png" /><figcaption>Illustration by Nolan Lawson, “Decentralization is Not Enough”</figcaption></figure><p><strong><em>NL:</em></strong> Yeah, I totally agree with that. You’re right that Offline First is an easier sell, because there’s user experience, there’s design, there are even business arguments for it. But there is also a lot of overlap, it seems, between people who are interested in Offline First and people who are interested in decentralization. And <strong>once you get into the topic of decentralization, I think there’s not a whole lot of effort to try to make that content accessible and to try to explain why it is a virtue to strive for in the first place</strong>. A lot of people just kind of treat it as a given: “Oh, obviously decentralization’s good. Obviously we want maximum decentralization. Now on to the next topic.” But for the average person, it’s like, “What is the point? What do I get out of this? What problem are you actually trying to solve?”</p><p>One thing I wanted to bring up in the talk was that a lot of the people advocating for this stuff are very tech literate and very tunnel-visioned on the tech problems, which are completely inaccessible to some people who are less technical. I don’t want to cast shade or anything, but I was looking at Hacker News yesterday and Scuttlebutt was on the front page. Scuttlebutt is a peer-to-peer decentralized social network, and there’s an instructional video explaining how to use it. And the first thing it says to do is download this native application, and it has a little picture of dragging the Mac app to the applications folder, which already is something that some people just don’t even understand. And then the second thing they say is to generate a public/private key pair, which at that point…</p><p><strong><em>TC:</em></strong> No, you’ve lost a lost of people.</p><p><strong><em>NL:</em></strong> You’ve lost <em>me</em>, frankly, because every time I struggle with that stuff, it’s a pain. So it’s clear to me how narrow-minded a lot of the people in this community are. Don’t get me wrong, many of them are technically brilliant, and their hearts are in the right place, but I see so much of this tunnel vision and it just bothers me. <strong>It actually bothers me more if the movement is successful than if it’s a failure, because if it’s successful, congratulations, you’ve built a little safe haven for nerds. You’ve built your little island or your little compound or your escape valve for people who are literate enough or wealthy enough or privileged enough to understand how to use this technology. </strong>Yeah, it’s a huge problem I see right now, making this stuff accessible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6m5vTncoyzkyxtA8AXR_gw.png" /><figcaption>Illustration by Nolan Lawson, “Decentralization is Not Enough”</figcaption></figure><p><strong>Improving onboarding for decentralized networks and tools</strong></p><p><strong><em>TC:</em></strong> Yeah. I think you did a great job of identifying that problem in your talk. Do you have ideas for the solution?</p><p><strong><em>NL:</em></strong> So that’s a good question. So, obviously I work on Mastodon and I’ve even contributed to the project. I’ve also just released a new Mastodon web client called Pinafore. I’m trying to basically redesign Mastodon to be even more accessible than it is right now and try to simplify the interface, make it a single column instead of multi column, and get rid of a lot of the fancy features. So obviously I’m partial to Mastodon and Mastodon’s approach. I think Mastodon has been the best at getting regular people to find it, and you see that in the community.</p><p>Honestly, my wife uses Mastodon everyday, she’s a way more hardcore user than me, and she just uses it to write jokes, and I look at her timeline and see her interacting with friends. And when I hang on Mastodon, I’ve honestly met so many trans people on Mastodon, which is shocking. The trans community is huge. I went to a Mastodon Meetup, and I swear I might’ve been the only straight white guy in the room. How unusual is that for a group in the tech industry, right? You can see it in the makeup of people who are actually interested in Mastodon.</p><p>I think part of the way they solved it is just making onboarding really, really easy. You know, they’ve got one URL you can go to called <a href="http://joinmastodon.org/">joinmastodon.org</a>, and it looks nice and professional and clean, and it’s got a very simple flow. The hardest step is just choosing your instance server, which is one thing I identified in my talk as a source of friction. I think you have to make the onboarding easy. You can’t tell people to generate a public/private key pair. You can’t tell people to run a binary on the command line. You can’t even tell people to download an app and do the little thing where you drag it into the applications folder. Even that is boring to some people. It has to be web-based, or it has to be a mobile app on the app store or something that simple.</p><p><strong><em>TC:</em></strong> So it’s been a while since I signed up for Mastodon, but I am definitely still confused about how different instances work with each other. Am I talking to all of the people using Mastodon, am I only talking to the small group of people, like what is happening?</p><p><strong><em>NL:</em></strong> Yeah. Actually Eugen Rochko, who leads the Mastodon project, has been really, really good about trying to break down that barrier and explain that concept better. There’s a <a href="https://www.youtube.com/watch?v=IPSbNdBmWKE">3-minute YouTube video</a> that’s got a really cute little mastodon on it.</p><p><strong><em>TC:</em></strong> Which is important. Having cute cartoon characters is very helpful.</p><p><strong><em>NL:</em></strong> Yeah. If you look up “What is Mastodon?” on YouTube, I think it should be the first thing that pops up, and he kind of explains this whole thing. But basically the way I would try to explain it is that it’s kind of like subreddits…</p><p><strong><em>TC:</em></strong> Which again, we don’t all use Reddit.</p><p><strong><em>NL:</em></strong> Yeah. I see Reddit as another nerd thing.</p><p><strong><em>TC:</em></strong> It is.</p><p><strong><em>NL:</em></strong> I guess it’s as if when you signed up for Facebook or Instagram or Snapchat or whatever, you have different accounts, and normally they are each like their own little kingdom, they can’t talk to each other. But imagine if when you signed up for Facebook, you could actually talk to people on Instagram, those messages could flow back and forth, and could do the same thing with Snapchat. Imagine if they could all talk to each other. It’s like that but then times 2,000, because there’s like 2,000, and each one has its own focus. You know, the one I run, toot.cafe, is mostly techie people. My wife runs one called freedom.horse, which is just silly as you can guess from the .horse. She designed it to be all pink and it’s got pink horses. And there’s pentacl.es, which is for people who are into Wicca, witches kind of stuff. There’s lots of little subcommunities, but they can all kind of talk to each other. That’s the 30-second spiel basically. And each one is independently owned and operated, which is the big draw.</p><p><strong><em>TC:</em></strong> And if you were going to explain the big draw, basically explain “Why decentralization?” to someone, how would you do that for the commoner audience?</p><h4>Decentralization as a reaction to censorship and defender of marginalized communities</h4><p><strong><em>NL:</em></strong> Actually, you can make a lot of different cases for this. <strong>One case you can make is actually censorship.</strong> I don’t know if you were following the news, but FOSTA and FESTA just recently got signed into law, which, long story short, makes it illegal to do sex work on the internet, to sell sexual services. I mean, it’s illegal in most parts of the world, but in many parts of the world it is decriminalized. Sex work is not illegal in Austria or Australia. But if the Internet is American, which it basically is, right… All the big tech companies are American. They’re housed in the US: Facebook, which owns Instagram and WhatsApp, and Twitter and Reddit and all these things… Google, YouTube, they’re all owned by US companies, right? So a lot of them have started evicting sex workers from their platform, just cutting them off entirely, banning their accounts, shadow banning their accounts, shutting down subreddits, which for many of these people is their only line of work. This is how they survive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WP1hT48hJCjAyVj2OyBhcA.png" /><figcaption>Illustration by Nolan Lawson, “Decentralization is Not Enough”</figcaption></figure><p>This is a great case of a marginalized community that deals in something that maybe like the average person doesn’t necessarily… There’s no huge lobby in Washington advocating for the rights of these people. They have no one to protect them. But there is a Mastodon instance for sex workers, and it’s actually grown by a lot in the last few weeks, called Switter, and it has like 6,000 users now. It’s like the sixth biggest Mastodon instance now. They actually are hosted in Austria and they used to be partially hosted in the US. They were using a CDN called Cloudflare, but Cloudfare shut them down after FOSTA and FESTA, so they just moved their DNS to somewhere in Europe.</p><p>So the fact that it’s independently owned and operated means that this thing can transcend laws, customs, places. If the US became a dictatorship tomorrow — you know, not saying that’s gonna happen, but if it did — and suddenly YouTube and Facebook and Twitter and all these companies decided that they were just going to shut down X or Y community because of risk aversion, or because of US-specific laws, if it’s decentralized then someone can always spin up another independently operated server somewhere. So the censorship argument is one thing.</p><h4><strong>Decentralization for privacy</strong></h4><p><strong><em>NL:</em></strong> The second argument you can make is advertising. <strong>You’re not being tracked. </strong>When you use Mastodon, your data is not being shared or sold or used for any nefarious purposes. It all goes into the gutter, it goes into the trash. Mastodon actually by default throws away things like image metadata, and even if your data were compromised, it’s spread out. Say you joined toot.cafe, which has a thousand users. That’s a tiny slice of the entire fediverse. Even if I was an idiot and my server got compromised, got hacked or something, and someone got access to the database, hey, that’s only a tiny percentage of the entire social network that got compromised. So it reduces the attack surface. Plus, if you come into this platform there’s zero ads, zero tracking. Your data’s not being used for various purposes that you don’t know about.</p><p><strong><em>TC:</em></strong> Who’s paying for it to exist without the ads?</p><p><strong><em>NL:</em></strong> Mostly it’s enthusiasts like myself. I just take the costs on for myself. Most instances have a Patreon account set up, so it’s usually crowdfunded by the users themselves. And those are the the first two big arguments I can make off the top of my head.</p><p>I think that kind of goes back to the question of how you actually make the argument for this stuff without getting people’s eyes to glaze over. I think <strong>what you have to do is address a problem that they actually have</strong>, right? So talking about the censorship thing, sex workers’ issues may not even be the first thing to go with because it’s a small community and maybe not everyone can identify with that. But I think everyone can identify with the feeling of being tracked online or the feeling of being constantly subjected to ads or being subjected to content where you’re not quite sure if it’s an ad or not. You know, like Instagram celebrities, where they take a selfie and they’ve got an artfully placed bottle of lotion or something, and maybe it’s not clear that it’s an ad. There’s none of that on Mastodon, or on Scuttlebutt for that matter.</p><p><strong><em>TC:</em></strong> Is there any risk that the law-avoiding benefit becomes a detriment? Or do we just not pick that version of Mastodon if we don’t like it? Is this going to drive more wedges between groups of people by not having them interact with each other or is that not really a concern?</p><p><strong><em>NL:</em></strong> Those are two very genuine concerns. For the first point, if there is one part of the network that is doing something grossly illegal, like selling hard drugs, the government could shut down that instance. Any other instances could block that instance proactively, which would basically mean they would just ignore any comments. It would be as if it didn’t exist. Lots of instances already block one another for various reasons, usually political differences, but sometimes differences in what they find acceptable content.</p><h4>Self-selecting echo chambers</h4><p><strong><em>NL:</em></strong> That’s the first thing, but then the second thing you might say is, “Well, that’s great, but then doesn’t that just lead to more filter bubbles, more echo chambers?” I think that’s a good argument to have, but what I would say is that people already live in echo chambers and filter bubbles and they seek them out themselves. When you go to a local sports club, a local meetup, or to a local church or even school, people pick this stuff based on the kinds of people they want to hang out with. Even with neighborhoods, people already kind of self-segregate. And I think <strong>if you try to completely eliminate filter bubbles and echo chambers, you’re essentially going against what the consumer wants</strong>. The consumer wants filter bubbles. The consumer wants to be with people that agree with them, for the most part. I would say that the way to break that filter bubble is just to have separate accounts on different instances. But I don’t think it’s a problem you can solve without going against human nature.</p><h4>Barriers to entry, barriers to understanding, and lack of a clear value proposition</h4><p><strong><em>NL: </em></strong>Let me ask you a question, because you kind of identify as not so much on the super steeped-in-tech side of things. <strong>What do you find <em>not</em> compelling about it?</strong> That’s what I want to know, because my goal, and I think the goal of most people advocating for decentralization, is to make it compelling for people who aren’t nerds and don’t just take it for granted and say, “Oh, obviously this thing is good.” I’m wondering what your perspective is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0-RdqIPOyl7kg644u1bJmg.png" /><figcaption>Illustration by Nolan Lawson, “Decentralization is Not Enough”</figcaption></figure><p><strong><em>TC: </em></strong>To be fair, I haven’t done a ton of research and maybe my concerns would be addressed if I did more. The things I’m probably most familiar with by exposure to other Offline Camp people would be Beaker Browser or Mastodon or whatever else. And when I hear them explained, it’s just that it always jumps into, “Host your own thing.” I don’t know how to host a<em> thing</em>. Clearly there’s a different word that goes where I’m using the word <em>thing</em>, because I can’t manage the vocabulary. It’s not familiar. <strong>It doesn’t sound like an easy thing to get started with, but it very well may be with the right changes in vocabulary, the right metaphors.</strong></p><p>When other folks on my dev advocacy team are practicing a talk, my feedback almost always is, “Had you included a really easy-to-understand example at the beginning, I could have followed your entire talk, but you waited until the end to give the example. Therefore, I was completely lost about everything that I otherwise could have followed.” So <strong>it’s about having that idea to latch onto that makes sense to the layperson, the right metaphor</strong>, the right whatever. It’s definitely an accessibility issue and a vocabulary issue. I mean, I’m a smart person, I’ve picked up a lot of tech skills, and I’m sure these are things I could do, but it’s a mix of like making it sound easy and normal and maybe putting more emphasis on why is this better than the normally accepted convention.</p><p><strong><em>NL:</em></strong> Do you think those two things are separate or are they related problems? The problem of “What are you talking about?” and the question of “What’s in it for me? What is the point?” Which one of those things is more important, or are they kind of the same thing?</p><p><strong><em>TC:</em></strong> I don’t think they’re quite the same thing as each other, but I think I think they balance out. Maybe if you explained it as being so incredibly easy, I wouldn’t care that I don’t understand what the point is, and I’d be like, “Okay, what the heck?” Or if you explained it as being super important, then I might be like, “Oh man, this is going to be a beast to try to understand and get started with, but it’s really important. I guess I’ll take the time to learn.” It’s some balance of the two. So they could both be medium levels of explanation or one can be amazing. Ideally, both would be amazing.</p><p><strong><em>NL:</em></strong> And arguably it has both problems, right? <strong>There’s a high barrier to entry, barrier to understanding, and the value proposition isn’t obvious.</strong> So that’s interesting. Well I guess maybe the starting point should really be instead of talking about the tech or how it’s all built or this complicated tech jargon, maybe instead what the problems are with the alternative: centralization.</p><h4>Usability of centralized versus decentralized systems</h4><p><strong><em>TC:</em></strong> Right, I think so. And usually I don’t need to care about how it works, right? With a good product, I don’t need to care how it works. It works. I love that it just works and it just does what I need it to do. I shouldn’t need to care about the business model of it. Now maybe, once you identify that problem for me, you can help me understand why the problem is caused by the business model and then maybe I’ll care about it, but usually that’s invisible to the user.</p><p><strong><em>NL:</em></strong> So maybe that’s actually the core problem, right? There’s a book by Tim Wu called “The Master Switch” where he talks about how radio and TV and movies and all these industries basically went through a period where it started off and it was chaotic and it was a lot of indie people doing stuff locally or for their own little communities, like farmers setting up little radio networks just for their local farm communities. And then eventually it got more and more aggregated and concentrated and then eventually you have one, two, or maybe five companies running the whole show. And the argument is basically that the internet is going that same direction.</p><p>And I remember reading an interview with Evan Williams, who founded Twitter, on Medium, and he talked about this and said that he thinks that the <strong>usability is greater with centralized systems</strong>, that fewer companies controlling more and more things is actually just in the service of users, right? Because it’s easier if you just go to google.com because whatever, Google is search, or you go to facebook.com because Facebook is social, and I don’t want to have to pick between 100 different competitors. I just want one thing that does my thing and I sign in. It’s really easy and I sign in and I use the same sign-in on every single website, and it’s super simple. And so he almost called it a law of nature. So maybe that actually is the core problem, that <strong>the thing that decentralization is trying to do is inherently kind of user-hostile</strong>. Like maybe that’s overstating it, but…</p><p><strong><em>TC: </em></strong>Yeah.</p><p><strong><em>NL:</em></strong> Which is interesting, I hadn’t actually considered that.</p><p><strong><em>TC:</em></strong> Well, and you also have the problem of, if, say, a startup wants to compete with one of these big companies. They have to have money to do it. They have to put their product in front of people. And with one of these decentralized alternatives, where’s the money coming from? You know, you’re specifically avoiding ads and weird influences, and the only place that I hear about it is at Offline Camp when I’m hanging out with nerdier nerds than I am. I only know about it because of my work with camp. I don’t think I would have any exposure to these things otherwise, you know, so you have to be in the right place at the right time to know that these things are happening. Or it may be that they’re being surfaced in more prominent tech journals or blogs or whatever, but if you’re my mom, not me, you’re not going to be in any of those places. And let’s face it, we all have people in our lives that are coming to us for tech support on things that we would think would be much easier to understand than this, right? So it’s not being surfaced next to the big guys, certainly.</p><h4><strong>Explaining the value proposition</strong></h4><p><strong><em>NL:</em></strong> How do you make this stuff accessible for your mom? I guess that was the other point I was trying to make in my talk.</p><p><strong><em>TC:</em></strong> Well, clearly the first thing you do is try to make your brother explain it instead. You always try to pawn it off on somebody else. That’s clearly the best approach because, with some of these things, the more simple it seems to you, the more frustrating it is that you have to explain it to someone else. I don’t know if the decentralized community feels like this or not, but sometimes it’s just like, “Oh my goodness, why aren’t you getting this?” Seriously, though, I don’t know. Connecting to some other piece of experience being like, “Hey, you know how on your iPhone you do this? On your computer, you do it in a similar way.” <strong>Pick something that the new user does understand and make the connection to it, draw the line between.</strong> Maybe also highlight what the benefit is.<strong> If it is inherently difficult to pick up on, then the benefit has to be huge.</strong></p><p><strong><em>NL:</em></strong> Right. And right now the benefit is also a kind of intangible, right? It’s like, “Oh, come to this other platform where your data isn’t being tracked.” People don’t understand how their data’s being used or why that’s bad or why it should bother them. Should it bother them? There was this whole brouhaha recently about Facebook and this Cambridge Analytica scandal, and I’m not convinced that the average Facebook user really cares or understands what’s going on. If even in the worst case scenario, like your CEO testifying before Congress — that’s bad, right? — if even in that worst case scenario, people aren’t really moved to seek out alternatives, then clearly the value proposition either isn’t big enough or hasn’t been explained well enough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WjOhsn31WfOUfyViwYukpQ.png" /><figcaption>Illustration by Nolan Lawson, “Decentralization is Not Enough”</figcaption></figure><h4>Are decentralized networks scalable or destined to be a niche for nerds?</h4><p><strong><em>TC:</em></strong> Not from the perspective that there would be more people to talk about it to other people, but just from the basic standpoint, does it help decentralized networks to have more people using them, or are they not inherently scalable? Is it all going to fall apart when we have more people, or are they perfect to have? If we convince the whole world to use them, is this going to be good?</p><p><strong><em>NL:</em></strong> That’s actually a great question. I feel like that question is unanswered. I feel like the technical problems are fixable with both the peer-to-peer networks and the decentralized, federated systems. That’s the least interesting question. The most interesting question to me is, say you win and everyone switches from Facebook to Scuttlebutt or to Mastodon, let’s just say that happens…. How are you going to ensure that you don’t have problems like spam? How are you going to ensure you don’t have problems like harassment? How do you ensure that you don’t have problems with abuse or identity theft or whatever, or security, like someone tricking someone else into giving them their credentials? You have to solve all those problems when you reach scale because before you reach scale, the attackers aren’t interested in you.</p><p><strong><em>TC: </em></strong>This is like saying we don’t need antivirus on our Macs because they only attack Windows computers.</p><p><strong><em>NL:</em></strong> That’s actually a great analogy. Yeah, yeah, true. Or Linux, right? Nobody’s out there trying to create worms for Linux because there’s no money in it. It’s not worth it. No one’s out there trying to create bots or spam on Mastodon because it’s not worth it yet, or Scuttlebutt, because it’s not worth it yet. As soon as it becomes worth it, then that becomes a problem you have to solve, and I’m actually not convinced that there’s been a lot of thought put into that. I’ve put a little thought into it, but one of the things I wonder is whether, inherently because of the lack of usability of these kind of platforms, and some of these inherent scaling issues, maybe it’s just always going to be a niche thing.</p><p><strong>You know, maybe it’s just always going to be a thing for nerds, in which case I’m less enthusiastic about it, because like I said, I don’t want an escape rocket. That doesn’t satisfy me.</strong> That doesn’t satisfy me from the perspective of civil rights because you’re just saying, “Okay, great. You know, here <em>you</em>, the great mass of the population, <em>you</em> can go on YouTube and Facebook and whatever and have all your data harvested, have zero privacy, be subjected to weird algorithmic content on YouTube, be subjected to ads and all this kind of stuff and <em>we’ll</em> just be safe off in our own little kingdom.” I don’t want that.</p><p><strong><em>TC:</em></strong> I think about this kind of thing in the context of crazy political debates right now, which sometimes feels pretty regional. Like, should we just have liberal New England be its own place? That’s going to be great for me, but what about the liberals who happen to be living in the heart of the places where I think that their civil rights are being violated? Do we have an obligation to other people to stay with them and help them where they are? Or are all of the techie people, who are just going to leave for decentralized channels, platforms, whatever, then <em>not</em> invested in fixing the mainstream things, whether fixing them with tech or politically pushing to fix whatever those problems are? Or is there an alternative? Is there a way to just fix the things that people already know how to use, or do we have to teach them how to use different things?</p><h4>Should we just improve centralized networks instead?</h4><p><strong><em>NL:</em></strong> That is the tack that a lot of people are taking. I have a lot of respect for Tim Wu who wrote “The Master Switch” and “The Attention Merchants,” which are my two favorite books about recent tech trends, and he says Facebook should be nationalized. He says this is like 100 years ago when there were independent water companies and independent telephone companies and eventually they got too big and they became natural monopolies because of network effects. When something is a natural monopoly and it’s unshakable, there is no chance that a competitor is going to come in and replace it, and if it’s abusing its monopoly powers, then what can you do except nationalize it or heavily regulate it? That’s an argument that a lot of people have been making, him and I think Zeynep Tufekci who had a really interesting Ted Talk you might have seen called “<a href="https://www.ted.com/talks/zeynep_tufekci_we_re_building_a_dystopia_just_to_make_people_click_on_ads?language=en">We’re Building a Dystopia Just to Make People Click on Ads</a>.” Do you know this one?</p><p><strong><em>TC:</em></strong> No.</p><p><strong><em>NL:</em></strong> It’s a great Ted Talk. She’s a really interesting thinker. That’s their perspective. Their perspective is not, “Hey, let’s build something new off in the corner that’s decentralized.” Their perspective is, “Okay, fine, just take these centralized things and fix them through government regulation.” There’s a good argument to made for that. Maybe we’re just on the wrong path, you know?</p><p><strong><em>TC:</em></strong> Well we also have a government that doesn’t necessarily do things, or do things that all of us agree are the things that should be done. I could imagine some things where there’d be a conflict between freedom of speech versus whatever else, whatever other issue you’re looking at. I can envision having a lot of battles there and not being able to get a government to decide what should be regulated.</p><p><strong><em>NL:</em></strong> Yeah, and that’s already happening with the sex worker issue for instance. If you look at that, there’s a national law making it illegal to do something that’s legal in Nevada. Or we have the same thing; I live in Washington state and weed is totally legal — you know, it’s 4/20 today — totally legal, except not actually legal because it’s illegal at the federal level. I can take a flight from Seattle to Boulder, Colorado, from one place where weed is fully legal to another place where weed is fully legal, and it would be illegal for me to carry weed on my person because flight is governed by a federal agency.</p><p>Yeah, and maybe the true decentralization nerds would say that the solution to your New England problem is just full decentralization. You know, if Phoenix, Arizona, is more liberal than surrounding Phoenix, or Austin, Texas, they should just be their own little city states, like we go back to like 16th century Italy and everything is just city states.</p><p><strong><em>TC:</em></strong> So anyone who doesn’t have enough money to move to a place that supports their values is screwed.</p><p><strong><em>NL:</em></strong> Yeah. Excellent point.</p><p><strong><em>TC:</em></strong> I mean, that’s the thing.</p><p><strong><em>NL:</em></strong> Yeah, that’s a really interesting point.</p><h4>Decentralization is inherently political</h4><p><strong><em>NL:</em></strong> This stuff is kind of inherently political, which is another reason it’s hard to talk about, you know?</p><p><strong><em>TC:</em></strong> Yep.</p><p><strong><em>NL: </em>You’re making a political statement when you talk about decentralized systems, whereas you’re not necessarily making a political statement when you talk about Offline First.</strong> You could just keep it in the little domain of, hey, it’s user friendly, or for slow cell networks in West Africa or whatever. Zero politics involved.</p><p><strong><em>TC:</em></strong> Someone at the last Offline Camp was talking about blockchain or decentralized things, talking about <em>nation states</em>. I think that’s what they were talking about. I’m like, really? We’re talking about bucking <em>nation states</em>. It just sounds very adversarial, not the usual “Let’s help everyone. Let’s make everyone have a great user experience.” It just feels like you have to get on board with hating the status quo to support it, you know what I mean? Depending on who’s presenting it.</p><p><strong><em>NL:</em></strong> You’re right, there’s a lot of techno utopianism in there, of people who are like, “Hey, I figured out the perfect model for all human interaction in the world and I want to apply it everywhere.” Which makes it even more hazy and intangible. And maybe that’s another problem, actually, is that people are just abandoning the status quo, you know? A common reaction among a lot of tech enthusiasts is to say, “<strong>Whatever the status quo is, let’s just disrupt it</strong> and whatever, it’s old, it’s crufty, <strong>it doesn’t function well, so throw it away</strong>. Throw away government, throw away nation states, throw away Facebook, throw away Twitter, you know, throw away Google. They’re too powerful. They’re too big. They don’t operate the way we want them to. <strong>So we’re going to build our brand new thing. We’re going to take our ball and play over here.</strong>” Right? Instead of actually trying to understand the existing systems, fix them. I mean there’s a reasonable argument you could make that that is not really a reasonable strategy and that you have to work within the existing system, and it’s boring and it’s cumbersome and it’s tedious, but that’s how you make real change. I could totally get behind that argument, but again, that goes back to this question of whether you fix the existing system or you take your ball and play somewhere else.</p><p><strong><em>TC:</em></strong> Right.</p><p><strong><em>NL:</em></strong> I honestly don’t know.</p><p><strong><em>TC:</em></strong> Yeah.</p><h4>Messaging of Offline First versus decentralized networks</h4><p><strong><em>NL: </em></strong>Why do you think it is? You’ve been in this space longer than I have. Why do you think it is that we started this Offline Camp concept around Offline First and suddenly all the decentralized nerds and the blockchain nerds and the federation nerds and the decentralized social media nerds showed up? How did that happen?</p><p><strong><em>TC:</em></strong> I don’t know, because I don’t think it’s particularly highlighted on the website. I would have to go back and look at the language, but I don’t think we’re calling it out, and we’re certainly not intending it for it to be <em>mostly</em> that way. I haven’t, when I’ve been looking at applicants, thinking it should be mostly that way. I think of it as being one aspect of, or one way to think about, Offline First, and we also have our CouchDB / PouchDB people and whoever else that come, or our really socially motivated folks, our healthcare people or whoever. So I was really kind of taken aback when in that discussion — I think it was in Berlin that we were talking about Offline First as a social movement — I started hearing people say the goal of the Offline First movement is decentralization. And I was thinking, hang on, I didn’t know I was signing up for that, because I can’t even explain to you what it is, and it sounds very antagonistic the way some of you are describing it. So <strong>I don’t think it’s a message you can get everyone behind as it’s phrased right now</strong>.</p><h4>Friction with current business models</h4><p><strong><em>NL:</em></strong> Well, yeah, it’s an inherently political message. And it’s also an inherently opinionated business model message. Maybe that’s where it comes from, actually.</p><p>I can remember there was <a href="https://github.com/offlinefirst/research/issues/14">a post on the Offline First GitHub</a>… about how Offline First is an opinionated business model, because if you’re a company that’s monetizing your users through access to your services, your services are provided through the cloud. Well, arguably your incentive is to have people round trip through the cloud as much as possible so you can make sure that you’re properly monetizing and properly understanding people’s usages and charging appropriately for it. Or if your business model is advertising-based, again, you want people to keep round tripping through your cloud, so that you can track them and you can do something with that data, you know, build an advertising profile. And those are opinionated business models.</p><p>But then with Offline First you’re saying, well we’re going to try to limit our exposure to the cloud as much as possible. We’re going to try to limit the number of round trips we’re making to the cloud. And when you talk about that, as soon as you veer from the UX benefits, you start getting into this territory where you’re kind of talking about the business model and you’re talking whether your boss really wants your users to be out there using an offline app that is locked, let’s say, and never coming back to the cloud. It just downloads the app once and just stays forever. I don’t know if my boss wants me to build an app that does that. That’s where it gets fuzzy.</p><p><strong><em>TC:</em></strong> If somebody asked me about the business benefit of Offline First I would say it’s performance, that we’re going to pick your app over somebody else’s because it’s faster or because it works for them in more circumstances. They’re going to use it more because they have access to it more. And <strong>I don’t understand why a business would support decentralized solutions</strong>. I may be missing something. But we need more business support, more financial support than we have to keep the Offline First community going, and if we message it as decentralization, do we lose the companies that care about CouchDB, for example?</p><p><strong><em>NL: </em></strong>Yeah, I think you’re actually right. <strong>I think Offline First has some friction with the business model.</strong> I mean, there are solutions to this, like if you’re not round tripping to the cloud so much, you can still track people just as much as you did before, still monetize just as much as before, just store the data locally and then send it up to the cloud in batches when you’re online. There’s friction, but it’s solvable. So Offline First has friction with the business model.</p><p><strong>I think decentralization is a completely hostile model and even antagonistic as you said. And to some people that’s a benefit, you know, because they want to just take their ball somewhere else. They want to just tear down the status quo, tear down all the companies that have accumulated power, and they want that power to be dispersed as widely as possible, and that is inherently hostile.</strong></p><p>You are not going to get a company with a centralized business model to sponsor that when you frame it that way, you know, so that’s a good point. So I think from the perspective of Offline Camp, you probably want to keep it focused on offline as much as you can and not focus on the decentralization stuff, if for no other reason than how you’re going to pay for this thing.</p><h4>Takeaways</h4><p><strong><em>NL: </em></strong>I think my takeaway is that <strong>Offline First has a clear benefit to the user that can be clearly articulated. Decentralization does not. Decentralization has a philosophical, intangible benefit, which is really hard to sell to anyone</strong>: developers, users, whatever. And so if that movement wants to make any progress, they’ve gotta crack that nut. I don’t think that anyone has really successfully done that yet. I think you, if I read you correctly, are not terribly compelled by these decentralized options, you aren’t chomping at the bit to go off and use Scuttlebutt or Mastodon. And I can’t blame you. But what is the value proposition?</p><p><strong><em>TC:</em></strong> If it sounded super easy to try them, I might go and try them and see if I…</p><p><strong><em>NL: </em></strong>Try before you buy.</p><p><strong><em>TC: </em></strong>There are plenty of things I’m using now that I wasn’t even two years ago, and now I get it. Now I understand why these things exist.</p><p><strong><em>NL:</em></strong> But, anyway, it goes back to my point. <strong>We just need better onboarding.</strong> We need free samples. You go to the 31 Flavors and you get a free sample of the ice cream We need an easier way to do that without having to run something on the command line.</p><p><strong><em>Author’s Note:</em></strong><em> At the time of our conversation in April of 2018, Nolan was working at Microsoft and I was at IBM. Nolan has since moved to Salesforce, and I recently joined Protocol Labs, where I’m working to make decentralization feel more accessible.</em></p><p><strong><em>Editor’s Note:</em></strong><em> The next Offline Camp will take place August 2–5, 2019 in Grants Pass, Oregon. Learn more in our </em><a href="https://medium.com/offline-camp/announcing-offline-camp-v5-eb9111fdcc94"><em>announcement post</em></a><em> or head straight to the </em><a href="http://offlinefirst.org/camp"><em>website</em></a><em> to apply. Can’t make it? </em><a href="https://offlinecamp.typeform.com/to/V8aSWJ"><em>Sign up for updates</em></a><em> and cast your vote on where we should host future editions of Offline Camp.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75b15b8bc230" width="1" height="1" alt=""><hr><p><a href="https://medium.com/offline-camp/decentralization-is-not-enough-75b15b8bc230">Decentralization is Not Enough</a> was originally published in <a href="https://medium.com/offline-camp">Offline Camp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making Your App Awesome When the Network Isn’t (Part 2)]]></title>
            <link>https://medium.com/codait/making-your-app-awesome-when-the-network-isnt-part-2-669ee36e2f81?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/669ee36e2f81</guid>
            <category><![CDATA[service-worker]]></category>
            <category><![CDATA[progressive-web-app]]></category>
            <category><![CDATA[offline-first]]></category>
            <category><![CDATA[pwa]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Tue, 13 Mar 2018 09:01:01 GMT</pubDate>
            <atom:updated>2018-05-18T21:52:22.031Z</atom:updated>
            <content:encoded><![CDATA[<h4>A beginner’s guide to ensuring quick page loads — offline or not — with service workers</h4><p>As I shared in the <a href="https://medium.com/ibm-watson-data-lab/making-your-app-awesome-when-the-network-isnt-part-1-3ed530c2523">first article</a> of this beginner-friendly series, the <a href="http://offlinefirst.org/">Offline First</a> development approach plans for the most constrained network environment first, enabling a great user experience even while a device is offline or has only an intermittent connection, and providing progressive enhancement as network conditions improve. Even if your app isn’t specifically intended to be useful offline, the speed and performance delivered by an Offline First design pattern can greatly improve user satisfaction.</p><p>Through the example of the <a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager">offline-capable project management tool</a> I built to manage the editorial workflow for the <a href="https://medium.com/offline-camp">Offline Camp Medium publication,</a> we saw there <a href="https://medium.com/ibm-watson-data-lab/making-your-app-awesome-when-the-network-isnt-part-1-3ed530c2523">how to enable offline data storage, sync, and sharing with PouchDB and Apache CouchDB™</a>. Keeping our data local, though, isn’t enough to make it useful to us while we’re offline. The user interface for our web app, which allows us to access that data, needs to be available offline as well. An Offline First approach requires caching the HTML, JavaScript, CSS, images, and other resources that are most critical to our application’s core functionality. This is where service worker comes in.</p><h4>The typical offline experience</h4><p>If you turned your internet off right now and tried to visit a URL you’d never visited before, you’d have a problem. It would look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*5DQjtnZn5iBIeSLUwfzFRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*O644Z7TzDYSgMpy-OcDPBA.png" /><figcaption>What you see in Firefox or Chrome when the internet is turned off.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*f6vaQ1AOJqt_HvVrSeGGOw.png" /></figure><p>If you travel in the right crowds, you might actually be excited to the see Chrome’s Downasaur because you know about the top-secret game hidden in plain sight. (Press the spacebar to start the game and jump over cacti, or the down arrow to duck under pterodactyls.) Most people, though, are just plain frustrated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*pwtKc5DQjZFLmxVvA8IEfA.gif" /><figcaption>Making lemonade out of crappy networks (Source: <a href="https://imgur.com/gallery/3enHeVu">imgur</a>)</figcaption></figure><p>This failure to load is expected behavior for a first page visit, and even the best Offline First application can’t overcome it. The “first” in Offline First means that we’re keeping the offline user experience at the top of our priority list, not that we’re able to make a page work offline on first load.</p><p>Native applications cache vital resources during their installation process. As developers of web apps, we can mimic this process by using a modern web tool called service worker to cache the most critical page resources to a user’s device on their first visit to our page, keeping the core functionality of our app intact during subsequent visits. Yes, we may lose the ability to sync their data to a remote database or show them new articles that were posted since they lost their connection, but we can provide a positive user experience offline and then use progressive enhancement to add more functionality as network conditions improve.</p><p>This notion of progressive enhancement is critical to the design of all Offline First applications, which can range from web apps to native mobile apps, hybrid mobile apps, desktop apps, and Internet of Things apps. Progressive Web Apps — a subset of modern web apps that behave very much like native apps — rely heavily on service workers for both resource caching and push notifications, but here we’ll focus specifically on caching.</p><h4>Introducing service worker</h4><p>A service worker, as explained by the <a href="https://www.w3.org/sw/">W3C working group</a> responsible for developing the spec, is “<strong>a script that your browser runs in the background, separate from a web page, opening the door to features that don’t need a web page or user interaction</strong>.” Since they intercept and handle network requests asynchronously, service workers make heavy use of <a href="https://developers.google.com/web/fundamentals/primers/promises">promises</a>. As members of the larger family of JavaScript <a href="https://www.html5rocks.com/en/tutorials/workers/basics/">web workers</a>, service workers don’t have direct access to the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction">DOM</a> (the Document Object Model, essentially your webpage, as constructed by the interaction of your HTML, CSS, JavaScript, and other files). They do, however, have access to the IndexedDB API, which — as you may remember from my previous article — is used by PouchDB for local storage.</p><p>Current features enabled by service workers include push notifications, background sync, and caching, all of which can help a Progressive Web App behave more like a native app. <a href="https://caniuse.com/#feat=serviceworkers">Support for service workers</a> is not yet universal, though. Chrome has a huge jump on other browsers who’ve joined the service worker bandwagon more recently. That means their developer advocacy team is a great source of <a href="https://developers.google.com/web/fundamentals/primers/service-workers/">documentation on service workers</a> as applied to PWAs. The <a href="https://www.w3.org/sw/">World Wide Web Consortium</a> (W3C), which is responsible for the development of the service workers that browsers then incorporate, also offers a nice <a href="https://github.com/w3c/ServiceWorker/blob/master/explainer.md">explainer</a>.</p><h3>The service worker lifecycle</h3><p>Service workers have their own lifecycle that’s totally separate from your web page. It goes something like this:</p><ul><li><strong>register</strong></li><li><strong>install </strong>(defining what to cache)</li><li><strong>activate</strong></li><li><strong>be incredible </strong>(though also incredibly frustrating to debug)</li></ul><h4>Registering the service worker</h4><p>Registering the service worker is the easiest step.</p><p>Like other JavaScript files, our sw.js file has to be specifically called out in a script tag in our index.html file in order to be put to use. After we load the other scripts we need (PouchDB, jQuery, and our own credentials.js and project-manager.js), we first need to check to see whether the browser we’re using supports the service worker API. (If it does, there will be a serviceWorker property present in navigator, a property of window which represents the browser.) If so, we can go ahead and register the service worker we’re about to create (our sw.js file) and leave ourselves a note in the console for debugging purposes. Note that the sw.js file lives at the top level of our project so that it will have access to fetch events for everything in our domain.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b71596ccba5f884d1bd3f2e4ed06742e/href">https://medium.com/media/b71596ccba5f884d1bd3f2e4ed06742e/href</a></iframe><p>This step is easy, but not very useful without a service worker to register. Before we create our sw.js file, though, we need to give some thought to what resources we need it to cache for us.</p><h4>Deciding what to cache</h4><p>As developers and UX professionals, we’re responsible for determining an acceptable amount of core functionality and data that will be accessible offline to our users (a minimum viable product, if you will), which we’ll then enhance with any extra goodies that can be added when a network connection is available. This is a delicate balancing game, though. In general, the more data and logic we can store on a user’s device instead of on a remote server, the more they can enjoy their experience when they’re disconnected or operating on a spotty connection. However, as we make more resources available locally, we’re tapping into the device’s storage space, computing power, and battery life. We have a responsibility to conserve resources as we decide what resources to cache.</p><p>For a news website, for example, you can imagine that it might be suitable to cache only the latest set of articles (or a set based on the reader’s interests) for offline access, versus all historical content of the publication. Many of the images on such a site might also fall in the nice-to-have category that would be added when a connection was restored. But being able to view a list of recent articles and select one to read is core functionality for that application, and needs to be supported offline.</p><p>In my own case, the main purpose of the app I’ve built is to allow an editor to keep track of the status of an article as it goes through the editorial process, and to see a list of all of the articles in the works. This happens through a main display of all articles and a form used to create and update records. So my first step in setting up caching is to determine which of my files are needed to make these features accessible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*qyD-wqjHJfqstYAj5UcV2Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*HopumEuui09iZL0XeUyZ-w.png" /><figcaption>Screenshots of the complete article list and the form used to update records.</figcaption></figure><p>Because my project is simpler than many Progressive Web Apps would be, I actually don’t have a lot to cut back on as I establish this list of files needed while offline. I need my HTML, CSS, and JavaScript files (including PouchDB) to keep the page functioning, and I need a thumbnail image and a web app manifest to let my browser know how to treat my app. In the installation step, I can tell my service worker to cache these resources on my user’s device for quick loading and offline use.</p><h4><strong>Installing the service worker</strong></h4><p>We first need to add an install event listener to the service worker (this sw.js file, thus the self in the snippet below). We then open a cache called blog-tracker using the method caches.open(), which either finds an existing cache by that name or creates a new one if none is found. Once the cache is open, we return cache.addAll(), passing in an array of file names to add to the cache.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ba95d34d05e2869b42e3d0d815a430b/href">https://medium.com/media/0ba95d34d05e2869b42e3d0d815a430b/href</a></iframe><p>Note that we’re using promises here. waitUntil() ensures a full block of code executes before the next step and catch() deals with an error if the code within then() won’t execute. If any of the files listed here fails to load, the service worker won’t be installed. The install event happens only once, and a service worker can’t start handling network events for us until it finishes installing and becomes “active.” We also won’t see the effects of the service worker until we refresh our index.html page.</p><p>In the Cache Storage pane, we can see that the cache named blog-tracker contains all the files we asked the service worker to cache.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*nUjzaAdoRqU0t7v55f8QPw.png" /><figcaption>Cached files shown in Chrome Dev Tools.</figcaption></figure><h4><strong>Activating the service worker</strong></h4><p>Once your service worker is controlling the page and ready to handle events, it will automatically activate. You don’t need to implement any code to make the service worker’s activate event happen, but you can listen for it if you’d like to log a note to the console or make it trigger another function, such as making some updates to the cache (as described shortly). In my case, I never needed such code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*blaEhIYGa_PY-uclqzfKgQ.png" /><figcaption>Logging a note to the console on activation of the service worker. (Source: <a href="https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle">The Service Worker Lifecycle</a>)</figcaption></figure><p>In Chrome dev tools, within the Service Workers pane of the Application tab, we can now see that our service worker is registered and activated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*739ZnHyB2dGy-4XGchMBJA.png" /><figcaption>The Service Workers panel of the Application tab in Chrome Dev Tools.</figcaption></figure><h4><strong>Intercepting network requests</strong></h4><p>So our service worker is active and knows what to cache. But how do we use it to return those cached resources?</p><p>The Fetch API handles network requests for all of the resources in our application, but we can choose to hijack some of those network requests and use our service worker to respond to them. Back in our sw.js file, we can listen for fetch events within our service worker’s scope. When a fetch request comes in, we pass into event.respondWith()a promise from caches.match(), which attempts to find the requested resource in our cache. If it succeeds, it returns the matching cached resource. If it fails, it looks to the network for the resource, which will only work if there’s a connection.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe5aebb736de11bb0ac43a8eb56fd5f0/href">https://medium.com/media/fe5aebb736de11bb0ac43a8eb56fd5f0/href</a></iframe><p>In my case, all of my files are being cached, and none of them are changing, so I should never need the network fallback. However, if you have a more complex application, you’ll likely want more complex code here.</p><p>One thing to watch out for is a situation in which page resources (not the data we’re storing in PouchDB and CouchDB, but the images, HTML, CSS, JavaScript and such that appear on the page) are actually changing over time, as might happen in a news app or social feed. In that case you might need to update your cache as you go. You can find an explanation of that process <a href="https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle">in this primer on the service worker lifecycle</a> or in the hands-on, <a href="https://www.udacity.com/course/offline-web-applications--ud899">free Udacity course</a> on Offline Web Applications, put together by the team at Google. (Note that that course uses IndexedDB directly, not PouchDB, for local storage.)</p><h4>Offline First, not offline fallback</h4><p>Remember, for an Offline First approach, it’s important that we always try to access cached resources <em>first</em>, using the network as a fallback, never vice versa. Why? If we first try the network and then the cache, we can actually provide a reasonably good experience both in good connectivity and offline. However, when connectivity is poor, we get stalled out waiting for the network to admit failure, and neither the network resource nor the cached resource is ever returned. This horrifically frustrating state, known as LieFi, is what you’re experiencing in those moments in which you swear at your phone and then ironically turn the WiFi <em>off</em> in order to force a page to load.</p><p>The Offline First approach, on the other hand, provides an incredibly fast user experience regardless of network conditions, because there’s always something to be loaded immediately, even if we’re hoping to replace it with a more updated version from the network. As we also saw when using PouchDB and CouchDB, serving data and resources locally <em>first</em> makes our app performant (speedy) regardless of our level of connectivity. Offline First isn’t a specialized approach for low bandwidth scenarios. It’s just a great design pattern.</p><h4>Testing Offline First functionality</h4><p>As mentioned in my previous article, the dev tools in both Chrome and Firefox offer ways to simulate being offline, so you can test offline functionality from your browser without disconnecting your whole computer from the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*LpazwZ_QbB8K4XMEVm0udA.png" /><figcaption>You can simulate offline status from the Application panel in Chrome dev tools…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*NWBJGlTLZBz-Sqou5EARIA.png" /><figcaption>…or from the Network panel in Chrome dev tools…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*8ceAUz4aVlftSfXSLgbD3w.png" /><figcaption>…or from the Developer panel in Firefox</figcaption></figure><p>In fact, if you’ve built an app that syncs data between users, this is a great way to test what happens if one user goes offline. Just pretend Chrome is one user and Firefox is another.</p><h4>Debugging with service workers</h4><p>As you’re building a Progressive Web App, you may notice that changes to your code seem to have no effect on your project. As it turns out, service worker is so awesome at caching that it can trap your project in its current state. If you change an image file in your project, for example, and don’t stop your service worker, you might be looking at that old image forever. In fact, if you test a totally new project on the same port you tested the last one on, your service workers can even carry over from project to project. They’re sticky little buggers, but there are ways to get unstuck.</p><p>I learned very quickly that doing a standard browser refresh won’t cut it. Even without service workers installed, many modern browsers cache page resources to make your browsing experience better. As a developer, you’ll need to learn to do a hard refresh to clear the cache. (The <a href="https://www.getfilecloud.com/blog/2015/03/tech-tip-how-to-do-hard-refresh-in-browsers/#.Wp2T8JPwZTY">commands used to force a hard refresh</a> depend on your browser and operating system.) Even a hard refresh, though, in my own experience, can’t overcome a determined service worker.</p><p>For your own testing only, it can help to check the “Update on reload” box in the Application tab of your Chrome developer tools, which will force the browser to look for a new version of service worker (and the new set of files you used it to cache) each time you reload the page. Just remember that this is not what your user’s experience will be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*ICowQ7GZv8f9xpkQyDjPMg.png" /><figcaption>Chrome developer tools can force service worker to update on reload.</figcaption></figure><p>For more detailed tips on debugging apps with service workers, I recommend reading up on both <a href="https://developers.google.com/web/tools/chrome-devtools/progressive-web-apps">Chrome DevTools</a> and <a href="https://developer.mozilla.org/en-US/docs/Tools/about:debugging">Firefox DevTools</a>. The team at Google even offers a whole <a href="https://developers.google.com/web/fundamentals/codelabs/debugging-service-workers/">code lab on debugging service workers</a>. Most of the tools you need for debugging are right in the Service Worker pane in the Application panel in the Chrome DevTools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/0*4kPYwNraHNgCWNL0.png" /><figcaption>The Service Worker pane in the Application panel in Chrome DevTools (Image Source: <a href="https://developers.google.com/web/tools/chrome-devtools/progressive-web-apps">Google</a>)</figcaption></figure><h4>Summary &amp; Resources</h4><p>As we’ve seen, an Offline First approach to web development not only makes pages available offline, but also makes them load exceptionally quickly on a great network connection. Service worker makes it possible to cache the page resources you need to make this happen.</p><p>Remember, though, that you need a different solution to make your application’s data accessible offline, as we did with PouchDB in the <a href="https://medium.com/ibm-watson-data-lab/making-your-app-awesome-when-the-network-isnt-part-1-3ed530c2523">previous article</a> of this series.</p><p>There are some <a href="https://medium.com/offline-camp/rethinking-offline-first-sync-for-service-workers-da4727b6dee">nuances of how Service Worker and PouchDB work together</a> that are beyond my pay grade. Check out the <a href="https://medium.com/offline-camp/progressive-web-apps-service-workers/home">collection of articles</a> on Service Worker and PWAs to learn more.</p><p>And of course, don’t forget that service workers are capable of much more than the caching we’ve seen here. <a href="https://developers.google.com/web/fundamentals/codelabs/push-notifications/">Push notifications</a> are another awesome feature you might want to explore.</p><p>By using service worker for caching and PouchDB and CouchDB for data storage and sync, we’ve established the essentials that make our app work offline. It’s a web app with progressive enhancement, but it’s not technically a Progressive Web App yet. For the icing on the cake, we can earn that title by making it installable to the homescreen without the hassle of an app store. A <a href="https://developers.google.com/web/fundamentals/web-app-manifest//">web app manifest</a> can make that possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=669ee36e2f81" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codait/making-your-app-awesome-when-the-network-isnt-part-2-669ee36e2f81">Making Your App Awesome When the Network Isn’t (Part 2)</a> was originally published in <a href="https://medium.com/codait">Center for Open Source Data and AI Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making Your App Awesome When the Network Isn’t (Part 1)]]></title>
            <link>https://medium.com/codait/making-your-app-awesome-when-the-network-isnt-part-1-3ed530c2523?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ed530c2523</guid>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Thu, 08 Mar 2018 10:01:01 GMT</pubDate>
            <atom:updated>2018-05-18T21:46:22.787Z</atom:updated>
            <content:encoded><![CDATA[<h4>A beginner’s guide to offline data storage and sync with PouchDB &amp; Apache CouchDB™</h4><p>Let’s get real. Networks are flaky, and that awesome web app you just built likely isn’t so impressive when you lose your connection. With an <a href="http://offlinefirst.org/">Offline First</a> mindset and some simple client-side code, you can upgrade your masterpiece and deliver amazing user experiences in all network conditions. It’s easier than you might expect.</p><h4><em>About this tutorial series</em></h4><p><em>In this 2-part, beginner-friendly tutorial series, I’ll walk you through the steps I took to build my first offline-capable Progressive Web App using only client-side code:</em></p><ol><li><em>Enabling offline data storage, sync, and sharing with PouchDB and Apache CouchDB™</em></li><li><a href="https://medium.com/ibm-watson-data-lab/making-your-app-awesome-when-the-network-isnt-part-2-669ee36e2f81"><em>Ensuring quick page loads — offline or not — with a service worker</em></a></li></ol><p><em>You can explore the code on </em><a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager"><em>GitHub</em></a><em>, where you’ll find instructions for running the app yourself if you’d like, or feel free to stick to the basics right here.</em></p><h3>My introduction to Offline First</h3><p>As a meeting-planner-turned-web-developer, one of my favorite roles here on the Developer Advocacy team at IBM Watson and Cloud Platform is my organizing work with the Offline First community. Even before I took up front-end coding, I had the privilege of co-organizing <a href="http://offlinefirst.org/camp">Offline Camp</a>, a retreat-style unconference where I’ve participated in some fascinating discussions about how web developers, UX professionals, and business leaders can democratize access to all the riches of the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*_BFlG3JKmnxyjqUM8nwR0w.png" /><figcaption>An Offline Camp discussion about — you guessed it! — CouchDB &amp; PouchDB for PWAs (Image credit: <a href="https://medium.com/u/4f7002092ec">Teri Chadbourne</a>)</figcaption></figure><p>From healthcare solutions in the developing world to entertainment for the daily commute, the <a href="http://offlinefirst.org/">Offline First</a> approach to web development is transforming user experience by planning for the most constrained network environment first, keeping apps running even while offline and providing progressive enhancement as network conditions improve. Conversations at Offline Camp run the gamut from inspirational use cases to the technical nitty-gritty of particular solutions, but there’s a common thread: it’s time to stop treating shoddy connections as an error condition and start building with real-world network constraints in mind.</p><h3>Building my own Offline First project management tool</h3><p>After each edition of Offline Camp, we encourage campers to write up summaries of our unconference sessions for our <a href="http://medium.com/offline-camp">Medium publication</a>. Originally, our editorial team used Trello to track the status of blog posts in the works, but there was a lot of manual work involved to fill the gaps where the tool didn’t quite meet our needs. As part of a class assignment for a JavaScript course last fall, I decided to take a stab at building my own offline-capable project management tool that would be better customized for the needs of our editorial process. As someone who’s only familiar with front-end development, I of course built this in the form of a web app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ixcRFdLjmmAPwvq2B33InA.png" /><figcaption>The homepage of my project management tool, showing all current entries.</figcaption></figure><p>Using a simple web form, which uses logic to hide and reveal certain questions depending on the data entered, my app stores a record for each article in progress and lets me come back and edit that record later. It also creates a second webpage I can share with an author to provide resources they need and request resources I need in return.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_qymKMh7LT9Uy3xJIpTUQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r5NAX6MnAwLI015ReaTeIw.png" /><figcaption>The data entered by the editor in the web form affects what’s displayed on the author’s page.</figcaption></figure><p>Because I need to start this process while I’m on site at Offline Camp with limited internet access, the app needs to load while offline and allow me to edit and save data without an internet connection as I assign authors to posts. Since I collaborate with other editors and own many gadgets, the data ultimately needs to sync across multiple devices, browsers, and users. It requires an Offline First design.</p><p>In this article, I’ll walk you through how I implemented offline data storage, syncing, and sharing using PouchDB and CouchDB. In the next post, I’ll address the challenge of keeping the page loaded with a service worker.</p><p>I’ll include the most relevant bits of code here on Medium, but you can also explore my code, as well as clone and run the app yourself from my <a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager">GitHub repo</a>.</p><h3>Enabling offline data storage, sync, and sharing</h3><p>Like every useful web form, our project management tool needs a place to store the data it collects. If we store that data exclusively in a remote cloud database, it will only be accessible when we have a network connection. If we store it only locally on the device, we can’t have multiple users or access our data across multiple devices. In order to create a shared tool that works offline, we need to combine both a local and a remote database and keep them synced to whatever extent our connection allows. This process becomes pretty easy when using tools built for the job: PouchDB and Apache CouchDB™.</p><h3>Creating a local PouchDB database</h3><p>For client-side storage, I’ve chosen to use <a href="https://pouchdb.com/">PouchDB</a>, an in-browser database inspired by Apache CouchDB™. As PouchDB works across multiple browsers, it checks to see what kind of local storage is supported by each browser and adapts accordingly, using IndexedDB where it’s supported, or an older solution such as localStorage where needed. PouchDB is open source, and JavaScript is the only language you need to know to make it work. It’s important to note that PouchDB’s API is asynchronous, so you’ll use <a href="https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html">promises</a> (or callbacks) to catch and deal with any potential errors without slowing down the user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*j0OY76zK5ydzPgu_PXJyaQ.png" /><figcaption>Since my browser supports it, PouchDB has automatically selected the IndexedDB adapter.</figcaption></figure><p>We run PouchDB by including a provided JavaScript file for the project and referencing a script tag in our HTML, just as we would use a library like jQuery.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec1105fb0b83086bf56cf79a938eaa2b/href">https://medium.com/media/ec1105fb0b83086bf56cf79a938eaa2b/href</a></iframe><p>Creating a local database is easy. In our main JavaScript file, we simply call new PouchDB and give the new database a name. This database lives in the browser on our local device.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/534cdbc4f6978d0df5a18c908c98a82a/href">https://medium.com/media/534cdbc4f6978d0df5a18c908c98a82a/href</a></iframe><p>If I were going to use my app from the same browser at all times and no one else needed to access my data, I could probably skate by with only using PouchDB for storage. But I’d be missing out on <a href="https://blog.couchdb.org/2017/04/04/pouchdb-couchdb-an-interview-with-nolan-lawson/">the real superpower of PouchDB and CouchDB: sync</a>.</p><h3>Creating a remote CouchDB database</h3><p>Because I work with other editors who also need to know the status of the articles in progress, it’s important that we share data about our project in a place where it’s accessible to everyone. Enter CouchDB.</p><p><a href="http://couchdb.apache.org/">Apache CouchDB™</a> is an open source NoSQL database that stores documents in JSON format. Its unique replication protocol, which is shared by PouchDB, is particularly well suited to creating offline-capable mobile applications. In fact, its approach to offline sync is one of the key features that sets it apart from fellow NoSQL document stores such as MongoDB.</p><p>In my case, since I don’t yet know how to host a CouchDB database by myself, I chose to use IBM Cloudant, which is a fully-managed database-as-a-service based on CouchDB. <em>(Disclaimer: I work for IBM.)</em> If you have the dev ops skills, you could just as easily use the open source CouchDB directly. (For more on how to set up your remote database — including enabling CORS — see the <a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager#running-the-app">setup instructions</a> in my project repo.)</p><p>In a credentials.js file I wrote a single line of code defining the URL used to access my remote CouchDB database:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/770f2be5cd6bf8ceb8fd4a73d4ed253e/href">https://medium.com/media/770f2be5cd6bf8ceb8fd4a73d4ed253e/href</a></iframe><p>Note that when loading JavaScript files from our HTML, it’s important to load the credential.js file, where this variable is created, before the project-manager.js file, where it’s used.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/480394064635fe85d7eaafa0a5ede86d/href">https://medium.com/media/480394064635fe85d7eaafa0a5ede86d/href</a></iframe><h3>Syncing data between local and remote databases</h3><p>With both the local PouchDB database (db) and the remote CouchDB database (remoteCouch) defined, it’s time to make them talk to each other.</p><p>When the page is first loaded, we check whether the remoteCouch variable is defined.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c8d1c7f109aa296d52e070a83a7fa53f/href">https://medium.com/media/c8d1c7f109aa296d52e070a83a7fa53f/href</a></iframe><p>If so, we run the sync() function to initialize a continuous sync between PouchDB and CouchDB.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f9d2606af65017e41ab86bb03fe2f0d/href">https://medium.com/media/6f9d2606af65017e41ab86bb03fe2f0d/href</a></iframe><p>The end of this function is where the syncing magic happens. Calling the sync function on my PouchDB database (db), we pass in three parameters:</p><ul><li>remoteCouch is the remote CouchDB database I want to sync to, established earlier.</li><li>opts represents the options set in the previous line, where I used {live: true} to tell PouchDB to sync continuously rather than on demand. Best practice would be to also use {retry: true}, which will force the function to run again in case of a connection error that stops replication.</li><li>syncError() is a function that will run if there is an error in the sync process (more on this shortly).</li></ul><p>This code also sets a change listener, which will be triggered when any data changes in our local PouchDB database. (Because we set up continuous syncing, listening for changes in PouchDB should pick up all changes, whether they’re made locally or replicated in from CouchDB.) When the data changes, the function updateArticles() is run to refresh the user interface, displaying an updated list of articles. (More on this to come.)</p><p>As far as syncing goes, that’s the extent of our code. Easy peasy!</p><p>If you’ve used CouchDB or Cloudant before but not PouchDB, it may appear that we’ve missed an important step in the process: making AJAX calls to the remote database to get, put, and all that jazz. One of the many joys of PouchDB is that it keeps us from having to learn anything about API calls. That PouchDB script I included is handling all of that in the background.</p><h3>Alerting the user to sync status</h3><p>A key tenet of the Offline First approach is that we never treat a lack of network connection as an error condition. Instead, it’s an expected state that we may or may not need to flag to our users, depending on the circumstances.</p><p>In the case of this tool, the user is able to keep working — including writing and editing data — while offline. What they lose the ability to do is push their edits to the shared CouchDB database or see edits made there by others since they went offline. So a simple heads up should suffice, letting the user know that their data is safe on the device but not currently syncing to the cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*zZvrn0dvaUyt51kFH8q4ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*U1uEj4hmqePzaAosYfI_Uw.png" /></figure><p>To accomplish this, I built a div into my HTML whose color and message change based on whether PouchDB is successfully syncing to CouchDB.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0592e67710f1f05ffe80db883dad8a95/href">https://medium.com/media/0592e67710f1f05ffe80db883dad8a95/href</a></iframe><p>It turns green when sync is successful, powered by the sync() function we’ve already seen. The syncError() function, which is called by PouchDB when the sync function fails, uses jQuery to make this indicator turn red:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/17f0db3b98e6fdfe479e28601e171bc5/href">https://medium.com/media/17f0db3b98e6fdfe479e28601e171bc5/href</a></iframe><h3>Writing data to PouchDB</h3><p>All of that syncing magic would admittedly be more impressive if we had some data to sync. The PouchDB website offers a nice <a href="https://pouchdb.com/guides/">introductory guide</a> to getting data into and out of the local database, but I’ll walk you through the code in my own application to introduce you to the concepts. (If the extra code in my application confuses you, go check out that guide for a simpler example.)</p><p>Whenever we use a web form, we need a way to save the data entered there for future use. Unlike a model where we might need to send data away to a remote server for processing, here we simply need to save all of the data as a document in PouchDB. (If you’ve ever used IndexedDB or localStorage, you’ve done something similar.)</p><h4><strong>Creating a JSON document</strong></h4><p>As a NoSQL database, PouchDB (like CouchDB) stores unstructured <em>documents</em> as opposed to specifying a schema with rows, tables, and such. You’ll often hear the phrase <em>document store</em> used to describe an unstructured NoSQL database.</p><p>Since data transmitted between a browser and a server has to take the form of text, the document is stored as JSON (JavaScript Object Notation). JSON is a text format that uses the syntax of a JavaScript object, although it can actually be read by any programming language. Like a JavaScript object, a JSON document consists of a collection of name/value pairs, although it notably can’t contain methods. It can contain other objects or arrays if needed, or can even itself be an array of other objects. So these “unstructured” records do have structure — it’s just allowed to vary from document to document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*zb6fKgghTjzvdfqmx57c-w.png" /><figcaption>An adorable JSON sample from the <a href="https://pouchdb.com/guides/documents.html">PouchDB guide</a></figcaption></figure><p>As mentioned earlier, PouchDB will typically use <a href="https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB">IndexedDB</a> (if the browser supports it) to store data. However, as with CouchDB, we don’t need to learn any special syntax for talking to IndexedDB. PouchDB is taking care of all of that for us in the background so we can use a single set of functions to deal with both our local and remote storage. (Since building this app, I’ve used IndexedDB directly for another project, and I missed the simplicity of PouchDB’s API.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1wbMLVpv1FT1044w4ajnGA.png" /><figcaption>The web form used by the editor, from which we save values to PouchDB</figcaption></figure><p>When a user clicks save from an editing screen, I do some necessary form validation and then create a new article object in which I can store the current form values. (I’ve chosen to do this with jQuery, but it could also be done with plain old JavaScript.) Because it makes later steps much easier, I ensure that the names of fields in my object exactly match the names of fields in my form. (My form has a rather overwhelming number of fields, so I’ve simplified the object in this snippet.)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd1e6ee1bf9b73b7f2e4abf663b56b8f/href">https://medium.com/media/cd1e6ee1bf9b73b7f2e4abf663b56b8f/href</a></iframe><p>Most of the name/value pairs in the object are what you might expect: author name, title, true or false status of a completed checkbox, etc. However, there are two special properties that are essential to the PouchDB and CouchDB model: _id and _rev. These two values are critical for helping the database identify the records you’re looking to match when you attempt to access, update, or delete a record.</p><h4><strong>Assigning unique IDs (</strong><strong>_id)</strong></h4><p>Every document in your database must have an _id property which is both unique and unchanging. That means assigning a <em>unique</em> ID when the record is new and keeping that ID <em>consistent</em> when the record is edited.</p><p>There are two options for writing new documents to PouchDB: db.put() and db.post(). With db.put(), you create your own ID and pass it in. With db.post(), you do not pass in an ID, and one is auto-generated on your behalf instead. In his <a href="https://pouchdb.com/2014/06/17/12-pro-tips-for-better-code-with-pouchdb.html">blog post on best practices</a>, <a href="https://medium.com/u/f1dca2e6c62e">Nolan Lawson</a> (a former PouchDB maintainer) recommends always using db.put() for three reasons:</p><ul><li>As we’ll later see, when you retrieve all documents using allDocs(), they come back sorted by ID, so your choice here determines your primary index. It would be a waste to use random values instead of passing in datestamps as IDs so the records can easily be sorted chronologically without necessitating a secondary index.</li><li>You’re going to have to learn the db.put() API to edit or delete records, where you have to pass in the ID to ensure the correct document gets updated. You may as well just learn one API.</li><li>You’re wasting space storing gobbledygook IDs with db.post().</li></ul><p>I’ve followed the advice to use db.put() with a datestamp as my ID, and the navigation scheme of my application makes it so I can use the location.hash in the URL to determine whether I’m dealing with a new or existing record.</p><p>Each time I write the list of existing articles to the page, I include in each a clickable link which contains the existing _id embedded in the URL as a <a href="https://www.oshyn.com/blogs/2011/december/javascript_navigation_using_hash_change____">hash</a>. (The screen for editing a new record contains the hash#new instead.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ag8uWkEXCEvk_YHH_13KFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*he6_iwMrvY7JVK6RbcbduA.png" /><figcaption>The document ID becomes a hash of the URL used to access the editing screen.</figcaption></figure><p>The form used to edit an existing record also includes an info section which stores the _id and _rev for safekeeping in uneditable form fields, along with as a custom link to a page for the author of an article to view, again using the article ID as a hash in its URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*HF9mbUUVBBfMWvjHIxS_mw.png" /><figcaption>When I write the article’s data to the page, I protect the _ID and _REV fields from editing.</figcaption></figure><p>This system allows me to use location.hash to determine whether the record is old or new before saving the current status of the form to PouchDB. In the case of an existing record, the pre-existing ID is used. For a new record, a unique ID is created for the first time using the browser’s ability to check the current date and time and save it as a string using: var ID = new Date().toISOString();</p><h4><strong>Managing revision markers (</strong><strong>_rev)</strong></h4><p>Unlike the unique identifier _id, which must be present and consistent every time a document is written to PouchDB, the revision identifier _rev exists only upon revisions and is created by PouchDB directly. On first write, your document must have no _rev field. When you retrieve the document to edit it, there’s a _rev field created by PouchDB which you must remember and submit with your revision. The next time you access that record, you’ll see that PouchDB has created a new value for _rev.</p><p>Although this process is a bit confusing for a beginner, it’s the key to making sync work. As explained on the <a href="https://pouchdb.com/guides/updating-deleting.html">PouchDB website</a>, the document revision structure used by CouchDB and PouchDB is actually quite similar to Git’s. The revision history, stored as a tree, allows management of conflicts when databases get out of sync. For our purposes, though, all we need to do is capture the new _rev given to us each time we read from PouchDB and write it back in identical format when we update the record.</p><p>Before actually saving the article to PouchDB, our saveArticle() function does extra work to ensure that the _id and _rev fields are present in (or absent from) the article object in exactly the right format:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c7e456893bf3669c1aae6f4eee6578f/href">https://medium.com/media/8c7e456893bf3669c1aae6f4eee6578f/href</a></iframe><p>Once we have those special fields figured out, writing a record to PouchDB is quite easy. After building the article object that contains all the values collected in the form, as well as the proper _id and _rev values, we simply use db.put(article) to save the record. The continuous syncing that we’ve enabled means PouchDB will immediately sync with CouchDB if a network connection is currently established, making the new data immediately available to other users or devices. The change listener will also initiate the updateArticles() function to redraw the article list on the app’s homepage, even if there’s no connection to the remote database.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/75c76a9dbbbafe25167b8ad73d9e1cd2/href">https://medium.com/media/75c76a9dbbbafe25167b8ad73d9e1cd2/href</a></iframe><p>For a closer look at how these pieces of code all work together, check out the full <a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager/blob/master/js/project-manager.js#L666">saveArticle</a>()<a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager/blob/master/js/project-manager.js#L666"> function</a> in my repo. There you’ll see that I’ve also used an unobtrusive “toast” notification to let the user know the record was saved before taking them out of the editing screen and back to the article list, which will include the new or updated record that was just submitted.</p><h3>Retrieving data from PouchDB</h3><p>When it’s time to retrieve data from PouchDB, the way we plan to use the data affects how we can best access it. To display a list of articles, for example, I need to do a batch fetch and loop through the entire database to find the title and author of each article and write them to the DOM, which I’ll do using db.allDocs(). In order to pull up the details of a specific article for editing, however, I need a way to fetch a specific document by referencing its _id. This is accomplished using<strong> </strong>db.get()<strong>.</strong></p><h4><strong>Fetching all documents with </strong><strong>db.allDocs()</strong></h4><p>The command for batch fetching documents from PouchDB looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*nNExx8JSj6LEzlK-XPnchw.png" /><figcaption>Batch fetch with db.allDocs() (Source: <a href="https://pouchdb.com/api.html#batch_fetch">PouchDB API — Batch Fetch</a>)</figcaption></figure><p>By default, multiple documents returned will be indexed and sorted by their _id, deleted documents will be excluded, and the valuable content of the documents themselves (all those details created in our web form) won’t be provided.</p><p>By setting the option include_docs: true, I can ensure that all those details will be delivered as part of a field called doc in the results. Otherwise by default I would get only the _id and _rev properties.</p><p>To sort the documents by most recent first, instead of oldest first, I set descending: true in the options when calling the function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/690fb84aa88d7fcd37ab1fe6e348ad34/href">https://medium.com/media/690fb84aa88d7fcd37ab1fe6e348ad34/href</a></iframe><p>The object returned by the allDocs() function, seen as doc in the snippet above, has a structure that’s a bit confusing to parse. Alongside properties which contain metadata we don’t need (such as the number of documents returned), it includes the property rows, whose value is an array of objects. Each of these objects (row[i]) includes more extra metadata, plus a property doc that’s what we’re actually looking for. So doc.row[i].doc represents one of the articles we saved to the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*z1Xko3Uhw3_HGWyKVKUOAA.png" /><figcaption>The data structure returned with a batch fetch (redacted)</figcaption></figure><p>As mentioned earlier, every time there’s a change in the PouchDB database, the updateArticles() function is called to redraw the article list in the user interface. It passes only the array of actual documents (doc.rows), not the top layer of extra metadata, into our redrawArticleList() function as the array articles. We loop through this array of objects, referring to each object as currentArticle as it passes through the loop and is written to the page.</p><p>In this function, currentArticle.doc (equivalent to doc.row[i].doc described above) refers to the object we wrote to PouchDB when saving the form. Each li, created by looping through the array, includes the article’s title (currentArticle.doc.title), author if it&#39;s known (currentArticle.doc.author), a link directing to a special URL that includes the article’s _id, and classes created based on the editors and completion status.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/47952669934018a5d6dfe236da970b16/href">https://medium.com/media/47952669934018a5d6dfe236da970b16/href</a></iframe><p>For our needs here, a full list of articles sorted by ID is sufficient, so we’re not doing additional filtering via PouchDB, though that would be possible. Through the <a href="https://pouchdb.com/guides/mango-queries.html">Mango query</a> API (also known as pouchdb-find), we could create secondary indexes beyond the built-in allDocs() and changes()indexes. (If you’re familiar with MongoDB but not CouchDB or PouchDB, I’m told you’ll find Mango very easy to pick up.) <a href="https://pouchdb.com/guides/queries.html">Map/reduce queries</a> are also possible, but they’re harder to implement and you’re quite unlikely to need them, since Mango meets about 99% of users’ querying needs.</p><p>If you run the app, you’ll see that I do offer some limited filtering of the article list. However, I’ve done it by <a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager/blob/master/js/project-manager.js#L113">adding classes</a> for editors and completion status to each li as I build the DOM in my redrawArticleList() function. A separate <a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager/blob/master/js/project-manager.js#L163">click handler</a> monitors what filtering option the user clicks on and triggers jQuery&#39;s show() or hide() functions accordingly on lis of the appropriate class to hide and reveal articles as needed. All of the data retrieved from PouchDB is still there, just made invisible to the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*ZIIjzLTpgvlctxnnBnKHhg.png" /><figcaption>The article list filtered to show only completed blog posts.</figcaption></figure><h4><strong>Fetching individual documents with </strong><strong>db.get()</strong></h4><p>When we want to view or edit the details of a specific article, we need a way to fetch just that single record from PouchDB. (Remember, since we have continual sync turned on, this is the functional equivalent of accessing the most recent possible CouchDB record, as of the last time we had internet access.) This is where db.get() comes in.</p><p>To fetch a specific document, you need to know the value of its _id, which is a required argument of the db.get() function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*qOu_mnhEOmZuA_WrRfuV7A.png" /><figcaption>Fetching a specific document with db.get() (Source: <a href="https://pouchdb.com/api.html#fetch_document">PouchDB API — Fetch</a>)</figcaption></figure><p>Earlier we saw that when I write my list of articles to the DOM, I include a link to a URL containing the document ID. When a user clicks on one of these links to open a record, my populateForm() function first looks for that location.hash value, removes the preceding #, and stores the result as the variable ID. I can then pass that variable into the db.get() function to access the record the user wants to see and write its details to the page.</p><p>When we use db.get() , we don’t end up with all the extra metadata we saw with db.allDocs(). Instead, the results are identical to that article variable we once stored in Pouch, but with a new _rev value. Remember how I carefully set the names in the object to match the names of the form fields in my HTML? Because of that, I can now loop through name/value pairs in the object, using the value to identify what form field it aligns with and then setting the value in the object as the form value. You’ll note that I have to use some logic to determine whether the form field is a checkbox or a text field before I can appropriately set the value.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eed5d554953b5ab5be943bedf1d62e42/href">https://medium.com/media/eed5d554953b5ab5be943bedf1d62e42/href</a></iframe><p>Since I need to ensure I don’t lose access to the _id and _rev fields, I have places to store those in the DOM as well, although they are in a portion of the page that’s not editable by the user.</p><p>I also use the _id retrieved from PouchDB to create a customized, clickable link to the second webpage of my app, writer.html, which shows and hides certain sections or details based on the information in that article record. The details on this page will change as the record is updated with new resources and status markers, so the author can always use the same URL to access the most current information. (You can explore my <a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager/blob/master/writer.html">writer.html</a> file or the relevant sections of my <a href="https://github.com/ibm-watson-data-lab/offline-first-project-manager/blob/master/js/project-manager.js#L769">project-manager.js</a> file to see how this works.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UNh_dIBhcHlK4KSqZtYu5g.png" /><figcaption>The page shared with the author</figcaption></figure><h3>Deleting a record in PouchDB</h3><p>Occasionally, an editor will need to delete a record from our database. There are <a href="https://pouchdb.com/guides/updating-deleting.html#deleting-documents">a few different ways to delete a document</a> from PouchDB, but I chose to use db.remove():</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*pim8j8s-Ohj6nOBeuLNGcw.png" /><figcaption>Deleting records with db.remove() (Source: <a href="https://pouchdb.com/api.html#delete_document">PouchDB API Documentation — Delete a Document</a>)</figcaption></figure><p>Since my delete button is on my form page, I can use the form values to get the _id and _rev values that are needed here. (Both fields are required for deletions, as for edits, so that records can be properly synced.) I also make the user confirm they really want to delete the record before allowing the transaction to continue, and provide toast notifications to let them know the procedure has succeeded or failed. When it’s succeeded, they’re returned to the home screen, where the article just deleted will no longer be visible in the UI.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b34bdedb9b8c6f674e8fa6325f55e563/href">https://medium.com/media/b34bdedb9b8c6f674e8fa6325f55e563/href</a></iframe><p>The other way to delete a document in PouchDB is to use db.put() and add a _deleted: true value to the existing fields. (Compare this to db.remove(), which adds the same field behind the scenes, but deletes all the other fields.) That method is required if you use <a href="https://pouchdb.com/api.html#filtered-replication">filtered replication</a>, so that you don’t delete the fields you’re using to run your filter and thereby lose your ability to replicate the deletion to CouchDB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*8JBftYezn9uq9wNtytw5fw.png" /><figcaption>Deleting records with db.put() (Source: <a href="https://pouchdb.com/guides/updating-deleting.html#deleting-documents">PouchDB Guide — Deleting Documents</a>)</figcaption></figure><p>With either method, the database saves a tombstone at the end of the revision tree, and you shouldn’t count on being able to access the deleted document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*wJ_Oe2notKTIkFuUiaP-gw.png" /><figcaption>Adding a tombstone to the revision tree. (Source: <a href="https://pouchdb.com/guides/updating-deleting.html#deleting-documents">PouchDB Guide — Deleting Documents</a>)</figcaption></figure><h3>Speedy sync across multiple users and devices</h3><p>In order to implement security measures to make my index.html page available only to editors, make each writer.html#articleID page available only to the appropriate authors, and fully protect my CouchDB credentials from all users, I would need to implement some server-side code. (I’m curious to check out <a href="http://hood.ie/">Hoodie</a>, which lets you build a backend for a web app with front-end code.)</p><p>However, we can see that by using the built-in syncing superpowers of PouchDB and CouchDB, we’ve already made it possible to:</p><ul><li>Store and edit data locally while offline</li><li>Sync data to the cloud when a network connection is available</li><li>Share data from CouchDB across multiple users or devices, each with their own local PouchDB database</li></ul><p>Remember, because PouchDB lives in the browser:</p><ul><li>Two tabs in the same browser (not in incognito mode) share a single PouchDB instance</li><li>Different browsers on the same device have separate PouchDB instances</li><li>A browser tab in incognito mode has its own PouchDB instance separate from the same browser running in standard mode</li><li>Different users on different devices have separate PouchDB instances</li></ul><p>All of this makes it easy to test syncing functionality from a single device. You can load up a tab in Chrome to represent one user (or device) and one in Firefox to represent another, then toggle internet access on and off for one “user” but not the other.</p><p>The developer tools in both Chrome and Firefox offer ways to simulate being offline:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*NWBJGlTLZBz-Sqou5EARIA.png" /><figcaption>You can simulate offline status from the Network panel in Chrome dev tools…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*8ceAUz4aVlftSfXSLgbD3w.png" /><figcaption>…or from the Developer panel in Firefox</figcaption></figure><p>As you experiment with this, you’ll see that one of the incredible powers of this syncing process is its speed. When both devices are connected, data is transferred from one to another in the blink of an eye. In fact, many people choose an Offline First architecture not just to deal with lack of connectivity, but also to improve performance on even the strongest networks. We’ve seen the speed of data sync here, and in my next post we’ll see how a service worker can be used to increase the speed of page load.</p><h3>Summary &amp; resources</h3><p>Remarkably, handling data storage and sync is one of the topics I see least commonly addressed in tutorials on building Progressive Web Apps. PouchDB and CouchDB certainly aren’t the only solution to the problem of offline data sync, but both tools were built with an Offline First use case in mind, making them surprisingly easy to implement.</p><p>Many of the folks I’ve met at Offline Camp are big proponents of <a href="https://medium.com/offline-camp/couchdb-pouchdb-and-hoodie-as-a-stack-for-progressive-web-apps-a6078a985f18">PouchDB and CouchDB as part of a stack for Progressive Web Apps</a>, and have shared their stories in the Offline Camp Medium publication. Check out this <a href="https://medium.com/offline-camp/couchdb-pouchdb-hoodie/home">article collection</a> for more coverage.</p><p>My team at IBM has also put together a collection of <a href="https://ibm-watson-data-lab.github.io/shopping-list-demo">sample implementations</a> using PouchDB and CouchDB along with a variety of popular libraries and frameworks to create offline-capable shopping list apps that range from PWAs to hybrid mobile apps, native mobile apps, and even desktop apps.</p><p>For a broader perspective on Offline First, I recommend this <a href="https://medium.com/offline-camp/offline-first-resources-2acc5836e9d4">list of resources</a> as a great starting point to finding educational materials or joining the community.</p><h4>Up next: caching</h4><p>Offline data storage is awesome, but it’s no good if you can’t load the page that lets you view and edit your data. In my <a href="https://medium.com/ibm-watson-data-lab/making-your-app-awesome-when-the-network-isnt-part-2-669ee36e2f81">next post</a>, I’ll walk you through using a service worker to cache resources on first page load, enabling speedy loading on subsequent visits, offline or on.</p><p><a href="https://medium.com/ibm-watson-data-lab/making-your-app-awesome-when-the-network-isnt-part-2-669ee36e2f81">Making Your App Awesome When the Network Isn’t (Part 2)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ed530c2523" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codait/making-your-app-awesome-when-the-network-isnt-part-1-3ed530c2523">Making Your App Awesome When the Network Isn’t (Part 1)</a> was originally published in <a href="https://medium.com/codait">Center for Open Source Data and AI Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Offline First Peer-to-Peer Social Networks]]></title>
            <link>https://medium.com/offline-camp/offline-first-peer-to-peer-networks-da2bc4bc92af?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/da2bc4bc92af</guid>
            <category><![CDATA[decentralized-web]]></category>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[scuttlebutt]]></category>
            <category><![CDATA[offline-first]]></category>
            <category><![CDATA[peer-to-peer]]></category>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Tue, 20 Feb 2018 15:16:40 GMT</pubDate>
            <atom:updated>2018-02-20T15:20:06.312Z</atom:updated>
            <content:encoded><![CDATA[<h4>An Offline Camp passion talk from Francis Brunelle on P2P networking, from Scuttlebutt to Beaker Browser and beyond</h4><p>The campers at Offline Camp Oregon included a number of peer-to-peer (P2P) networking enthusiasts such as <a href="https://twitter.com/frabrunelle?lang=en">Francis Brunelle</a>. In a passion talk, Francis introduced us to Scuttlebutt — self-described as “a decent(ralised) secure gossip platform” — and Beaker Browser — an experimental P2P web browser. Check out Francis’ talk below, then scroll down for additional resources.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F5KXltaBGMoM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D5KXltaBGMoM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F5KXltaBGMoM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/094a36b2c632dc6d6f77fbb630b83d99/href">https://medium.com/media/094a36b2c632dc6d6f77fbb630b83d99/href</a></iframe><p><a href="https://www.scuttlebutt.nz/">Scuttlebutt</a> is a P2P networking protocol that works well offline and that can be used to build decentralized applications such as social networks. (<a href="https://ssbc.github.io/scuttlebutt-protocol-guide/">This guide</a> explains the protocol in more detail.) For more on what makes Scuttlebutt unique from federated social networks such as <a href="https://joinmastodon.org/">Mastodon</a>, Francis recommends <a href="https://medium.com/u/3ba9db42812d">André Staltz</a>’s article, “<a href="https://staltz.com/an-off-grid-social-network.html">An Off-Grid Social Network</a>.” You may also be interested in <a href="https://github.com/ssbc/patchwork">Patchwork</a>, a decentralized messaging and sharing app built on top of Scuttlebutt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*12fboP3sU6vt0ae6kYArvA.png" /><figcaption>A screenshot of Patchwork, built on Scuttlebutt</figcaption></figure><p><a href="https://beakerbrowser.com/">Beaker Browser</a> is an experimental P2P web browser that natively integrates the Dat protocol. You can think of <a href="https://datproject.org/">Dat</a> as being an improved version of BitTorrent that’s optimized for sharing folders of data that are constantly changing. This makes Dat a good fit for hosting static websites and building hostless applications because the author of a website or application can publish updates that users can download from anyone on the network and still be sure that they are downloading the same updates as everyone else. (See <a href="https://beakerbrowser.com/2017/06/19/cryptographically-secure-change-feeds.html">this blog post</a> for more info). With Beaker, creating a new website becomes as easy as entering a name for the site and clicking on a button to generate a new “key pair.” The “private” key gives the author the power to change the site while the “public” key gives other users the power to find and download the site.</p><p>Beaker also comes with built-in APIs that can be used to build all sort of apps. The Beaker team recently developed an example application called <a href="https://github.com/beakerbrowser/fritter">Fritter</a> to demonstrate how to build a P2P social network using Beaker and Dat.</p><p>For more on Beaker Browser, Dat, and P2P networking, check out our <a href="https://medium.com/offline-camp/decentralized-web/home">collection of articles</a> on the decentralized web.</p><p><em>Editor’s Note: Participants at Offline Camp Oregon had diverse backgrounds and interests, ranging far beyond the Offline First approach that we came together to discuss. Through short passion talks, campers shared with us some of the hobbies, projects, and technologies that excite them. We’re sharing a taste of that passion with you here as a preview to our </em><a href="https://offlinecamp.typeform.com/to/V8aSWJ"><em>upcoming events</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da2bc4bc92af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/offline-camp/offline-first-peer-to-peer-networks-da2bc4bc92af">Offline First Peer-to-Peer Social Networks</a> was originally published in <a href="https://medium.com/offline-camp">Offline Camp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reflections on Global Diversity CFP Day]]></title>
            <link>https://medium.com/codait/reflections-on-global-diversity-cfp-day-d26355c971?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/d26355c971</guid>
            <category><![CDATA[tech-conference]]></category>
            <category><![CDATA[public-speaking]]></category>
            <category><![CDATA[diversity-in-tech]]></category>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Mon, 12 Feb 2018 10:01:01 GMT</pubDate>
            <atom:updated>2018-02-12T10:01:01.474Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dz_Lu_3KfgsdQndwKDie5A.jpeg" /><figcaption>Signage welcomes participants at Global Diversity CFP Day Boston (Image Credit: <a href="https://twitter.com/ichthyos">Eddie Kay</a>)</figcaption></figure><h4>Preparing for new talks with fresh perspectives</h4><p>On February 3, volunteers from over 50 cities around the globe hosted <a href="https://www.globaldiversitycfpday.com/">Global Diversity CFP Day</a> workshops meant to encourage and support new speakers as they develop talk proposals and prepare for their first time on stage. The community event is based on workshops held in advance of <a href="http://scotlandcss.com/">ScotlandCSS</a> and <a href="http://scotlandjs.com/">ScotlandJS</a> 2016, and aims to increase diversity on the speaking circuit, particularly in tech.</p><p>As developer advocates, our team spends a lot of time thinking both about how to support diverse tech communities and how to hone our stagecraft, so the event was a natural fit for many of us who took part either as participants or as mentors in our home cities. Each of us had her own reasons for participating and her own takeaways from the experience. <a href="https://medium.com/u/741cdc55d297">Margriet Groenendijk</a>, <a href="https://medium.com/u/e6dd3fdb7c2d">Lorna Mitchell</a>, and I share our reflections below.</p><h4>Margriet Groenendijk (Bristol, England)</h4><p>I attended the workshop in Bristol. Although I got into public speaking only two years ago, I signed up as a mentor as the feeling of starting out is still fresh to me. My goal for the day was to help people with structuring their ideas into a talk proposal, and more importantly to get across that public speaking is for everyone, as there are always other people out there struggling with the same problems who would love to hear about your solutions.</p><p>Over the course of day’s activities, we went through the whole process of brainstorming and structuring talk ideas, drafting a bio, coming up with a title, and writing the proposal itself. The hardest part for most (including me) was turning an idea into a structured story that you could talk about for 20, 30, or even 45 minutes. We spent quite some time discussing ideas and finding stories and examples to make these ideas more concrete. Another thing that is so much easier to do together with others than on your own is writing a bio about yourself. Finding the words to describe yourself by going through some interview questions with a partner was really fun.</p><p>I had an amazing day where I learned loads on how to prepare future talks. My main takeaway is that this day helped people so much with the confidence needed to get started with public speaking. The workshop was an excellent way to explore what public speaking is about and I really hope a lot of new talks will come out of it. I am always happy to help or bounce ideas around if anyone gets stuck.</p><h3>⌨️🦑 Jaycee Cheong on Twitter</h3><p>Family photo of @gdcfpday Bristol/Bath 😍 Had a great day!</p><h4>Lorna Mitchell (Leeds, England)</h4><p>I participated as a mentor for the Leeds event. When I saw the global event mentioned on Twitter a few months ago, I went to sign up to run an event and saw that excellent local speaker Katie Fenn had already volunteered, so we joined forces. I’ve been a female speaker on the technical conference circuit for a decade, I’m a regular at my local meetups, and I also help organise a few events. It means so much to me to see new speakers and to hear their voices, their stories.</p><p>It’s always been really helpful to me to get advice from people that I identified with, and comforting that I’m not alone in my experiences. So many women have taken the time to listen and give advice to me, and I was so happy to show up to an event like this — just in case any other women felt the same way.</p><p>My day was also improved by writing some new abstracts of my own while sitting with the group I was mentoring! There was time set aside for brainstorming and writing an abstract, and it’s about time I came up with something new… so I went for it and had some excellent feedback from these new speakers with fresh perspectives.</p><h3>Katie Fenn on Twitter</h3><p>Abstract writing at @gdcfpday Leeds. Some wonderful ideas flowing out today! #GlobalDiversityCFPDay</p><h4>Teri Chadbourne (Boston, USA)</h4><p>As a long-time event organizer who often sees the same set of speakers featured at a wide variety of tech conferences, I was thrilled to hear about Global Diversity CFP Day’s efforts to get a more balanced representation of awesome folks on stage. I’ve been on stage plenty myself during a childhood of concerts and theater productions, but have only recently come up with some concepts I’d love to share behind the mic at a tech event. For me, the event in Boston was well timed to help me improve the abstracts I’ve just recently started submitting to conferences.</p><p>As a junior front-end web developer, I have a bit of imposter syndrome when it comes to getting on stage at a tech conference and sharing what I’ve learned. One of my favorite takeaways from the event was the reassurance that beginners — who make up a decent percentage of conference attendees — love talks from people not much more experienced than they are. A speaker who’s closer in experience level to their audience is often in a better position to explain concepts in a comprehensible way than someone more experienced might be.</p><p>Another key takeaway was the advice to use a blog post as a precursor to a conference talk. While you’re working through ideas for a potential talk, reaction to a blog post can be a way to judge the popularity of a topic (if of course you have access to a reasonable following on your blogging platform). Before crafting a slide deck, a post can be a way to pull together the ideas — and even code snippets — that you’ll need to support your story, which you can then use as a way to structure your presentation.</p><p>The day was full of supportive people and helpful advice, as well as some very positive reactions to the talk ideas I shared, so I’m feeling energized as I scout out more conferences to submit to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QaQ9n6urk8q-rMYFR1tA9g.jpeg" /><figcaption>Group discussions at Global Diversity CFP Day Boston (Image credit: <a href="https://twitter.com/ichthyos">Eddie Kay</a>)</figcaption></figure><p>For more reflections on Global Diversity CFP Day, take a scroll through the global organizers’ <a href="https://twitter.com/gdcfpday">Twitter account</a> for blog posts being shared. If you’re looking for speaking opportunities, that’s also a great place to find messages from conference organizers eager to receive proposals from new speakers. Good luck on stage!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d26355c971" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codait/reflections-on-global-diversity-cfp-day-d26355c971">Reflections on Global Diversity CFP Day</a> was originally published in <a href="https://medium.com/codait">Center for Open Source Data and AI Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Conquering the Oregon Trail]]></title>
            <link>https://medium.com/offline-camp/conquering-the-oregon-trail-118958520c67?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/118958520c67</guid>
            <category><![CDATA[progressive-web-app]]></category>
            <category><![CDATA[peer-to-peer]]></category>
            <category><![CDATA[offline-camp]]></category>
            <category><![CDATA[offline-first]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Tue, 05 Dec 2017 16:36:01 GMT</pubDate>
            <atom:updated>2019-04-26T17:02:39.048Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FesYIGeBSIrs%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DesYIGeBSIrs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FesYIGeBSIrs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ea9d8b1623e0f6fe1a577ef8b9d38c67/href">https://medium.com/media/ea9d8b1623e0f6fe1a577ef8b9d38c67/href</a></iframe><h3>Conquering the Oregon Trail</h3><h4>Reflections on the fourth iteration of Offline Camp</h4><p>The famed Oregon Trail is supposed to take 4–6 months to cross, but as Offline Camp organizers we’ve had a longer road. <a href="https://twitter.com/i/moments/929448303867060224">Offline Camp Oregon</a>, which took place November 10–13, was our fourth event in the past 18 months, and our wagon party’s been growing along the way. From the Catskills to California to Berlin to Oregon, we’ve been pleased to welcome new members to the <a href="http://www.offlinefirst.org/">Offline First</a> community at each event.</p><p>This time around we were especially excited to increase diversity in the Offline First community by expanding our scholarship program, which provided discounts, tickets, or travel support for 7 campers who otherwise wouldn’t have been able to join us. That was all made possible thanks to personal donations to our <a href="https://ti.to/offlinefirst/scholarship-fund">scholarship fund</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s6POHfnY8gKrWcYiXnFGUQ.jpeg" /><figcaption>Searching for a signal at Offline Camp Oregon (Image credit: <a href="https://medium.com/u/f703102edd01">Mike Broberg</a>)</figcaption></figure><p>The 26-person group that gathered in Oregon was made up of developers, UX professionals, entrepreneurs, non-profit founders, developer advocates, event and community organizers, and other awesome folks who were excited to explore the challenges of creating technology that works with limited connectivity.</p><h3>Steve Zelek on Twitter</h3><p>@OfflineCamp loving my first night here with all sorts of passionate technologists! #offlinefirst #likefamily</p><p>As I’ve shared in past articles, Offline Camp is an event <a href="https://medium.com/offline-camp/crafting-community-events-that-leave-them-wanting-smore-902974cff4d4">carefully crafted to build and nurture the community</a>, from the way we select our campers to the way we structure our discussions. It’s important to us to choose a venue where we can spend the weekend as a community, intentionally secluded from the world around us. Our home for this iteration of the event was Cascade Mountain Ranch in Grants Pass, Oregon, in the gorgeous Pacific Northwest of the United States. For the first time in Offline Camp history, we had very limited WiFi access, which brought a little extra urgency to the task of creating Offline First solutions. We shared living space in two lodges, and the rustic, dishwasher-free nature of our kitchen area led to a new community activity: dish crew! Whether scrubbing pots, cooking breakfast, carpooling, or playing late-night games of Werewolves around the campfire, we had plenty of opportunities for bonding with our fellow campers (not to mention the ranch’s much-anticipated llamas).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SqdS-u7iU9tfIXTaS_NnGA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-cmxiCsZwBquVDHFNStJMg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NkyjJ4LSqLpQVKCjdetQ0w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RjlshOv8ClX_JJ7mN7fPwQ.jpeg" /><figcaption>Llama visitation, breakfast prep, carpooling, and kaleidoscope yoga at Offline Camp Oregon (Image credits: <a href="https://medium.com/u/569d16a2d104">Gregor</a> &amp; <a href="https://medium.com/u/c8e4a6f6f80c">Chris Geirman</a> &amp; <a href="https://medium.com/u/46d19877174b">Bradley Holt</a>)</figcaption></figure><p>In traditional unconference style, we also had lots of opportunity to explore Offline First challenges through discussion, with campers suggesting topics and voting on them each morning. After splitting into small groups to discuss the most popular issues, we came together to share recaps that eased our FOMO for the sessions we weren’t able to get to ourselves. Although unconference sessions are typically open discussions, rather than a speaker and an audience, campers in Oregon voted to add a couple tutorials to the mix so they could get some hands-on experience with a technology that was new to them, with help from an expert among us. Session topics included:</p><ul><li><a href="https://medium.com/offline-camp/couchdb-pouchdb-and-hoodie-as-a-stack-for-progressive-web-apps-a6078a985f18">CouchDB, PouchDB, and Hoodie as a Stack for Progressive Web Apps</a></li><li><a href="https://medium.com/offline-camp/beaker-browser-f460cb40c4b4">Beaker Browser</a></li><li><a href="https://medium.com/offline-camp/blockchains-beyond-bitcoin-a6956f755d31">Blockchain</a></li><li><a href="https://medium.com/offline-camp/mesh-networks-e9f87529355a">Mesh Networks</a></li><li>The Economics of the Internet (Offline First to Save the World)</li><li>Service Worker Challenges</li><li>The Future of Progressive Web Apps: Desktop!</li><li>Offline First for Data Science</li><li>Tutorial: Writing a Service Worker from Scratch</li><li>A Smorgasbord of Caching &amp; Sync</li><li>Pitching Offline First to Stakeholders (Economics of the Internet, continued)</li><li>Governance of Decentralized &amp; Peer-to-Peer (P2P) Networks</li><li>Tutorial: My First Hoodie App</li><li>UX of Offline</li><li>Future of Service Worker</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i8mf8Msm_9o41CSxXkV8uA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6RZ-BPjwZa4cKU1PpsqaKA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fvr5Vn1QgyN5YZeazirIUg.jpeg" /><figcaption>The unconference process, from voting to discussing to sharing recaps (Image credit: <a href="https://medium.com/u/4f7002092ec">Teri</a> &amp; <a href="https://medium.com/u/b04a3bb1e99b">Steve Trevathan</a>)</figcaption></figure><p>Although our unconference sessions focused on common themes in our shared Offline First community, we also scheduled time for exploring the diversity of interests of our attendees. Through 5-minute passion talks, campers had the opportunity to share anything they were excited about, whether or not it was related to technology or to Offline First. The topics shared in Oregon included:</p><ul><li><a href="https://medium.com/offline-camp/better-hackathons-10e82dac7c79">Better Hackathons</a></li><li><a href="https://medium.com/offline-camp/mapping-the-internet-3c35528293fb">Mapping the Economics of the Internet</a></li><li><a href="https://medium.com/offline-camp/offline-first-peer-to-peer-networks-da2bc4bc92af">Scuttlebutt</a></li><li><a href="https://medium.com/offline-camp/mesh-networks-e9f87529355a">Mesh Networks</a></li><li><a href="https://medium.com/offline-camp/strange-kindness-d10457b45d39">Strange Kindness</a></li><li><a href="https://medium.com/offline-camp/making-life-memorable-432f3ea60c8e">Make Life More Memorable</a></li><li><a href="https://medium.com/offline-camp/after-object-oriented-programming-and-functional-programming-is-temporal-programming-next-de14e874d0f5">SAM Patterns</a></li><li><a href="https://medium.com/offline-camp/scalable-couchdb-replication-and-change-listening-with-spiegel-878e22901dcd">Scalable CouchDB Replication and Change Listening with Spiegel</a></li><li><a href="https://medium.com/offline-camp/hospitalrun-10-reasons-to-contribute-1a8f5fa8fbff">Hospital Run: Top Reasons to Contribute</a></li><li><a href="https://medium.com/offline-camp/techlahoma-f87fb8bfaa51">Techlahoma Grassroots (OKC Tech Community)</a></li><li><a href="https://medium.com/offline-camp/decentralization-is-not-enough-75b15b8bc230">Decentralization is Not Enough</a></li><li><a href="https://medium.com/offline-camp/open-source-development-on-the-windows-subsystem-for-linux-d52354d594a9">Bash/Linux on Windows</a></li><li>I Have Standards</li><li>The Web I Want Back</li><li>Side Projects Galore</li><li>Robots for Everyone</li><li>P2P: No Wrapper, No Server</li><li>The Indian Toilet Problem</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tFwSxJnb3Z-ZEuR_m4KwgQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n9f59VAipYYt1ry1zYwMsQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LoWT1qPkktIdiacoFKOUPg.png" /><figcaption>Passion talks at Offline Camp Oregon (Image credit: <a href="https://medium.com/u/4f7002092ec">Teri</a> &amp; <a href="https://medium.com/u/f703102edd01">Mike Broberg</a>)</figcaption></figure><p>Over the coming weeks and months, we’ll be sharing what we learned at Offline Camp with the broader Offline First community by summarizing each of our discussion sessions in articles and releasing videos of many of our passion talks to share. To ensure you see see as much of that content as possible, you may want to follow this Offline Camp Medium publication (using the button at the bottom of this article) and subscribe to the <a href="https://www.youtube.com/OfflineFirst">Offline First YouTube channel</a>, where we share both camp content and talks about Offline First from other events. In the meantime, you can check out our <a href="https://medium.com/offline-camp/offline-first-resources-2acc5836e9d4">recommended resources</a> for learning about Offline First or getting more involved in the community.</p><p>As event organizers, we owe a huge thank you to everyone who made Offline Camp Oregon possible, from our amazing campers to our generous scholarship fund donors to the folks at <a href="https://medium.com/offline-camp/a-huge-thank-you-to-our-foundational-sponsor-ibm-cloudant-948e4e10b1c3">IBM</a>, <a href="https://medium.com/offline-camp/the-support-and-presence-of-microsoft-edge-at-offline-camp-means-everything-ee78dbcbc63">Microsoft</a>, <a href="https://makemodel.co/">Make &amp; Model</a>, and <a href="http://neighbourhood.ie/">Neighbourhoodie</a> who sponsored the event. This is truly a community effort, and we’re very proud to be part of the Offline First community.</p><h3>Sarah Hendrickson on Twitter</h3><p>Went to @OfflineCamp preaching kindness but all of you taught me what it really means. So excited to grow our friendships and #offlinefirst!</p><p><strong><em>Editor’s Note:</em></strong><em> We’re already at work on plans for our next events, and we’d love your help deciding where to host the next Offline Camp. Please </em><a href="https://offlinecamp.typeform.com/to/V8aSWJ"><em>cast your vote</em></a><em> now and we’ll let you know when our next location is announced. If you’d like to support our efforts to increase the diversity of the Offline First community, </em>You can <a href="https://ti.to/offlinefirst/scholarship-fund">donate to our scholarship fund</a> for upcoming events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J_JF658JBv2Ayu6OnQyXOQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UcUWAvakIQy59L5VRK3z9A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o4-9ikrkFtG4sqIPqvd8VQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgl0bMj-nOUzJINkY94SaA.jpeg" /><figcaption>The growing Offline Camp family, from the Catskills to California to Berlin to Oregon</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=118958520c67" width="1" height="1" alt=""><hr><p><a href="https://medium.com/offline-camp/conquering-the-oregon-trail-118958520c67">Conquering the Oregon Trail</a> was originally published in <a href="https://medium.com/offline-camp">Offline Camp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Offline First? [Video]]]></title>
            <link>https://medium.com/offline-camp/what-is-offline-first-video-fa33c0564039?source=rss-4f7002092ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa33c0564039</guid>
            <category><![CDATA[pwa]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[progressive-web-app]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[offline-first]]></category>
            <dc:creator><![CDATA[Teri Chadbourne]]></dc:creator>
            <pubDate>Mon, 16 Oct 2017 14:13:02 GMT</pubDate>
            <atom:updated>2019-06-12T14:00:02.142Z</atom:updated>
            <content:encoded><![CDATA[<h4>Offline Camp attendees share their perspective</h4><p>As organizers of <a href="http://offlinefirst.org/camp">Offline Camp</a>, an event meant to propel the Offline First community forward, we get a lot of questions about the term, first <a href="http://hood.ie/blog/say-hello-to-offline-first.html">coined by Alex Feyerke</a> and the Hoodie team in 2013, that defined the movement.</p><p>Among our campers we see a wide range of interests within the Offline First approach to development and design. Some folks are addressing the unique infrastructure challenges of the developing world and some are making apps work reliably for users dealing with spotty connections on the subway. Some are building Progressive Web Apps, while others are exploring native, desktop, and IoT solutions. Some are using decentralized and peer-to-peer networks as a way to keep data secure and address privacy concerns. Others are creating new UX design patterns to address the complexities of conveying system state in adverse network conditions.</p><p>Despite the wide range of motivations that bring people to the community and the broad spectrum of tools they employ, we see common themes in how our campers define Offline First. Here’s how the community is putting performance first, recognizing network downtime as a fact of life, and satisfying users whether they’re offline, online, or somewhere in between:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FbWXAZboHZN8%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbWXAZboHZN8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FbWXAZboHZN8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/23bb439762fd7b5b74df95b2b479fd15/href">https://medium.com/media/23bb439762fd7b5b74df95b2b479fd15/href</a></iframe><p>These voices are only a few of the many that make up the Offline First community. This Medium publication is filled with explorations of various aspects of Offline First by our campers and community members, as well as a curated list of additional <a href="https://medium.com/offline-camp/offline-first-resources-2acc5836e9d4">resources</a> ranging from videos to podcasts. We’d love for you to join the conversation at our <a href="http://offlinefirst.org/camp">next event</a> or <a href="https://offlinecamp.typeform.com/to/V8aSWJ">sign up for updates</a> and cast your vote on where we should host future editions of Offline Camp. You can also join the discussion in our <a href="http://offlinefirst.org/chat">Slack team</a>. We can’t wait to hear about how you’re tackling the challenges of Offline First.</p><p><strong><em>Editor’s Note:</em></strong><em> This article recaps discussions we had at Offline Camp, a unique tech retreat that brings together the </em><a href="http://offlinefirst.org/"><em>Offline First</em></a><em> community. Join us at</em></p><p><em>Editor’s Note: We’re incredibly grateful to videographer </em><a href="https://twitter.com/AsR0ss"><em>Aaron Ross</em></a><em> and </em><a href="https://developer.ibm.com/tv/builders/"><em>New Builders Podcast</em></a><em> host </em><a href="https://twitter.com/JW_Young"><em>Jim Young</em></a><em> for the countless hours they’ve dedicated to producing this video as a resource for the Offline First community, as well as </em><a href="https://medium.com/u/46d19877174b"><em>Bradley Holt</em></a><em> and </em><a href="https://medium.com/u/e6dd3fdb7c2d"><em>Lorna Mitchell</em></a><em> for conducting interviews. And a big shout-out is due as well to the many campers who agreed to share their perspectives. Thanks for your support. ❤️</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDGuo40M3M8w-B_XP7nUxA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lon1RsBfEKwSDjhZD3FeVQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fOb1ERg05R4OuLSNVd-MDg.jpeg" /><figcaption>Interviews in progress at Offline Camp California, thanks to Aaron Ross &amp; Jim Young of IBM. ❤</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa33c0564039" width="1" height="1" alt=""><hr><p><a href="https://medium.com/offline-camp/what-is-offline-first-video-fa33c0564039">What is Offline First? [Video]</a> was originally published in <a href="https://medium.com/offline-camp">Offline Camp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>