SlideShare a Scribd company logo
1 of 61
Download to read offline
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

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 V2Federico Galassi
 
Mobile JavaScript Development - QCon 2010
Mobile JavaScript Development - QCon 2010Mobile JavaScript Development - QCon 2010
Mobile JavaScript Development - QCon 2010Nikolai Onken
 
Cutting Edge CSS3 @ WebExpo Tour 2010
Cutting Edge CSS3 @ WebExpo Tour 2010Cutting Edge CSS3 @ WebExpo Tour 2010
Cutting Edge CSS3 @ WebExpo Tour 2010Zi Bin Cheah
 
Layar event US introduction and cases
Layar event US introduction and casesLayar event US introduction and cases
Layar event US introduction and casesLayar
 
The Limited Red Society
The Limited Red SocietyThe Limited Red Society
The Limited Red SocietyNaresh 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 2010Fabio Akita
 
Marhmallow game presentation
Marhmallow game presentationMarhmallow game presentation
Marhmallow game presentation연 허
 
The Marshmellow challenge - esercizio di teambuilding
The Marshmellow challenge - esercizio di teambuildingThe Marshmellow challenge - esercizio di teambuilding
The Marshmellow challenge - esercizio di teambuildingIrene Morrione
 
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 UbiquityRob 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 ShadowAntony 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 SelectorsRachel Andrew
 
TwitCasting Asian Tech Night
TwitCasting Asian Tech NightTwitCasting Asian Tech Night
TwitCasting Asian Tech Nightyoski
 

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
 
Marhmallow game presentation
Marhmallow game presentationMarhmallow game presentation
Marhmallow game presentation
 
The Marshmellow challenge - esercizio di teambuilding
The Marshmellow challenge - esercizio di teambuildingThe Marshmellow challenge - esercizio di teambuilding
The Marshmellow challenge - esercizio di teambuilding
 
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
 
Intro to Twitter
Intro to TwitterIntro to Twitter
Intro to Twitter
 

Recently uploaded

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Recently uploaded (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

Hardcore Extending Rails 3 - From RailsConf '10