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

[Thinknetica, 2015] Rails Concerns, или “забота...

[Thinknetica, 2015] Rails Concerns, или “забота” о коде

Vladimir Dementyev

April 25, 2015
Tweet

More Decks by Vladimir Dementyev

Other Decks in Programming

Transcript

  1. Concern = Module + SoC* * Separation of Concerns –

    разделение ответственности 4
  2. https://signalvnoise.com/posts/3372-put-chubby-models-on-a-diet-with-concerns “Put chubby models on a diet with concerns”* DHH,

    Dec, 2012 * Посади свои пухлые модели на диету с консернами 12
  3. 17

  4. 23

  5. Naming convention: Example 31 Тип Правило Пример Модель Ability (-able)

    Archivable Контроллер Present Perfect (-ed) Archived Роуты Model/Controller archivable
  6. Naming convention: Example 33 Тип Правило Пример Модель Ability (-able)

    Archivable Контроллер Present Perfect (-ed) Archived Роуты Model/Controller archivable Декораторы Has- HasArchive Сериалайзеры With- WithArchive with_model With + Model WithArchivable