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

The War is Over: Rails, JavaScript and Webpacker

Jhun de Andres
April 19, 2018
150

The War is Over: Rails, JavaScript and Webpacker

Jhun de Andres

April 19, 2018
Tweet

Transcript

  1. I’m Jhun ( you can call me yung-jhun thats what

    my friends call me ) Jhun de Andres | RailsConf 2018 Jhun de Andres | RailsConf 2018
  2. I’m Jhun github.com/ joshuajhun twitter.com/ joshuajhun instagram.com/ joshuajhun Founding Instructor

    @Turing School of Software & Design FEE Jhun de Andres | RailsConf 2018 Jhun de Andres | RailsConf 2018
  3. Goalz for today: - Developer understands the benefits of Webpacker

    - Developers will not throw Jhun de Andres | RailsConf 2018
  4. Goalz for today: - Developer understands the benefits of Webpacker

    - Developers will not throw tomatoes at me when Jhun de Andres | RailsConf 2018
  5. Goalz for today: - Developer understands the benefits of Webpacker

    - Developers will not throw tomatoes at me when JS comes up on the screen Jhun de Andres | RailsConf 2018
  6. Goalz for today: - Developer understands the benefits of Webpacker

    - Developers will not throw tomatoes at me when JS comes up on the screen Jhun de Andres | RailsConf 2018
  7. Goalz for today: - Developer understands the benefits of Webpacker

    - Developers will not throw tomatoes at me when JS comes up on the screen - Developers will see testing JS isn’t as bad as they think Jhun de Andres | RailsConf 2018
  8. Warmup question ( plz pull out a notebook and pen

    and get ready to write! ) Jhun de Andres | RailsConf 2018
  9. What are some of the frustrations you have with javascript

    inside of rails? Jhun de Andres | RailsConf 2018
  10. What are some of the frustrations you have with javascript

    inside of rails? Answers like “cuz it sucks” is not constructive! Dig deep Jhun de Andres | RailsConf 2018
  11. What are some of the frustrations you have with javascript

    inside of rails? Answers like “cuz it sucks” is not constructive! Dig deep Jhun de Andres | RailsConf 2018
  12. Turn to the person next to you and share what

    you wrote! Jhun de Andres | RailsConf 2018
  13. Turn to the person next to you and share what

    you wrote! Jhun de Andres | RailsConf 2018
  14. Turn to the person next to you and share what

    you wrote! Jhun de Andres | RailsConf 2018
  15. Top answers: - JS testing - JS errors - Adding

    Modules Jhun de Andres | RailsConf 2018
  16. Take 5 minutes and talk to the person next to

    you about how you’ve tested your JS / UI in the past. What made that process particularly difficult? Jhun de Andres | RailsConf 2018
  17. Take 5 minutes and talk to the person next to

    you about how you’ve tested your JS / UI in the past. What made that process particularly difficult? ( Answers like “IDK I just did it” is not constructive! Dig deep ) Jhun de Andres | RailsConf 2018
  18. Take 5 minutes and talk to the person next to

    you about how you’ve tested your JS / UI in the past. What made that process particularly difficult? ( Answers like “IDK I just did it” is not constructive! Dig deep ) Jhun de Andres | RailsConf 2018
  19. The single most important thing web packer gives us is

    the ability to unit test our JS Jhun de Andres | RailsConf 2018
  20. The single most important thing web packer gives us is

    the ability to unit test our JS Jhun de Andres | RailsConf 2018
  21. Unit Tests: - They’re so fast! - Actual opportunity to

    refactor. - It forces us to understand the technologies we're using. - They're cheap especially if your functions are input output. Jhun de Andres | RailsConf 2018
  22. Wait. Does that mean the I shouldn’t use the Asset

    Pipeline? Jhun de Andres | RailsConf 2018
  23. Wait. Does that mean the I shouldn’t use the Asset

    Pipeline? Jhun de Andres | RailsConf 2018
  24. Asset Pipeline: - Concatenates - Minifies - Allows for uses

    of abstract languages Jhun de Andres | RailsConf 2018
  25. Based on the scale of your app that might be

    enough. Jhun de Andres | RailsConf 2018
  26. Webpack: - Entry - Output - Loaders - Plugins So

    how does webpacker make my life easier? Jhun de Andres | RailsConf 2018
  27. And your user is getting mad because your app is

    slow / the page refreshed. Jhun de Andres | RailsConf 2018
  28. Some of our users might still be using this as

    a phone Jhun de Andres | RailsConf 2018
  29. Some of our users might still be using this as

    a phone Jhun de Andres | RailsConf 2018
  30. Some of our users might still be using this as

    a phone Jhun de Andres | RailsConf 2018
  31. Some of our users might still be using this as

    a phone Jhun de Andres | RailsConf 2018
  32. Some of our users might still be using this as

    a phone Jhun de Andres | RailsConf 2018
  33. Some of our users might still be using this as

    a phone Jhun de Andres | RailsConf 2018
  34. Some of our users might still be using this as

    a phone Jhun de Andres | RailsConf 2018
  35. Attention Span 0 3 6 9 12 Human (2017) Gold

    Fish Human (2000) 0 seconds 0 seconds 0 seconds Source: Hosting Facts Jhun de Andres | RailsConf 2018
  36. Attention Span 0 3 6 9 12 Human (2017) Gold

    Fish Human (2000) 12 seconds 9 seconds 8 seconds Attention Span 0 3 6 9 12 Human (2017) Gold Fish Human (2000) 12 seconds 9 seconds 8 seconds Source: Hosting Facts Jhun de Andres | RailsConf 2018
  37. Internet Traffic Mobile (2017) Mobile (2016) Desktop (2017) 0 15

    30 45 60 0% 0% 0% Source: Hosting Facts Jhun de Andres | RailsConf 2018
  38. Internet Traffic Mobile (2017) Mobile (2016) Desktop (2017) 0 15

    30 45 60 47.79% 42.16% 52% Internet Traffic Mobile (2017) Mobile (2016) Desktop (2017) 0 15 30 45 60 47.79% 42.16% 52% Source: Hosting Facts Jhun de Andres | RailsConf 2018
  39. Internet Traffic Mobile (2017) Mobile (2016) Desktop (2017) 0 15

    30 45 60 47.79% 42.16% 52% Internet Traffic Mobile (2017) Mobile (2016) Desktop (2017) 0 15 30 45 60 47.79% 42.16% 52% Source: Hosting Facts There are more mobile Internet users than desktop Internet users. There are 3.5 billion global mobile Internet users as of August 2017. “ Jhun de Andres | RailsConf 2018
  40. Before we do that I want to mention that a

    lot of this is possible because of Jhun de Andres | RailsConf 2018
  41. Before we do that I want to mention that a

    lot of this is possible because of Jhun de Andres | RailsConf 2018
  42. Before we do that I want to mention that a

    lot of this is possible because of Jhun de Andres | RailsConf 2018
  43. enzyme - test utility that makes it a lot easier

    to traverse the virtual dom. Jhun de Andres | RailsConf 2018