Upgrade to Pro — share decks privately, control downloads, hide ads and more …

State normalization (RU)

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →
DAloG
September 28, 2019

Transcript

52 slides
  1. struct Post { let id: ID let author: User.ID let

    comments: [Comment.ID] let text: String struct ID: Hashable { let value: String } }
  2. struct User { let id: ID let posts: [Post.ID] let

    comments: [Comment.ID] let name: String let avatar: URL struct ID: Hashable { let value: String } }
  3. struct Comment { let id: ID let author: User.ID let

    post: Post.ID let text: String struct ID: Hashable { let value: String } }
  4. struct State { let posts: [Post.ID: Post] let users: [User.ID:

    User] let comments: [Comment.ID: Comment] let feed: [Post.ID] let currentUser: User.ID }

More Decks by DAloG

Other Decks in Programming