Ruby on Rails is a web application framework created in 2004 and extracted from the authors' work on Basecamp. It is a full-stack framework that provides default structures and tools for database access, templating, routing and more. The framework emphasizes conventions over configuration and follows patterns like MVC and REST to provide a pragmatic approach to building web applications. Testing and agile development practices are also core to how Rails applications are built.
5. Modern?
• What exactly does „modern“ mean?
• „Modern“ is a very subjective and
opinionated term
• So is Ruby on Rails!
6. • Created in 2004 by David Heinemeier
Hansson (DHH) at 37signals
• Extracted from Basecamp
(basecamphq.com)
• Based on pragmatic solutions for common
problems
• Opinionated software
• DRY - Don‘t Repeat Yourself
8. „It‘s a very pragmatic,
very targeted framework
with a strong sense of direction.
You might not share it‘s vision,
but it undeniably has one.“
DHH
photo copyright by James Duncan Davidson
13. Yes, but you should
understand what you
are doing.
14. Convention over
configuration
• File naming conventions and assumptions
• DB naming conventions for databases,
tables, primary- and foreign keys
• Pluralization and singularization through
String inflectors
• Per-Environment configuration files
15. DRY - Don‘t Repeat
Yourself
• Table column names don‘t need to be
manually defined => read from DB
• Reusing code (e.g. in views via partials)
• Metaprogramming
• DSLs
21. ActionView
• ERB (Embedded Ruby)
• Javascript generators (AJAX)
• XML templates
• Reusing template elements via partials and
layouts
22. ActionController
• Actions are public controller methods
• Automatic template rendering
• Multiple formats can easily be supported
• RESTful model representations
• Callbacks
• Complete routing system
• Security (CSRF, IP spoofing, etc.)
23. REST
• Representational State Transfer
• Representation of resources with only
HTTP
• Actions on resources defined by HTTP
methods
• Stateless
• No additional transport layer like SOAP
25. Testing
• Test environment & database
• Fixtures or Factories, depending on you
• Unit tests for models
• Functional tests for controllers
• Integration tests for workflow
• Automated browser tests via Selenium
26. Made for agile!
• Test driven development encouraged
• It‘s hard not to test
• Coverage testing via rcov
• Behaviour driven development with Rspec,
Cucumber or Shoulda (Stories and
contexts)
• Iterative DB schema evolvement via
migrations
29. Ruby
• Released 1995 in Japan
• Created by Yukihiro Matsumoto
„Matz“
• Ruby should feel „natural, not
simple“
• Ruby should be „more powerful
than perl, more object-oriented
than python“