SlideShare une entreprise Scribd logo
1  sur  44
Modern
webdevelopment
     with
 Ruby on Rails
         Robert Glaser
Software Developer at Planetactive
Me

• Studied at Fontys Venlo
• 26 years
• Software Developer at Planetactive - an
  Ogilvy Company in Düsseldorf


          twitter.com/mrreynolds
Planetactive


• Ogilvy / WPP worldwide agency group
• Full service digital marketing agency
So...
Modern?

• What exactly does „modern“ mean?
• „Modern“ is a very subjective and
  opinionated term
• So is Ruby on Rails!
• 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
Wait.
There are hundreds of MVC web
          frameworks!
„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
Rails is „full stack“...

• ActiveRecord (ORM)
• ActionPack (ActionController, ActionView)
• ActiveSupport (Class Extensions, Helpers)
• ActionMailer
• ActiveResource (REST Mapper)
• Rails (Core Lib)
...with many ingredients
•   Instant start defaults   •   Strong REST support

•   Webserver                •   Session Handling

•   Logger                   •   Middleware (Rack)

•   Staging                  •   Test Framework

•   AJAX                     •   Plugins

•   Webservices              •   Engines

•   Mail                     •   Clean MVC
                                 architecture
•   Debugger
                             •   Scaffolding
•   Caching
ORM

• Database abstraction & persistance ORM
• ActiveRecord also a pattern
• Migrations for incremental schema
  management
YEAH!
I don‘t have to write
        SQL!!!
Yes, but you should
understand what you
      are doing.
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
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
Model

• Business logic
• Data persistence
• ActiveRecord
View

• Data presentation
• User Interaction
• Template language ERB (Embedded Ruby)
• ActionView
Controller

• Event handling
• Operation on models
• Redirection and rendering
• ActionController
ActionController




ActiveRecord                      ActionView
ActiveRecord
• Conventions (pluralized table names, ...)
• Dynamic getters and setters
• SQL mostly unnecessary
• Entity relations (1:1, 1:n, n:n)
• SQL injection protection
• Validators
• Callbacks
ActionView

• ERB (Embedded Ruby)
• Javascript generators (AJAX)
• XML templates
• Reusing template elements via partials and
  layouts
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.)
REST
• Representational State Transfer
• Representation of resources with only
  HTTP
• Actions on resources defined by HTTP
  methods
• Stateless
• No additional transport layer like SOAP
REST
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
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
Libraries, libraries!!


• Plugins
• Ruby Gems (Ruby‘s package management
  system)
So, what is Ruby?
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“
Everything is an object!
True open classes!
Loops
Loops
Classes, objects, loops,
      iterators
Symbols
Symbols
Classes & modules
Mixins
Mixins
Metaprogramming
Exceptions
If you want to use Ruby,
    use it idiomaticly!
Demo time!
Fin!

• Diploma thesis?
• Practical semester?
• Get in touch with me!

Contenu connexe

Tendances

Florian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with ZabbixFlorian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with ZabbixZabbix
 
Use all the buzzwords
Use all the buzzwordsUse all the buzzwords
Use all the buzzwordsJared Faris
 
InterCon - Ruby e Rails
InterCon - Ruby e RailsInterCon - Ruby e Rails
InterCon - Ruby e RailsFabio Akita
 
Beyond the Standards
Beyond the StandardsBeyond the Standards
Beyond the StandardsPaul Bakaus
 
Varnish to the rescue
Varnish to the rescueVarnish to the rescue
Varnish to the rescueleafnode
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
Under the Hood with MySQL
Under the Hood with MySQLUnder the Hood with MySQL
Under the Hood with MySQLohiocore
 
JBoss, Rails and the cloud
JBoss, Rails and the cloudJBoss, Rails and the cloud
JBoss, Rails and the cloudelliando dias
 
Ruby and Rails for womens
Ruby and Rails for womensRuby and Rails for womens
Ruby and Rails for womenss4nx
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails PresentationChanHan Hy
 
Dallas Drupal Days 2012 - Introduction to less sass-compass
Dallas Drupal Days 2012  - Introduction to less sass-compassDallas Drupal Days 2012  - Introduction to less sass-compass
Dallas Drupal Days 2012 - Introduction to less sass-compassChris Lee
 
Day 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureBarry Jones
 
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...Hariharan Ganesan
 
Pagelet in action
Pagelet in actionPagelet in action
Pagelet in actionPu Shiming
 
CouchDB Talk JChris NYC
CouchDB Talk JChris NYCCouchDB Talk JChris NYC
CouchDB Talk JChris NYCChris Anderson
 

Tendances (18)

Day 8 - jRuby
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRuby
 
Florian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with ZabbixFlorian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with Zabbix
 
Use all the buzzwords
Use all the buzzwordsUse all the buzzwords
Use all the buzzwords
 
InterCon - Ruby e Rails
InterCon - Ruby e RailsInterCon - Ruby e Rails
InterCon - Ruby e Rails
 
Beyond the Standards
Beyond the StandardsBeyond the Standards
Beyond the Standards
 
Varnish to the rescue
Varnish to the rescueVarnish to the rescue
Varnish to the rescue
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
Mean stack
Mean stackMean stack
Mean stack
 
Under the Hood with MySQL
Under the Hood with MySQLUnder the Hood with MySQL
Under the Hood with MySQL
 
