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

O que o Front end pode aprender com Rails

Lucas Mazza
November 08, 2014

O que o Front end pode aprender com Rails

Apresentado no TablelessConf e no Front in POA.

Lucas Mazza

November 08, 2014
Tweet

More Decks by Lucas Mazza

Other Decks in Programming

Transcript

  1. O que o Front end
    pode aprender com o Rails

    View full-size slide

  2. http:/
    /www.casadocodigo.com.br/products/livro-html-css

    View full-size slide

  3. Partials
    Rails Assets
    Bourbon
    CoffeScript
    Asset Pipeline
    Ember
    Sass
    Compass
    Haml
    Helpers
    Rake
    Variants

    View full-size slide

  4. Comunalidade
    1

    View full-size slide

  5. “We confess the fact that we are not
    as special as we like to believe.”
    DHH @ RailsConf 2008

    View full-size slide

  6. Problemas comuns
    &
    Soluções comuns

    View full-size slide

  7. Convention
    over
    Configuration

    View full-size slide

  8. Defaults
    over
    Choices

    View full-size slide

  9. Paradox of Choice
    “People like choices a lot better than actually having to
    choose.”
    DHH @ RailsConf 2008

    View full-size slide

  10. Barry Schwartz - The paradox of choice
    http:/
    /www.ted.com/talks/barry_schwartz_on_the_paradox_of_choice

    View full-size slide

  11. Remover escolhas triviais

    View full-size slide

  12. “We want to have as much time as we
    can for the challenging tasks”
    Yehuda Katz @ RailsConf 2014

    View full-size slide

  13. 10 Years! - Yehuda Katz
    https:/
    /www.youtube.com/watch?v=9naDS3r4MbY

    View full-size slide

  14. • Package Manager?

    View full-size slide

  15. • Package Manager?
    • Module Loader?

    View full-size slide

  16. • Package Manager?
    • Module Loader?
    • MVC Framework?

    View full-size slide

  17. • Package Manager?
    • Module Loader?
    • MVC Framework?
    • Test Framework?

    View full-size slide

  18. • Package Manager?
    • Module Loader?
    • MVC Framework?
    • Test Framework?
    • Task Runner?

    View full-size slide

  19. • Package Manager?
    • Module Loader?
    • MVC Framework?
    • Test Framework?
    • Task Runner?
    • CSS Architecture?

    View full-size slide

  20. • Package Manager?
    • Module Loader?
    • MVC Framework?
    • Test Framework?
    • Task Runner?
    • CSS Architecture?
    • …

    View full-size slide

  21. • Package Manager?
    • Module Loader?
    • MVC Framework?
    • Test Framework?
    • Task Runner?
    • CSS Architecture?
    • …
    ??

    View full-size slide

  22. 2 Open Source

    View full-size slide

  23. Soluções compartilhadas
    para
    problemas comuns

    View full-size slide

  24. Open Source Seu código
    Webapp XYZ

    View full-size slide

  25. Open Source Seu código
    Snowflake CO.

    View full-size slide

  26. npm
    bower
    ender
    volo
    component
    jam
    duo
    spm
    jspm

    ಠ_ಠ

    View full-size slide

  27. “I find it frustrating and hypocritical to hear, “This is a great
    time to get involved for people who are interested in helping to
    shape this project…” from people who chose not to get
    involved–rather, choosing to do something on their own.“
    Patrick Masson - Joiners, Not Starters
    http:/
    /pmasson.wordpress.com/2013/10/16/joiners-not-starters/

    View full-size slide

  28. “[…]my point is simply, before starting a new open
    source project, please look for one to join.”
    Patrick Masson - Joiners, Not Starters
    http:/
    /pmasson.wordpress.com/2013/10/16/joiners-not-starters/

    View full-size slide

  29. Disrupção e fragmentação
    precisam
    convergir em algum momento

    View full-size slide

  30. • Rails & Merb

    View full-size slide

  31. • Rails & Merb
    • rvm vs rbenv vs chruby

    View full-size slide

  32. • Rails & Merb
    • rvm vs rbenv vs chruby
    • RubySpec

    View full-size slide

  33. (não é que novos projetos não são bem vindos…)

    View full-size slide

  34. Open Source não é
    só código

    View full-size slide

  35. • Bug reports & troubleshooting

    View full-size slide

  36. • Bug reports & troubleshooting
    • Documentação

    View full-size slide

  37. • Bug reports & troubleshooting
    • Documentação
    • Tutoriais, exemplos e wikis

    View full-size slide

  38. • Bug reports & troubleshooting
    • Documentação
    • Tutoriais, exemplos e wikis
    • Mailing Lists & Stack Overflow

    View full-size slide

  39. “Don't feel guilty about not
    contributing to open source"
    Julia Evans
    http:/
    /jvns.ca/blog/2014/04/26/i-dont-feel-guilty-about-not-contributing-to-open-source/

    View full-size slide

  40. 3 Abstrações
    & Frameworks

    View full-size slide

  41. “f**k jQuery, Zepto or any others javascript frameworks!”
    Todo mundo, em algum momento

    View full-size slide

  42. ❤ jQuery ❤

    View full-size slide

  43. DOM
    jQuery
    seu código

    View full-size slide

  44. DOM
    jQuery
    seu código
    browser, webserver, OSs,…

    View full-size slide

  45. DOM
    jQuery
    seu código
    Promises

    View full-size slide

  46. ❤ Promises/A+ ❤

    View full-size slide

  47. DOM
    jQuery
    seu código
    Promises
    Service Workers

    View full-size slide

  48. DOM
    jQuery
    seu código
    Promises
    Generators

    View full-size slide

  49. DOM
    jQuery
    seu código
    Promises

    View full-size slide

  50. DOM
    jQuery
    seu código
    Promises


    View full-size slide

  51. DOM
    jQuery
    Promises



    View full-size slide

  52. “It's our job as modern programmers not to abandon
    abstractions due to these deficiencies, but to embrace the
    useful elements of them, to adapt the working parts and
    construct ever so slightly less leaky and broken abstractions
    over time. “
    Jeff Atwood - All Abstractions Are Failed Abstractions
    http:/
    /blog.codinghorror.com/all-abstractions-are-failed-abstractions/

    View full-size slide

  53. Does this make our code at least a little easier:
    • to write?
    • To understand?
    • To troubleshoot?
    • Are we better off with this than we were without it?
    Jeff Atwood - All Abstractions Are Failed Abstractions
    http:/
    /blog.codinghorror.com/all-abstractions-are-failed-abstractions/

    View full-size slide

  54. “When you decide to not pick a public framework, you will end
    up with a framework anyway: your own.”
    “If you don't pick a public framework, you should commit to
    building one on purpose, not by accident”
    Ryan Florence
    http:/
    /blog.ryanflorence.com/you-cant-not-have-a-framework.html

    View full-size slide

  55. Difícil deve se tornar fácil
    e
    fácil deve se tornar trivial

    View full-size slide

  56. • Proteção contra CSRF
    • SQL Injection
    • Compressão
    • Connection Pooling
    • XSS
    • …

    View full-size slide

  57. • Eventos
    • AJAX
    • Feature detection
    • Date/Time (╯°□°)╯︵ ┻━┻
    • …

    View full-size slide

  58. • Package Manager?
    • Module Loader?
    • MVC Framework?
    • Test Framework?
    • Task Runner?
    • CSS Architecture?
    • …

    View full-size slide

  59. •Module Loader?

    View full-size slide

  60. • Package Manager?
    • Module Loader?
    • MVC Framework?
    • Test Framework?
    • Task Runner?
    • CSS Architecture?
    • …

    View full-size slide

  61. 4 Comunidades

    View full-size slide

  62. Rails não é uma ilha

    View full-size slide

  63. Nenhum desenvolvedor é uma ilha

    View full-size slide

  64. Nenhuma comunidade é uma ilha

    View full-size slide

  65. Tem muita coisa legal
    rolando por aí

    View full-size slide

  66. Elixir
    Go
    Scala
    Ruby
    Python
    Clojure
    Rust
    Swift

    View full-size slide

  67. Obrigado!
    https:/
    /twitter.com/lucasmazza
    https:/
    /speakerdeck.com/lucas

    View full-size slide