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

The Future of Rails

The Future of Rails

A talk about the future of Rails and the future of Rails developers, written for junior developers studying at RMIT.

Be66f1ccc28a6a3dfb248454b8513b17?s=128

Ryan Bigg

April 30, 2018
Tweet

Transcript

  1. Mentor / Author / Developer

  2. None
  3. PART ONE

  4. None
  5. None
  6. ISN’T RAILS THE FUTURE OF RAILS AS YOU KNOW IT

    TODAY
  7. None
  8. None
  9. A browser Database Backend App Models Rails App In the

    past…
  10. None
  11. A browser JS App Database Frontend App Backend App Models

    Rails App Now…
  12. COMMUNICATION A browser JS App Models Database Rails App ???

  13. A browser JS App Models Database Rails App REST +

    JSON API /api/posts /api/comments … Currently… JSON APIs
  14. GET /api/posts/1 { "id": 1, "title": "Hello World", "body": "This

    is my blog's first post." "author": "Ryan Bigg" } JSON APIs
  15. GET /api/posts/1/comments [ { text: "Great first post!", by: "Totally

    not Ryan" }, ... ] JSON APIs
  16. A browser JS App Models Database Rails App REST +

    JSON API /api/posts /api/comments … Currently… JSON APIs Need to build lots of these…
  17. EVERYONE DOES THIS

  18. EVEN FACEBOOK

  19. Well… they did

  20. A browser JS App Models Database Rails App /graphql Now…

    GRAPHQL Only one endpoint (born 2012)
  21. POST /graphql query postQuery { post(id: 1) { id title

    body author comments { text by } } } { "data": { "post": { "id": 1, "title": "Hello World", "body": "First post!”, "author": "Ryan Bigg", "comments": [ { text: "Great first post!", by: "Totally not Ryan" }, ... ] } } } Query Response GRAPHQL
  22. POST /graphql query postQuery { post(id: 1) { id title

    body author comments { text by } } } { "data": { "post": { "id": 1, "title": "Hello World", "author": "Ryan Bigg", "comments": [ { text: "Great first post!", by: "Totally not Ryan" }, ... ] } } } Query Response GRAPHQL
  23. POST /graphql query commentQuery { comment(id: 1) { text user

    } } { "data": { “comment”: { text: "Great first post!", user: "Totally not Ryan” } } } Query Response GRAPHQL
  24. GRAPHQL IS THE FUTURE

  25. GRAPHQL IS THE FUTURE (or at least, it seems like

    it)
  26. THE FUTURE OF RAILS Frontend + Backend apps talking over

    GraphQL
  27. None
  28. END PART ONE

  29. PART TWO

  30. None
  31. RAILS IS ALWAYS CHANGING

  32. Then… Now…

  33. THE NEW SHINY IS ALWAYS CHANGING

  34. JSON GRAPHQL APIs APIs

  35. RAILS IS JUST A TOOL

  36. APIs ARE A CONCEPT

  37. THERE ARE INFINITY THINGS TO LEARN

  38. FOCUS ON CONCEPTS
 NOT TOOLS

  39. { name: “Ryan”, age: 30 } %{ name: “Ryan”, age:

    30 } Ruby Elixir
  40. h = { name: “Ryan” } if h.has_key?(:name) puts “Name:

    #{h[:name]}” else puts “name is not present” end Ruby Elixir fn %{name: name} -> IO.puts(“name: #{name}”) _ -> IO.puts(“name is not present”) end
  41. CONCEPTS
 SPAN TOOLS

  42. What is a funcFon?

  43. How do pages load?

  44. /graphql is returning an HTTP 500 status code Why?

  45. The app stopped responding.

  46. CPU usage is high. Can you find out why?

  47. What is “clean code”?

  48. Is this “clean code”?

  49. What do other developers consider “best pracFce”?

  50. Follow the code.

  51. ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ………………………………………………………………………………………………………………

    ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… Test the code.
  52. END PART TWO

  53. ✉: me@ryanbigg.com Thanks! : @ryanbigg ▶: h?p:/ /bit.ly/radar-for

  54. h?ps:/ /developer.github.com/v3/ API Examples REST + JSON h?ps:/ /developer.github.com/v4/ GRAPHQL

  55. h?ps:/ /www.howtographql.com/ Learn these: GraphQL h?ps:/ /reactjs.org/tutorial/tutorial.html React

  56. h?ps:/ /www.sandimetz.com/99bo?les/ Read these: 99 BOTTLES h?ps:/ /www.poodr.com PRACTICAL OBJECT-ORIENTED

    DESIGN IN RUBY
  57. h?ps:/ /joyofelixir.com Learn Elixir from scratch!

  58. h?ps:/ /speakerdeck.com/radar/exploding-rails h?ps:/ /leanpub.com/exploding-rails Exploding Rails h?ps:/ /github.com/radar/twist-v2 MY EXAMPLE

    APPLICATION