SlideShare a Scribd company logo
1 of 28
Download to read offline
coryfoy.com
Rails as a Pattern
Language
Cory Foy
@cory_foy
foyc@coryfoy.com
http://coryfoy.com
Friday, August 9, 13
coryfoy.com
Not to be confused with Ruby
(programming language).
- Wikipedia
Friday, August 9, 13
coryfoy.com
Friday, August 9, 13
coryfoy.com
“[Rails is] not a blank slate equally tolerant
of every kind of expression. On the
contrary, it trades that flexibility for the
convenience of ‘what most people need
most of the time to do most things’”
- David Heinmeier Hansson -
The Rails 3 Way
Friday, August 9, 13
coryfoy.com
Ruby on Rails, often simply Rails, is an open
source web application framework which
runs on the Ruby programming language. It
is a full-stack framework: it allows creating
pages and applications that gather
information from the web server, talk to or
query the database, and render templates
out of the box. As a result, Rails features a
routing system that is independent of the
web server.
Friday, August 9, 13
coryfoy.com
Ruby on Rails emphasizes the use of well-
known software engineering patterns and
principles, such as active record pattern,
convention over configuration (CoC), don't
repeat yourself (DRY), and model-view-
controller (MVC).
Friday, August 9, 13
coryfoy.com
Patterns
Friday, August 9, 13
coryfoy.com
Friday, August 9, 13
coryfoy.com
“The elements of this language are entities called
patterns. Each pattern describes a problem that occurs
over and over again in our environment, and then
describes the core of the solution to that problem, in
such a way that you can use this solution a million times
over, without ever doing it the same way twice.”
Christopher Alexander - “A Pattern Language”
Friday, August 9, 13
coryfoy.com
“Each pattern is a rule which describes what you have to
do to generate the entity which it defines”
Christopher Alexander - “The Timeless Way of Building”
Friday, August 9, 13
coryfoy.com
• Characteristics
• Knowledge to Build the System
• Whether it is essential to solve a problem
Friday, August 9, 13
coryfoy.com
Pattern Name
Intent
Motivation
Consequences
Implementation
Elements of a pattern
Friday, August 9, 13
coryfoy.com
Pattern Language
Friday, August 9, 13
coryfoy.com
“A pattern language is a system which allows its users to
create an infinite variety of those three dimensional
combinations of patterns which we call buildings,
gardens, towns.”
Christopher Alexander - “The Timeless Way of Building”
Friday, August 9, 13
coryfoy.com
• North South Axis
• West Facing Entrance Down the Slope
• Two Floors
• Hay Loft at the Back
• Bedrooms in Front
• Garden to the South
• Pitched Roof
• Half-Hipped End
• Balcony Toward the Garden
• Carved Ornaments
Farmhouse in Bernese Oberland
Friday, August 9, 13
coryfoy.com
Natural vs Pattern Language
Natural Language Pattern Language
Words Patterns
Rules of grammar and
meaning which give
connections
Patterns which specify
connections between
patterns
Sentences Buildings and Places
Friday, August 9, 13
coryfoy.com
“Advocates of this design approach claim that ordinary
people can use it to successfully solve very large, complex
design problems.”
Wikipedia - “Design Patterns”
Friday, August 9, 13
coryfoy.com
Design a Building
Friday, August 9, 13
coryfoy.com
Friday, August 9, 13
coryfoy.com
Design a Web
Application
Friday, August 9, 13
coryfoy.com
Friday, August 9, 13
coryfoy.comMapper
Active Record
Template View
Front Controller
Model-View Controller
Single Table Inheritance
Friday, August 9, 13
coryfoy.com
Client
Server
Transport
Friday, August 9, 13
coryfoy.com
REST
Routing
Validations
Controllers
Action View
Action Mailer
Active Record
Authentication
Session Management
Background Processing
Caching and Performance
Extending Rails with Plugins
Friday, August 9, 13
coryfoy.com
Friday, August 9, 13
coryfoy.com
MERB
Data Mapper
HAML
Interactor Pattern
NoSQL
Scaling
Friday, August 9, 13
Cory Foy (@cory_foy)
foyc@coryfoy.com
http://coryfoy.com
Friday, August 9, 13
Cory Foy (@cory_foy)
foyc@coryfoy.com
http://coryfoy.com
Friday, August 9, 13

More Related Content

More from Cory Foy

Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...Cory Foy
 
Stratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right TimeStratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right TimeCory Foy
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestCory Foy
 
Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Cory Foy
 
Code Katas
Code KatasCode Katas
Code KatasCory Foy
 
Distributed Agility
Distributed AgilityDistributed Agility
Distributed AgilityCory Foy
 
Scaling Agility
Scaling AgilityScaling Agility
Scaling AgilityCory Foy
 
Kanban for DevOps
Kanban for DevOpsKanban for DevOps
Kanban for DevOpsCory Foy
 
Ruby and OO for Beginners
Ruby and OO for BeginnersRuby and OO for Beginners
Ruby and OO for BeginnersCory Foy
 
Agile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationAgile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationCory Foy
 
Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Cory Foy
 
Scrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleScrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleCory Foy
 
SQE Boston - When Code Cries
SQE Boston - When Code CriesSQE Boston - When Code Cries
SQE Boston - When Code CriesCory Foy
 
GOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesGOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesCory Foy
 
Agile Demystified
Agile DemystifiedAgile Demystified
Agile DemystifiedCory Foy
 
When Code Cries
When Code CriesWhen Code Cries
When Code CriesCory Foy
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# DevelopersCory Foy
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataCory Foy
 
Mud Tires: Getting Traction in Legacy Code
Mud Tires: Getting Traction in Legacy CodeMud Tires: Getting Traction in Legacy Code
Mud Tires: Getting Traction in Legacy CodeCory Foy
 
Fostering Software Craftsmanship
Fostering Software CraftsmanshipFostering Software Craftsmanship
Fostering Software CraftsmanshipCory Foy
 

More from Cory Foy (20)

Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
 
Stratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right TimeStratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right Time
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software West
 
Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015
 
Code Katas
Code KatasCode Katas
Code Katas
 
Distributed Agility
Distributed AgilityDistributed Agility
Distributed Agility
 
Scaling Agility
Scaling AgilityScaling Agility
Scaling Agility
 
Kanban for DevOps
Kanban for DevOpsKanban for DevOps
Kanban for DevOps
 
Ruby and OO for Beginners
Ruby and OO for BeginnersRuby and OO for Beginners
Ruby and OO for Beginners
 
Agile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationAgile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the Organization
 
Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?
 
Scrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleScrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at Scale
 
SQE Boston - When Code Cries
SQE Boston - When Code CriesSQE Boston - When Code Cries
SQE Boston - When Code Cries
 
GOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesGOTO Berlin - When Code Cries
GOTO Berlin - When Code Cries
 
Agile Demystified
Agile DemystifiedAgile Demystified
Agile Demystified
 
When Code Cries
When Code CriesWhen Code Cries
When Code Cries
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# Developers
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and Data
 
Mud Tires: Getting Traction in Legacy Code
Mud Tires: Getting Traction in Legacy CodeMud Tires: Getting Traction in Legacy Code
Mud Tires: Getting Traction in Legacy Code
 
Fostering Software Craftsmanship
Fostering Software CraftsmanshipFostering Software Craftsmanship
Fostering Software Craftsmanship
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
#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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise 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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
#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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Rails as a Pattern Language