SlideShare a Scribd company logo
Hardcore!



Tuesday, June 15, 2010
- Dave Thomas



Tuesday, June 15, 2010
core

Tuesday, June 15, 2010
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
Rails 2


Tuesday, June 15, 2010
I started exploring
                         alternatives to Rails



Tuesday, June 15, 2010
!

Tuesday, June 15, 2010
HISS!!!
                             jason seifer
                         YouTube search: rails vs. django


Tuesday, June 15, 2010
December 23rd, 2008




Tuesday, June 15, 2010
Tuesday, June 15, 2010
+   =


                                 RAILS 3



Tuesday, June 15, 2010
What makes
                         Rails 3 amazing?
                         (and why did it take so long?)



Tuesday, June 15, 2010
“THE GREAT
                         DECOUPLING”


Tuesday, June 15, 2010
Tuesday, June 15, 2010
Core components
                         are easily customizable.




Tuesday, June 15, 2010
Core components
                         are easily replaceable.



                                         OO
Tuesday, June 15, 2010
LET’S EXPLORE
                SOME RAILS CORE
                         FOR THE SAKE OF KNOWING!




Tuesday, June 15, 2010
THE RAILS STACK

                                      Network

                                       Rack

                                      Railties

                                  ActionDispatch

                                 ActionController

                         ActionView              ActiveModel

Tuesday, June 15, 2010
LET’S DO
                    USELESS THINGS


Tuesday, June 15, 2010
Take this code with
                           a grain of salt




Tuesday, June 15, 2010
Let’s write a useless
                   DSL for our views.
                         WRITING A TEMPLATE HANDLER



Tuesday, June 15, 2010
WRITING A TEMPLATE HANDLER




Tuesday, June 15, 2010
WRITING A TEMPLATE HANDLER




Tuesday, June 15, 2010
WHAT ACTION VIEW EXPECTS




Tuesday, June 15, 2010
Tuesday, June 15, 2010
Tuesday, June 15, 2010
Tuesday, June 15, 2010
MAKING THE DSL




Tuesday, June 15, 2010
my_cool_dsl.rb

Tuesday, June 15, 2010
my_cool_handler.rb




Tuesday, June 15, 2010
views/hello/index.cool




Tuesday, June 15, 2010
http://localhost:3000/hello




Tuesday, June 15, 2010
Let’s accept useless
                    connections.
                         WRITING A “TELNET SERVER”




Tuesday, June 15, 2010
A simple way.
                         ACT LIKE A RACK SERVER




Tuesday, June 15, 2010
TALK LIKE A RACK SERVER




                                telnet_server.rb


Tuesday, June 15, 2010
my_cool_handler.rb




Tuesday, June 15, 2010
z




                             my_cool_dsl.rb

Tuesday, June 15, 2010
Tuesday, June 15, 2010
CONSISTENCY!

Tuesday, June 15, 2010
hello_controller.rb    views/hello/index.cool




                         via telnet             via browser



Tuesday, June 15, 2010
DRY!

Tuesday, June 15, 2010
Let’s make this
                          uselessness
                          configurable.
                         WORKING WITH RAILTIES


Tuesday, June 15, 2010
WHAT IS A RAILTIE?
                      The interface between the
                Rails framework and its components




Tuesday, June 15, 2010
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
Organized!




Tuesday, June 15, 2010
railtie.rb




Tuesday, June 15, 2010
lib/super_cool/view_dsl.rb




Tuesday, June 15, 2010
config/application.rb




Tuesday, June 15, 2010
Results!

Tuesday, June 15, 2010
Let’s let others be just
                 as useless.
                                MAKING THIS A
                         DISTRIBUTABLE FRAMEWORK



Tuesday, June 15, 2010
ANATOMY OF OUR GEM




Tuesday, June 15, 2010
ANATOMY OF OUR GEM




Tuesday, June 15, 2010
package it with the usual tools...




