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

Not Invented Here: Things Rails Didn't Innovate

Not Invented Here: Things Rails Didn't Innovate

Rails is a mixture of design patterns, practices, and magic. In this talk, we'll explore how Rails embraces ideas from other frameworks and projects.

Active Record was born of Martin Fowler. MVC was the brainchild of Trygve Reenskaug. Rails 3 completely absorbed the Merb project, gaining modularity and extensibility that it previously lacked.

We all learn by standing on the shoulders of giants, even Rails. By understanding the inception of design patterns, we are more likely to be able to create ideas of our own. This helps us to not only grow in our own ability, but to help others improve as well.

Video of the talk at Scottish Ruby Conf: http://programme2014.scottishrubyconference.com/proposals/5/video


Caleb Hearth

May 12, 2014

More Decks by Caleb Hearth

Other Decks in Programming


  1. Things Rails Didn’t Innovate Not Invented Here

  2. Caleb Thompson

  3. We'll talk a bit about Rails

  4. But that's my elevator pitch

  5. The point:

  6. You can be more effective

  7. at your job

  8. by not innovating

  9. Rails didn’t really invent much at all.

  10. Its success is just a matter of execution and delivery

  11. Not that sort of execution.

  12. Great ideas brought together in new ways

  13. How we got here

  14. None
  15. None
  16. http://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Ridgeway_mongwell.jpg/800px-Ridgeway_mongwell.jpg

  17. None
  18. None
  19. http://www.rottentomatoes.com/m/paul_blart_mall_cop/news/1791902/box_office_guru_wrapup_paul_blart_segways_ahead_of_the_competition/

  20. http://www.deccanchronicle.com/130501/sports-motor-sports/gallery/sportstars-and-their-four-wheeled-chariots

  21. http://www.bigredcollective.com/corduroy-road-1

  22. http://upload.wikimedia.org/wikipedia/commons/6/63/AlaskaHWY.JPG

  23. http://www.dailymail.co.uk/sciencetech/article-2218396/The-modern-Stone-Age-familys-cutlery-Designers-recreate-ancient-tools-using-modern-materials-techniques.html

  24. http://huskertim27.deviantart.com/art/Minotaur-road-rage-260878537

  25. http://vimeo.com/43222290

  26. http://nplusonemag.tumblr.com/post/27919786178/neither-snow-nor-rain-nor-heat-nor-gloom-of-night

  27. None
  28. http://seekingsantosha.wordpress.com/2012/10/19/all-roads-lead-to-rome/

  29. http://www.kotaku.com.au/2011/01/the-greek-engineer-who-invented-the-steam-engine-2000-years-ago/

  30. http://mygermantravels.com/2010/12/frankfurt-trains-%E2%80%93-an-autobahn-alternative/

  31. http://en.wikipedia.org/wiki/File:Polar_Bear_-_Alaska.jpg

  32. http://compellingparade.com/2011/09/i-think-i-can/

  33. http://redfox.typepad.com/forest/2009/11/fashion-and-geography.html

  34. http://www.mrwallpaper.com/paris-eiffel-tower-wallpaper/

  35. http://www.spacex.com/hyperloop

  36. Haha, what?

  37. They weren’t reinventing the wheel

  38. Rails stole ideas

  39. ...but which ones?

  40. What do we think of when we think Rails?

  41. Model View Controller was conceived as a general solution to

    the problem of developers controlling a large and complex data set.
  42. The essential purpose of MVC is to bridge the gap

    between the human user's mental model and the digital model that exists in the computer. Trygve Reenscrag XEROX PARC 1978-79
  43. Active Record The mapping between database tables and business logic

    in applications happens in
  44. An object that wraps a row in a database table

    or view, encapsulates the database access, and adds domain logic on that data. Martin Fowler Patterns of Enterprise Application Architecture (November 15, 2002)
  45. REpresentational State Transfer is a uniform interface for the web

  46. This idealized model of the interactions within an overall Web

    application… became the foundation for the modern Web architecture Roy T. Fielding and Richard N. Taylor Principled Design of the Modern Web Architecture (2002)
  47. Rails didn’t invent REST

  48. Convention over Configuration seeks to decrease the number of decisions

    that developers need to make, gaining simplicity, but not necessarily losing flexibility.
  49. defaults JavaBeans config files

  50. ERB provides an easy to use but powerful templating system

    for Ruby.
  51. None
  52. Merb • asset pipeline • extension api • parameter whitelisting

    and blacklisting (strong_parameters) • ORM / JavaScript agnostic
  53. So why is Rails so popular?

  54. http://blogs.huongngo.com/dds/2010/11/15/monday-november-15/

  55. Execution is crazy important

  56. Presentation is key

  57. What can we learn from this?

  58. There is nothing wrong with taking other’s ideas

  59. Rails was built on the shoulders of giants

  60. That worked out pretty well

  61. Keep it simple.

  62. Strong, useful conventions make code easy to find and reduce

    mundane decision making
  63. Not designed by committee

  64. DHH still contributes

  65. Released in July of 2004

  66. Didn’t share commit rights until February of 2005

  67. strong_parameters

  68. turbolinks

  69. turbolinks (not a popular decision)

  70. While we may not always agree with him

  71. It doesn’t matter; he’s doing it anyways

  72. While this can be frustrating, you can’t argue with success

  73. None
  74. What can we take from this?

  75. Take ideas

  76. I know you want to build.

  77. Interesting problems are fun to solve

  78. but they already have been

  79. Don't be seduced by the problem

  80. You are trying to get something out the door

  81. Read Code

  82. Know what you can steal.

  83. Buy for parity build for competitive advantage

  84. 123 Main St Anytown, MA 12345

  85. 123 Main St Apartment #5 Anytown, MA 12345

  86. 123 Main St Basement Anytown, MA 12345

  87. c/o somebody else 123 Main St Anytown, MA 12345

  88. Bank of Canada 234 Laurier Avenue West Ottawa, Ontario, Canada

    K1A 0G9
  89. Crieff Hydro Strathearn House Ferntower Road Crieff PERTHSHIRE PH7 3LQ

  90. Caleb Thompson FNBA Downtown branch Downtown, Anchorage, Alaska

  91. Caleb Thompson FNBA Downtown branch Downtown, Anchorage, Alaska

  92. http://theunboundedspirit.com/holy-madness-and-insanity/

  93. Are you going to have a better idea than Fielding

    had about REST?
  94. maybe

  95. probably not

  96. Take ideas

  97. But don’t take it from me

  98. None
  99. Thank you.

  100. Caleb Thompson @thompson_caleb calebthompson caleb@calebthompson.io

  101. Don’t just sit there. Learn Something. learn.thoughtbot.com SCOTRUBY14 for 30%

    off a Learn Prime subscription