Skip to content

Instantly share code, notes, and snippets.

@yarmand
Created April 15, 2013 10:31
Show Gist options
  • Save yarmand/5387200 to your computer and use it in GitHub Desktop.
Save yarmand/5387200 to your computer and use it in GitHub Desktop.
Preparation notes for a talk

[Talk] kill fat models

intro

  • after a time you wake up with a fat app
  • number of features increase, velocity decrease.
  • asymptotyc scalability : increase teams => increase need to sync

Conventions without comprehension

start fast / small and blind

  • data driven architecture
  • MVC as the response to everything
  • following conventions but break some principles not on purpose.

grow

  • keep everything related to a data in the model
  • more/all function rely on every models
  • no unit test anymore

where is the line saying stop growing these models ?

  • there is no line
  • can we go to a safe area again ?

refactoring with a scalpel

creating a new type of object ?

  • MVC is not the enemy

/lib a teritory to conquier

  • cut brick by brick

think the gem way

  • extract a full building

measure your refactor by testing

better design => faster unit test

  • zeus, ... , commands and friends are keeping you blind.
  • keep test_helper light

proper integration tests

  • here you test your stack and cross object behaviors

QA by acceptance tests

  • what is testable
  • keep away from implementation dependency
  • where frontend guys write testable GUI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment