Winch - Build Faster Mobile Apps

Winch - Build Faster Mobile Apps

Winch is a sync engine for iOS and Android apps. It lets you build highly responsive mobile apps that even work off-line.

These slides give an overview including a case study that leverages Mantle - a model framework for Cocoa and Cocoa Touch.

Presentation made for CocoaHeads Paris.

See:
* https://winch.io
* http://cocoaheads.fr/2013/11/la-gestion-des-donnees-le-14-novembre-a-paris/
* https://github.com/deltheil/snippets
* https://github.com/github/Mantle

5d911b7a5d9158ad9fdcc6a493c7333c?s=128

Cédric Deltheil

November 14, 2013
Tweet

Transcript

  1. None
  2. None
  3. In-app latencies translate into...

  4. frustrated users :(

  5. Common app pattern Every user action requires downloading data •

     pros: simple to implement, •  cons: poor user experience.
  6. "Speed is a feature"

  7. Minimize in-app latencies...

  8. to make your users happy :)

  9. None
  10. Build Faster Mobile Apps

  11. Additional benefits Besides reacting faster, your app: 1.  works off-line,

    2.  stays up-to-date seamlessly.
  12. How does it work?

  13. As simple as 1, 2, 3 1.  import your data,

    2.  drag and drop the Winch iOS framework, 3.  call sync() .
  14. Concepts

  15. In short Winch is a key-value data store. “

  16. Think of it as... datastore ~ database namespace ~ table

    key ~ primary key value ~ data
  17. Example: Snippets for iOS

  18. What is Snippets? •  an iOS app to learn and

    experience your favorite tech on-the-go, •  it works with Redis so far, •  it is open source, •  it is powered by Winch. Initiated at AngelHack Paris, October 2013.
  19. Overview

  20. None
  21. None
  22. None
  23. None
  24. Data Model

  25. Commands: rds:cmds •  key: command unique ID, e.g "get" •

     value: JSON doc with command name, summary, CLI sample, e.g: { "name": "GET", "summary": "Get the value of a key" "cli":["GET nonexisting",...] } 01. 02. 03. 04. 05.
  26. Groups: rds:groups •  key: integer key, e.g "0003" •  value:

    JSON doc with group name and related commands, e.g: { "name": "Hashes", "cmds": ["hdel", "hget", ...] } 01. 02. 03. 04.
  27. HTML docs: rds:docs •  key: command unique ID, e.g "get"

    •  value: HTML fragment, e.g: <h1>GET key</h1> <h3>Available since 1.0.0</h3> ... It is used with: [webView loadHTMLString:html baseURL:nil]; 01. 02. 03.
  28. Model Layer

  29. Use Mantle™, by GitHub Mantle makes it easy to write

    a simple model layer for your Cocoa or Cocoa Touch application. “
  30. None
  31. RDSCommand.h

  32. RDSCommand.m

  33. Winch Category

  34. Write app specific helpers Create a WNCDatabase+MyApp category and implement

    custom extensions for your app data model. “
  35. Overview

  36. Sync Abstract your namespaces under a custom sync method:

  37. Fetch Get a collection of model objects via a single

    call:
  38. Save Persist local data with a local namespace:

  39. Questions?

  40. Thanks :)