Tuesday, June 15, 2010
Tuesday, June 15, 2010
IRC bot framework
                                             Modular enterprise app

                              FOOD FOR THOUGHT
                   MUD game framework
                                             Modular view system

                             A pluggable admin panel



Tuesday, June 15, 2010
RESOURCES

                         http://github.com/rails/rails
                         bundle open rails
                         bundle open actionpack
                         bundle open ... etc ...
                         http://railsapi.com/



Tuesday, June 15, 2010
RAILS CODE IS GOOD CODE




Tuesday, June 15, 2010
RAILS CODE IS REUSABLE CODE




Tuesday, June 15, 2010
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
Be inspired to look where
                         you might’ve not looked before

                                 and learn!



Tuesday, June 15, 2010
Thanks!

                               twitter @digx
                                     +
                         rick.martinez@gmail.com




Tuesday, June 15, 2010

More Related Content

Similar to Hardcore Extending Rails 3 - From RailsConf '10

Drupal In The Cloud
Drupal In The CloudDrupal In The Cloud
Drupal In The Cloud
Chapter Three
 
Please Don't Touch the Slow Parts V2
Please Don't Touch the Slow Parts V2Please Don't Touch the Slow Parts V2
Please Don't Touch the Slow Parts V2
Federico Galassi
 
Mobile JavaScript Development - QCon 2010
Mobile JavaScript Development - QCon 2010Mobile JavaScript Development - QCon 2010
Mobile JavaScript Development - QCon 2010
Nikolai Onken
 
Data Drives Decisions
Data Drives DecisionsData Drives Decisions
Data Drives Decisions
Chris Sietsema
 
Cutting Edge CSS3 @ WebExpo Tour 2010
Cutting Edge CSS3 @ WebExpo Tour 2010Cutting Edge CSS3 @ WebExpo Tour 2010
Cutting Edge CSS3 @ WebExpo Tour 2010
Zi Bin Cheah
 
Layar event US introduction and cases
Layar event US introduction and casesLayar event US introduction and cases
Layar event US introduction and cases
Layar
 
The Limited Red Society
The Limited Red SocietyThe Limited Red Society
The Limited Red Society
Naresh Jain
 
CrossMark Sneak Peek 2010 CrossRef Workshops
CrossMark Sneak Peek 2010 CrossRef WorkshopsCrossMark Sneak Peek 2010 CrossRef Workshops
CrossMark Sneak Peek 2010 CrossRef WorkshopsCrossref
 
Caelum dicas web 2010
Caelum dicas web 2010Caelum dicas web 2010
Caelum dicas web 2010
Fabio Akita
 
The Marshmellow challenge - esercizio di teambuilding
The Marshmellow challenge - esercizio di teambuildingThe Marshmellow challenge - esercizio di teambuilding
The Marshmellow challenge - esercizio di teambuilding
Irene Morrione
 
Marhmallow game presentation
Marhmallow game presentationMarhmallow game presentation
Marhmallow game presentation
연 허
 
Elretodelanube conclusiones
Elretodelanube conclusionesElretodelanube conclusiones
Elretodelanube conclusionessalesatocha
 
Real-Time Everything - the Era of Communication Ubiquity
Real-Time Everything - the Era of Communication UbiquityReal-Time Everything - the Era of Communication Ubiquity
Real-Time Everything - the Era of Communication Ubiquity
Rob Gonda
 
iCrossing client event - You & Your Web Shadow
iCrossing client event - You & Your Web ShadowiCrossing client event - You & Your Web Shadow
iCrossing client event - You & Your Web Shadow
Antony Mayfield
 
Sketching for Design - Guest Lecture
Sketching for Design - Guest LectureSketching for Design - Guest Lecture
Sketching for Design - Guest LectureAhmed Riaz
 
Mastering CSS3 Selectors
Mastering CSS3 SelectorsMastering CSS3 Selectors
Mastering CSS3 Selectors
Rachel Andrew
 
TwitCasting Asian Tech Night
TwitCasting Asian Tech NightTwitCasting Asian Tech Night
TwitCasting Asian Tech Nightyoski
 
Melvin Vivas' talk at Phil. Tech Startups Meetup
Melvin Vivas' talk at Phil. Tech Startups MeetupMelvin Vivas' talk at Phil. Tech Startups Meetup
Melvin Vivas' talk at Phil. Tech Startups Meetup
Melvin Dave Vivas
 

Similar to Hardcore Extending Rails 3 - From RailsConf '10 (20)

Drupal In The Cloud
Drupal In The CloudDrupal In The Cloud
Drupal In The Cloud
 
Please Don't Touch the Slow Parts V2
Please Don't Touch the Slow Parts V2Please Don't Touch the Slow Parts V2
Please Don't Touch the Slow Parts V2
 
Mobile JavaScript Development - QCon 2010
Mobile JavaScript Development - QCon 2010Mobile JavaScript Development - QCon 2010
Mobile JavaScript Development - QCon 2010
 
Data Drives Decisions
Data Drives DecisionsData Drives Decisions
Data Drives Decisions
 
Cutting Edge CSS3 @ WebExpo Tour 2010
Cutting Edge CSS3 @ WebExpo Tour 2010Cutting Edge CSS3 @ WebExpo Tour 2010
Cutting Edge CSS3 @ WebExpo Tour 2010
 
Layar event US introduction and cases
Layar event US introduction and casesLayar event US introduction and cases
Layar event US introduction and cases
 
The Limited Red Society
The Limited Red SocietyThe Limited Red Society
The Limited Red Society
 
CrossMark Sneak Peek 2010 CrossRef Workshops
CrossMark Sneak Peek 2010 CrossRef WorkshopsCrossMark Sneak Peek 2010 CrossRef Workshops
CrossMark Sneak Peek 2010 CrossRef Workshops
 
Caelum dicas web 2010
Caelum dicas web 2010Caelum dicas web 2010
Caelum dicas web 2010
 
Ruby off Rails
Ruby off RailsRuby off Rails
Ruby off Rails
 
The Marshmellow challenge - esercizio di teambuilding
The Marshmellow challenge - esercizio di teambuildingThe Marshmellow challenge - esercizio di teambuilding
The Marshmellow challenge - esercizio di teambuilding
 
Marhmallow game presentation
Marhmallow game presentationMarhmallow game presentation
Marhmallow game presentation
 
Elretodelanube conclusiones
Elretodelanube conclusionesElretodelanube conclusiones
Elretodelanube conclusiones
 
Real-Time Everything - the Era of Communication Ubiquity
Real-Time Everything - the Era of Communication UbiquityReal-Time Everything - the Era of Communication Ubiquity
Real-Time Everything - the Era of Communication Ubiquity
 
iCrossing client event - You & Your Web Shadow
iCrossing client event - You & Your Web ShadowiCrossing client event - You & Your Web Shadow
iCrossing client event - You & Your Web Shadow
 
Sketching for Design - Guest Lecture
Sketching for Design - Guest LectureSketching for Design - Guest Lecture
Sketching for Design - Guest Lecture
 
Mastering CSS3 Selectors
Mastering CSS3 SelectorsMastering CSS3 Selectors
Mastering CSS3 Selectors
 
27 development
27 development27 development
27 development
 
TwitCasting Asian Tech Night
TwitCasting Asian Tech NightTwitCasting Asian Tech Night
TwitCasting Asian Tech Night
 
Melvin Vivas' talk at Phil. Tech Startups Meetup
Melvin Vivas' talk at Phil. Tech Startups MeetupMelvin Vivas' talk at Phil. Tech Startups Meetup
Melvin Vivas' talk at Phil. Tech Startups Meetup
 

Recently uploaded

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

Hardcore Extending Rails 3 - From RailsConf '10