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 fle...
coryfoy.com
Ruby on Rails, often simply Rails, is an open
source web application framework which
runs on the Ruby programm...
coryfoy.com
Ruby on Rails emphasizes the use of well-
known software engineering patterns and
principles, such as active r...
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...
coryfoy.com
“Each pattern is a rule which describes what you have to
do to generate the entity which it defines”
Christophe...
coryfoy.com
• Characteristics
• Knowledge to Build the System
• Whether it is essential to solve a problem
Friday, August ...
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...
coryfoy.com
• North South Axis
• West Facing Entrance Down the Slope
• Two Floors
• Hay Loft at the Back
• Bedrooms in Fro...
coryfoy.com
Natural vs Pattern Language
Natural Language Pattern Language
Words Patterns
Rules of grammar and
meaning whic...
coryfoy.com
“Advocates of this design approach claim that ordinary
people can use it to successfully solve very large, com...
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, Augu...
coryfoy.com
Client
Server
Transport
Friday, August 9, 13
coryfoy.com
REST
Routing
Validations
Controllers
Action View
Action Mailer
Active Record
Authentication
Session Management...
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
Upcoming SlideShare
Loading in …5
×

Rails as a Pattern Language

1,708 views

Published on

In this talk, Cory Foy covers what is it that makes Rails more than a collection of Design Patterns and instead a Pattern Language

Published in: Technology
  • Be the first to comment

Rails as a Pattern Language

  1. 1. coryfoy.com Rails as a Pattern Language Cory Foy @cory_foy foyc@coryfoy.com http://coryfoy.com Friday, August 9, 13
  2. 2. coryfoy.com Not to be confused with Ruby (programming language). - Wikipedia Friday, August 9, 13
  3. 3. coryfoy.com Friday, August 9, 13
  4. 4. 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
  5. 5. 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
  6. 6. 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
  7. 7. coryfoy.com Patterns Friday, August 9, 13
  8. 8. coryfoy.com Friday, August 9, 13
  9. 9. 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
  10. 10. 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
  11. 11. coryfoy.com • Characteristics • Knowledge to Build the System • Whether it is essential to solve a problem Friday, August 9, 13
  12. 12. coryfoy.com Pattern Name Intent Motivation Consequences Implementation Elements of a pattern Friday, August 9, 13
  13. 13. coryfoy.com Pattern Language Friday, August 9, 13
  14. 14. 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
  15. 15. 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
  16. 16. 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
  17. 17. 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
  18. 18. coryfoy.com Design a Building Friday, August 9, 13
  19. 19. coryfoy.com Friday, August 9, 13
  20. 20. coryfoy.com Design a Web Application Friday, August 9, 13
  21. 21. coryfoy.com Friday, August 9, 13
  22. 22. coryfoy.comMapper Active Record Template View Front Controller Model-View Controller Single Table Inheritance Friday, August 9, 13
  23. 23. coryfoy.com Client Server Transport Friday, August 9, 13
  24. 24. 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
  25. 25. coryfoy.com Friday, August 9, 13
  26. 26. coryfoy.com MERB Data Mapper HAML Interactor Pattern NoSQL Scaling Friday, August 9, 13
  27. 27. Cory Foy (@cory_foy) foyc@coryfoy.com http://coryfoy.com Friday, August 9, 13
  28. 28. Cory Foy (@cory_foy) foyc@coryfoy.com http://coryfoy.com Friday, August 9, 13

×