Hardcore Extending Rails 3 - From RailsConf '10

  • 2,617 views
Uploaded on

Rick Martinez's presentation on some useless, but inspiring, ways to extend Rails 3.

Rick Martinez's presentation on some useless, but inspiring, ways to extend Rails 3.

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
2,617
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
30
Comments
1
Likes
6

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Hardcore! Tuesday, June 15, 2010
  • 2. - Dave Thomas Tuesday, June 15, 2010
  • 3. core Tuesday, June 15, 2010
  • 4. Duck Typing "when I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck." Tuesday, June 15, 2010
  • 5. Rails 2 Tuesday, June 15, 2010
  • 6. I started exploring alternatives to Rails Tuesday, June 15, 2010
  • 7. ! Tuesday, June 15, 2010
  • 8. HISS!!! jason seifer YouTube search: rails vs. django Tuesday, June 15, 2010
  • 9. December 23rd, 2008 Tuesday, June 15, 2010
  • 10. Tuesday, June 15, 2010
  • 11. + = RAILS 3 Tuesday, June 15, 2010
  • 12. What makes Rails 3 amazing? (and why did it take so long?) Tuesday, June 15, 2010
  • 13. “THE GREAT DECOUPLING” Tuesday, June 15, 2010
  • 14. Tuesday, June 15, 2010
  • 15. Core components are easily customizable. Tuesday, June 15, 2010
  • 16. Core components are easily replaceable. OO Tuesday, June 15, 2010
  • 17. LET’S EXPLORE SOME RAILS CORE FOR THE SAKE OF KNOWING! Tuesday, June 15, 2010
  • 18. THE RAILS STACK Network Rack Railties ActionDispatch ActionController ActionView ActiveModel Tuesday, June 15, 2010
  • 19. LET’S DO USELESS THINGS Tuesday, June 15, 2010
  • 20. Take this code with a grain of salt Tuesday, June 15, 2010
  • 21. Let’s write a useless DSL for our views. WRITING A TEMPLATE HANDLER Tuesday, June 15, 2010
  • 22. WRITING A TEMPLATE HANDLER Tuesday, June 15, 2010
  • 23. WRITING A TEMPLATE HANDLER Tuesday, June 15, 2010
  • 24. WHAT ACTION VIEW EXPECTS Tuesday, June 15, 2010
  • 25. Tuesday, June 15, 2010
  • 26. Tuesday, June 15, 2010
  • 27. Tuesday, June 15, 2010
  • 28. MAKING THE DSL Tuesday, June 15, 2010
  • 29. my_cool_dsl.rb Tuesday, June 15, 2010
  • 30. my_cool_handler.rb Tuesday, June 15, 2010
  • 31. views/hello/index.cool Tuesday, June 15, 2010
  • 32. http://localhost:3000/hello Tuesday, June 15, 2010
  • 33. Let’s accept useless connections. WRITING A “TELNET SERVER” Tuesday, June 15, 2010
  • 34. A simple way. ACT LIKE A RACK SERVER Tuesday, June 15, 2010
  • 35. TALK LIKE A RACK SERVER telnet_server.rb Tuesday, June 15, 2010
  • 36. my_cool_handler.rb Tuesday, June 15, 2010
  • 37. z my_cool_dsl.rb Tuesday, June 15, 2010
  • 38. Tuesday, June 15, 2010
  • 39. CONSISTENCY! Tuesday, June 15, 2010
  • 40. hello_controller.rb views/hello/index.cool via telnet via browser Tuesday, June 15, 2010
  • 41. DRY! Tuesday, June 15, 2010
  • 42. Let’s make this uselessness configurable. WORKING WITH RAILTIES Tuesday, June 15, 2010
  • 43. WHAT IS A RAILTIE? The interface between the Rails framework and its components Tuesday, June 15, 2010
  • 44. WHAT CAN YOUR RAILTIE DO? • Allow you to accept configuration from application.rb • Set up initializers in your extension’s context • Tell Rails about generators and rake tasks • Build engines, plugins, and applications Engines, plugins, and applications are all subclasses of Railtie in Rails 3 Tuesday, June 15, 2010
  • 45. Organized! Tuesday, June 15, 2010
  • 46. railtie.rb Tuesday, June 15, 2010
  • 47. lib/super_cool/view_dsl.rb Tuesday, June 15, 2010
  • 48. config/application.rb Tuesday, June 15, 2010
  • 49. Results! Tuesday, June 15, 2010
  • 50. Let’s let others be just as useless. MAKING THIS A DISTRIBUTABLE FRAMEWORK Tuesday, June 15, 2010
  • 51. ANATOMY OF OUR GEM Tuesday, June 15, 2010
  • 52. ANATOMY OF OUR GEM Tuesday, June 15, 2010
  • 53. package it with the usual tools... Tuesday, June 15, 2010
  • 54. Tuesday, June 15, 2010
  • 55. IRC bot framework Modular enterprise app FOOD FOR THOUGHT MUD game framework Modular view system A pluggable admin panel Tuesday, June 15, 2010
  • 56. RESOURCES http://github.com/rails/rails bundle open rails bundle open actionpack bundle open ... etc ... http://railsapi.com/ Tuesday, June 15, 2010
  • 57. RAILS CODE IS GOOD CODE Tuesday, June 15, 2010
  • 58. RAILS CODE IS REUSABLE CODE Tuesday, June 15, 2010
  • 59. And the more use cases you find for customizing Rails 3 internals, the better they will be written in the future Tuesday, June 15, 2010
  • 60. Be inspired to look where you might’ve not looked before and learn! Tuesday, June 15, 2010
  • 61. Thanks! twitter @digx + rick.martinez@gmail.com Tuesday, June 15, 2010