<commit_before># THE OUTLINE

#### Why even?

- We can't have everything in memory any more. Full stop.
- The average developer shouldn't have to think about RTM.start vs users.counts to build features
  - When views all know about fetching data, it makes changing the data sources Difficult
- How would we design the Slack data model in 2017, given that Teams aren't going to mean anything, and shared / enterprise identities are The Default?

#### Red Threads

- The amount of memory we use is proportional to the number of things on screen
- Writing views should be super easy, and reading the implementation of views should be a joy
- The way that data gets _into_ Slack should be completely unrelated to the way that devs access data
- Electron apps don't have to use 2GB of memory. Prove it.

#### Concepts to Introduce (in order)

- "Model" aka ViewModels
  - Easy to test! Just create them
  - Properties that tell us when they change

- Updatable
  - "A Lazy Promise"
  - Knows what it is Right Now, and how to get the Latest Version
  - Future: Being able to get staleness, request missing fields (users.counts vs user.info)

- SparseMap
  - Knows how to create Updatables for a certain "class" of thing (users, channels)
  - Conceptually like a Dictionary - you'll always get A Thing, but what you get might be either stale, or pending

- Models and Updatables 2Gether In Love
  - Mention `when` and `toProperty`
  - UserViewModel a good demo class

- React Integration
  - Views know about their containing ViewModels (no props, no state)
  - If a ViewModel updates, the View renders Automagically

---

### BEGIN SLIDES

---

# OK So, React?

We've decided our glorious future will be React-based 🎉

## Sooo, time to…

---

# Componentize Everything!

Converting jQuery + Handlebars views to React will be a challenge

But it might not even be the Hard Part™

---<commit_msg>More notes<commit_after># THE OUTLINE

#### Why even?

- We can't have everything in memory any more. Full stop.
- The average developer shouldn't have to think about RTM.start vs users.counts to build features
  - When views all know about fetching data, it makes changing the data sources Difficult
- How would we design the Slack data model in 2017, given that Teams aren't going to mean anything, and shared / enterprise identities are The Default?
- How hard does Offline From Day One make things?

#### Red Threads

- The amount of memory we use is proportional to the number of things on screen
- Writing views should be super easy, and reading the implementation of views should be a joy
- The way that data gets _into_ Slack should be completely unrelated to the way that devs access data
- Electron apps don't have to use 2GB of memory. Prove it.

#### Demo Ideas

- Boot the app, show memory usage
- Prove we're connected to ws
- Show scrolling speed (open FPS counter)

#### Concepts to Introduce (in order, i.e. drop stuff from the end)

- "Model" aka ViewModels
  - Easy to test! Just create them
  - Properties that tell us when they change

- Updatable
  - "A Lazy Promise"
  - Knows what it is Right Now, and how to get the Latest Version
  - Future: Being able to get staleness, request missing fields (users.counts vs user.info)

- SparseMap
  - Knows how to create Updatables for a certain "class" of thing (users, channels)
  - Conceptually like a Dictionary - you'll always get A Thing, but what you get might be either stale, or pending

- Models and Updatables 2Gether In Love
  - Mention `when` and `toProperty`
  - UserViewModel a good demo class

- React Integration
  - Views know about their containing ViewModels (no props, no state)
  - If a ViewModel updates, the View renders Automagically
  - Views destroy their ViewModels on componentDidUnmount, and ViewModels destroy their connection to the Updatable

---

### BEGIN SLIDES

---

# OK So, React?

We've decided our glorious future will be React-based 🎉

## Sooo, time to…

---

# Componentize Everything!

Converting jQuery + Handlebars views to React will be a challenge

But it might not even be the Hard Part™

---
{'fraction_non_alphanumeric': 0.06156853163938431, 'fraction_numerical': 0.0029318348399706815, 'mean_word_length': 3.5641025641025643, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2529518', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1107, 'n_words': 621}