JBoss, Rails and the cloud
JBoss, Rails and the cloudJBoss, Rails and the cloud
JBoss, Rails and the cloud
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
Ruby and Rails for womens
Ruby and Rails for womensRuby and Rails for womens
Ruby and Rails for womens
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation
 
Dallas Drupal Days 2012 - Introduction to less sass-compass
Dallas Drupal Days 2012  - Introduction to less sass-compassDallas Drupal Days 2012  - Introduction to less sass-compass
Dallas Drupal Days 2012 - Introduction to less sass-compass
 
Day 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application Architecture
 
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
 
Pagelet in action
Pagelet in actionPagelet in action
Pagelet in action
 
CouchDB Talk JChris NYC
CouchDB Talk JChris NYCCouchDB Talk JChris NYC
CouchDB Talk JChris NYC
 

Similaire à Modern Webdevelopment With Ruby On Rails

Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Coursepeter_marklund
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Railsdosire
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRubyAmit Solanki
 
Drupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQueryDrupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQueryMatt Butcher
 
J Ruby Power On The Jvm
J Ruby Power On The JvmJ Ruby Power On The Jvm
J Ruby Power On The JvmQConLondon2008
 
VTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData projectVTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData projectTom Klaasen
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Nilesh Panchal
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvmdeimos
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorialoscon2007
 
Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture TrendsSrini Penchikala
 
Dconrails Gecco Presentation
Dconrails Gecco PresentationDconrails Gecco Presentation
Dconrails Gecco PresentationJuan J. Merelo
 
Rapid Prototyping With J Query
Rapid Prototyping With J QueryRapid Prototyping With J Query
Rapid Prototyping With J QueryBootstrap
 
Scala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud PlatformScala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud PlatformTomoharu ASAMI
 

Similaire à Modern Webdevelopment With Ruby On Rails (20)

Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
Bhavesh ro r
Bhavesh ro rBhavesh ro r
Bhavesh ro r
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
L R U G - JRuby
L R U G - JRubyL R U G - JRuby
L R U G - JRuby
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
 
Drupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQueryDrupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQuery
 
Workin On The Rails Road
Workin On The Rails RoadWorkin On The Rails Road
Workin On The Rails Road
 
J Ruby Power On The Jvm
J Ruby Power On The JvmJ Ruby Power On The Jvm
J Ruby Power On The Jvm
 
VTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData projectVTi Knowledge Database: a LinkedData project
VTi Knowledge Database: a LinkedData project
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvm
 
re7olabini
re7olabinire7olabini
re7olabini
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
 
Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture Trends
 
Dconrails Gecco Presentation
Dconrails Gecco PresentationDconrails Gecco Presentation
Dconrails Gecco Presentation
 
Rapid Prototyping With J Query
Rapid Prototyping With J QueryRapid Prototyping With J Query
Rapid Prototyping With J Query
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
Scala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud PlatformScala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud Platform
 
Real World Technologies
Real World TechnologiesReal World Technologies
Real World Technologies
 
Couch Db
Couch DbCouch Db
Couch Db
 

Dernier

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Dernier (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Modern Webdevelopment With Ruby On Rails

  • 1. Modern webdevelopment with Ruby on Rails Robert Glaser Software Developer at Planetactive
  • 2. Me • Studied at Fontys Venlo • 26 years • Software Developer at Planetactive - an Ogilvy Company in Düsseldorf twitter.com/mrreynolds
  • 3. Planetactive • Ogilvy / WPP worldwide agency group • Full service digital marketing agency
  • 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
  • 7. Wait. There are hundreds of MVC web frameworks!
  • 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
  • 9. Rails is „full stack“... • ActiveRecord (ORM) • ActionPack (ActionController, ActionView) • ActiveSupport (Class Extensions, Helpers) • ActionMailer • ActiveResource (REST Mapper) • Rails (Core Lib)
  • 10. ...with many ingredients • Instant start defaults • Strong REST support • Webserver • Session Handling • Logger • Middleware (Rack) • Staging • Test Framework • AJAX • Plugins • Webservices • Engines • Mail • Clean MVC architecture • Debugger • Scaffolding • Caching
  • 11. ORM • Database abstraction & persistance ORM • ActiveRecord also a pattern • Migrations for incremental schema management
  • 12. YEAH! I don‘t have to write SQL!!!
  • 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
  • 16. Model • Business logic • Data persistence • ActiveRecord
  • 17. View • Data presentation • User Interaction • Template language ERB (Embedded Ruby) • ActionView
  • 18. Controller • Event handling • Operation on models • Redirection and rendering • ActionController
  • 20. ActiveRecord • Conventions (pluralized table names, ...) • Dynamic getters and setters • SQL mostly unnecessary • Entity relations (1:1, 1:n, n:n) • SQL injection protection • Validators • Callbacks
  • 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
  • 24. REST
  • 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
  • 27. Libraries, libraries!! • Plugins • Ruby Gems (Ruby‘s package management system)
  • 28. So, what is Ruby?
  • 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“
  • 30. Everything is an object!
  • 32. Loops
  • 33. Loops
  • 42. If you want to use Ruby, use it idiomaticly!
  • 44. Fin! • Diploma thesis? • Practical semester? • Get in touch with me!

Notes de l'éditeur