This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
487 lines (403 loc) · 17.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
<!DOCTYPE html>
<html lang="en">
<head>
<title>Shower Presentation Engine</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="node_modules/@shower/ribbon/styles/styles.css">
<link rel="stylesheet" href="./styles/main.css">
<style>
.shower {
--slide-ratio: calc(16 / 9);
}
</style>
</head>
<body class="shower list">
<header class="caption">
<h1>Shower Presentation Engine</h1>
<p>Yours Truly, Famous Inc.</p>
</header>
<section class="slide" data-name="slide cover">
<img class="cover" src="./images/offline-by-heart.png" alt="Offline by heart">
</section>
<section class="slide" data-name="who-am-i">
<h2>Who am I?</h2>
<div class="who-am-i" data-name="who-am-i">
<img class="who-am-i__image" src="./images/stas-dolgachov.jpg" alt="Speaker image">
<ul class="who-am-i__content">
<li>Stanislav Dolgachov</li>
<li>Software Engineer in EPAM</li>
<li>Play saxophone</li>
</ul>
</div>
</section>
<section class="slide" data-name="what?">
<h2 class="shout">What?</h2>
</section>
<section class="slide black" data-name="Good offline example">
<img class="cover" src="./images/instagram_offline.PNG" alt="Instagram app in offline mode">
</section>
<section class="slide" data-name="why-offline">
<h2 class="shout">Why?</h2>
</section>
<section class="slide">
<h2 class="shout">1. Devices</h2>
</section>
<section class="slide" data-name="iPhone 6">
<img class="cover" src="./images/iphone-6.jpg" alt="Iphone 6 from 2014">
<p class="main-text"><b>2014</b></p>
</section>
<section class="slide" data-name="metro law">
<h2>2. Murphy's law</h2>
<img class="cover" src="./images/there-is-no-internet-connection-prints.webp" alt="No internet connection T-REX">
</section>
<section class="slide black" data-name="I hate white screens">
<h2><div>3. I hate</div><div>white screens</div> </h2>
<img class="cover" src="./images/safari-blank-screen.png" alt="Safari browser with blank screen">
</section>
<section class="slide" data-name="but...">
<h2 class="shout">But...</h2>
</section>
<section class="slide" data-name="Our project">
<h2 class="shout">Our project</h2>
</section>
<section class="slide" data-name="tech specs">
<h2>Tech. specs</h2>
<ul>
<li><h3>Mobile application for iOS</h3></li>
<li><h3>Ionic & Cordova</h3></li>
<li><h3>Angular+</h3></li>
</ul>
</section>
<section class="slide grid black" data-name="Business requirements">
<h2 class="white-text">
<div>Our</div>
<div>app</div>
</h2>
<img class="cover" src="./images/prism-app-2.png" alt="Prism application screenshoot">
</section>
<section class="slide" data-name="Dmytro & Stan">
<img class="cover" src="./images/offline-developers.png" alt="Dmytro and Stan picture before starting the project">
</section>
<section class="slide" data-name="Offline requirements for files">
<h2>Offline requirements for files</h2>
<img class="cover" src="./images/offline-requirements.svg" alt="Save Preview Delete">
</section>
<section class="slide" data-name="what could go wrong">
<h2>What could possible go wrong?</h2>
<img class="place" src="./images/what-could-possibly-go-wrong-gif.gif" alt="What could possible go wrong?">
</section>
<section class="slide" data-name="Life finds a way.">
<h2 class="next">Life finds a way.</h2>
<img class="place" src="./images/life-finds-the-way.gif" alt="Life finds a way.">
</section>
<section class="slide">
<h2>The beginning</h2>
<img class="cover" src="./images/meeting.gif" alt="People on the meeting">
</section>
<section class="slide" data-name="File + Metadata">
<img class="place" src="./images/File%20and%20metadata.svg" alt="File + Metadata diagram">
</section>
<section class="slide grid" data-name="File representation">
<h2>1. File</h2>
<img class="cover" src="./images/box.png" alt="Box com logo">
</section>
<section class="slide" data-name="Dmytro's Golysh pull request">
<img class="cover" src="./images/offline-pull-request.png" alt="Dmytro's Golysh pull request to Box content preview">
</section>
<section class="slide">
<h2>Cordova plugin for files</h2>
<img src="./images/cordova-plugin.png" alt="Cordova plugin">
</section>
<section class="slide" data-name="File">
<h2 class="shout">File ✅</h2>
</section>
<section class="slide" data-name="metadata">
<h2 class="shout">2. Metadata</h2>
</section>
<section class="slide" data-name="Cordova plugin for SQLite DB">
<h2>Cordova plugin for SQLite DB</h2>
<img src="./images/cordova-plugin.png" alt="Cordova plugin">
</section>
<section class="slide grid black" data-name="Prism application">
<h2 class="white-text">
<div>Our</div>
<div>app</div>
</h2>
<img class="cover" src="./images/prism-app-2.png" alt="Prism application screenshoot">
</section>
<section class="slide" data-name="Cordova plugin for SQLite DB">
<h2>💡 Progressive Web Applications (Approach)</h2>
<img class="place" src="./images/pwa.png" alt="pwa">
</section>
<section class="slide" data-name="service worker">
<img class="cover" src="./images/service-worker.jpeg" alt="service worker graph">
</section>
<section class="slide" data-name="Store responses"
style="display: flex; align-items: center;">
<div class="columns two">
<div>
<h2>Url: <mark>/folders</mark> <mark class="mark-important next">KEY</mark></h2>
</div>
<div>
<h2>Response: <mark class="mark-important next">VALUE</mark></h2>
<pre class="main-text">
[<img width="50" height="50" src="./images/dog.png" alt="dog">, <img width="50" height="50" src="./images/dog.png" alt="dog">, <img width="50" height="50" src="./images/dog.png" alt="dog">]
</pre>
</div>
</div>
</section>
<section class="slide" data-name="Responses storage diagram">
<img style="height: 90%;" class="shout" src="./images/response-store.svg" alt="Responses storage diagram">
</section>
<section class="slide" data-name="Changes">
<div class="next">
<h3>Before</h3>
<pre>
<code><mark class="important">this.http.get(...)</mark></code>
</pre>
</div>
<div class="next">
<h3>After</h3>
<pre>
<code><mark>this.pcsHttp.get(...)</mark></code>
</pre>
</div>
<img class="place right" src="./images/rocky.gif" alt="Rocky Balboa training session">
</section>
<section class="slide" data-name="First iteration success">
<h2>Success!</h2>
<img class="cover" src="./images/stark-bow.gif" alt="Tony Stark stays on stage">
</section>
<section class="slide" data-name="How long?">
<h2 class="shout">How long?</h2>
</section>
<section class="slide" data-name="4 days">
<h2 class="shout">~4 days</h2>
</section>
<section class="slide" data-name="Genius idea retro">
<h2>Retro</h2>
<div class="columns two">
<div>
<h3><span class="success-highlight">Advantages</span></h3>
<ol>
<li class="next">Components "don't know" anything about offline</li>
</ol>
</div>
<div>
<h3 class="alert-highlight">Disadvantages</h3>
<ol>
<li class="next">API changes very often</li>
<li class="next">Totally unclear what calls you need to save</li>
</ol>
</div>
</div>
</section>
<section class="slide" data-name="iteration number two">
<h2 class="shout">Iteration #2</h2>
</section>
<section class="slide" data-name="1. Several base stores">
<h2 class="shout">1. Refactor data store</h2>
</section>
<section class="slide" data-name="Responses storage diagram duplicate">
<img style="height: 90%;" class="cover" src="./images/response-store.svg" alt="Responses storage diagram">
</section>
<section class="slide" data-name="Several stores diagram">
<img class="cover" src="./images/stores.svg" alt="Several stores diagram">
</section>
<section class="slide" data-name="Collections">
<h2>Companies store example</h2>
<table class="striped">
<tr>
<th>Id</th>
<th>Name</th>
<th>firmParticipantId</th>
<th>newDocumentsCount</th>
</tr>
<tr scope="row">
<td>777</td>
<th>ACME</th>
<td>888</td>
<td>10</td>
</tr>
<tr scope="row">
<td>968</td>
<th>ZAZ</th>
<td>963</td>
<td>0</td>
</tr>
<tr scope="row">
<td>111</td>
<th>KIA</th>
<td>222</td>
<td>22</td>
</tr>
<tr scope="row">
<td>7555</td>
<th>Jeep</th>
<td>1213</td>
<td>11</td>
</tr>
<tr scope="row">
<td>14141</td>
<th>Ford Co.</th>
<td>33</td>
<td>1</td>
</tr>
</table>
</section>
<section class="slide" data-name="Obsolete data">
<h2 class="shout">Obsolete data</h2>
</section>
<section class="slide" data-name="Migrations">
<h2>2. Migrations</h2>
<img class="cover" src="./images/migration-dia.svg" alt="Migration scripts diagram">
</section>
<section class="slide" data-name="Synchronization">
<h2>3. Synchronization</h2>
<h3 class="next">NgRx effects</h3>
<img class="cover next" src="./images/effects.svg" alt="Effects for synchronization">
</section>
<section class="slide" data-name="Synchronization2">
<h2>3. Synchronization</h2>
<pre>
<code><mark>@Effect({ dispatch: false })</mark></code>
<code>public syncData: Observable<Action> = this.actions$.pipe(</code>
<code> <mark>ofType('SYNC_DATA'),</mark></code>
<code> tap((action) => {</code>
<code> <mark class="important">this.dataSyncService.sync(action.payload);</mark></code>
<code> })</code>
<code>);</code>
</pre>
</section>
<section class="slide" data-name="Deferred error">
<h2>4. Deferred error logging</h2>
<img class="cover" src="./images/error-handling.svg" alt="error handling">
</section>
<section class="slide" data-name="Tips & tricks">
<h2 class="shout">
Tips & tricks <img width="120" height="120" src="./images/dog.png" alt="dog">
</h2>
</section>
<section class="slide" data-name="Offline is hard">
<h2>1. User's offline data</h2>
<div>
<img src="./images/offline-is-hard.gif" alt="Dog falls down">
</div>
</section>
<section class="slide" data-name="Auth when offline">
<h2>2. Auth when offline</h2>
<div>
<img src="./images/authozitaion.gif" alt="Dog attempt to come in through the glass door">
</div>
</section>
<section class="slide" data-name="Dynamic Cache">
<h2>3. Dynamic Cache</h2>
<div>
<img src="./images/dynamic-cache.gif" alt="Three dogs and one on the hoover">
</div>
</section>
<section class="slide" data-name="one-more-thing">
<img style="height: 90%;" class="cover" src="./images/one_more_thing.png" alt="One more thing">
</section>
<section class="slide" data-name="browser-implementation">
<h2 class="shout">Offline in browsers?</h2>
</section>
<section class="slide" data-name="Good artists copy, Great artists steal">
<blockquote>
<h2>Good artists copy, Great artists steal</h2>
</blockquote>
<img src="./images/pozner.jpg" alt="Pozner">
</section>
<section class="slide black" data-name="google-docs">
<img src="./images/google-docs.png"
class="cover"
alt="google docs">
</section>
<section class="slide black" data-name="google-docs-extension">
<img src="./images/google-docs-extension.png"
alt="google docs offline extension">
</section>
<section class="slide" data-name="docs manifest">
<h2>manifest.json</h2>
<pre>
<code><mark>"content_capabilities"</mark>: {</code>
<code> ...</code>
<code> "permissions": [ ..., <mark>"unlimitedStorage"</mark>]</code>
<code>},</code>
<code>...</code>
<code>"permissions": [ ..., <mark>"unlimitedStorage"</mark>],</code>
<code>...</code>
</pre>
</section>
<section class="slide" data-name="conten_capabilities">
<h3>"The <span class="mark-important">content_capabilities</span> manifest entry allows an extension to grant certain <mark>additional capabilities to web contents whose locations match a given set of URL patterns.</mark>",</h3>
<pre>
<code>"permissions": [ ..., <mark>"unlimitedStorage"</mark>]</code>
</pre>
</section>
<section class="slide" data-name="browser-case-1">
<h2>Case #1 (Google Docs)</h2>
<ol>
<li><h3>Own browser</h3></li>
<li><h3>IndexDB</h3></li>
<li><h3>Browser extension for unlimited storage</h3></li>
</ol>
</section>
<section class="slide" data-name="the present">
<h2>2k19</h2>
<img class="cover" src="./images/pwa.png" alt="PWA">
</section>
<section class="slide" data-name="browser-case-1">
<h2>Case #2 (PWA)</h2>
<ol>
<li><h3>Cache static resources via Service Worker</h3></li>
<li><h3>Store metadata in IndexDB</h3></li>
<li><h3>Cache binary via Cache API in Main Script</h3></li>
</ol>
</section>
<section class="slide black">
<img class="cover" src="./images/service-worker-file-cache.png" alt="service worker file cache example">
</section>
<section class="slide black" data-name="the future">
<h2>
<a target="_blank" href="https://developers.google.com/web/updates/2019/08/native-file-system">
Native File System API
</a>
</h2>
<img src="./images/matrix.gif" alt="Matrix">
</section>
<section class="slide black" data-name="offline text editor">
<img class="cover" src="./images/offline-text-editor.png" alt="offline text editor">
</section>
<section class="slide" data-name="the future">
<h2>Case #3 (The future)</h2>
<ol>
<li><h3>Available by flag in Chrome 77</h3></li>
<li><h3>Should begin an origin trial in Chrome 78 (stable in October)</h3></li>
</ol>
</section>
<section class="slide" data-name="Q&A">
<h2 class="shout">Q&A</h2>
</section>
<section class="slide" data-name="links">
<h2>Links</h2>
<ol>
<li><a target="_blank" href="http://apandichi.github.io/database-migrations-in-cordova/">Database migrations in Cordova</a></li>
<li><a target="_blank" href="https://blog.bradleygore.com/2015/09/25/cordova-sqlite-migrations/">Cordova Sqlite Migrations</a></li>
<li><a target="_blank" href="https://habr.com/en/post/439238/">PWA in Google Store RUS</a></li>
<li><a target="_blank" href="https://medium.com/@firt/google-play-store-now-open-for-progressive-web-apps-ec6f3c6ff3cc">PWA in Google Store EN</a></li>
<li><a target="_blank" href="https://m.oursky.com/why-every-app-should-go-offline-first-53d4570963bf">Why every app should go offline-first</a></li>
<li><a target="_blank" href="https://m.oursky.com/why-every-app-should-go-offline-first-53d4570963bf">Why every app should go offline-first</a></li>
<li><a target="_blank" href="https://github.com/stas-dolgachov/simple-file-cache">Cache binary via Cache API example</a></li>
<li><a target="_blank" href="https://developers.google.com/web/updates/2019/08/native-file-system">Native File System API</a></li>
</ol>
</section>
<footer class="badge">
<a href="https://github.com/shower/shower">Fork me on GitHub</a>
</footer>
<div class="progress"></div>
<script src="node_modules/shower-core/shower.min.js"></script>
<!-- Copyright © 2019 Yours Truly, Famous Inc. -->
</body>
</html>