SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
Athens
Ruby
Meetup
#4
Rails 3:
Derailing
Rails
Panagiotis Papadopoulos
@panosjee
http://6pna.com
Merb and Rails merge announced on December 23
2008
The hell freezed
High Expectations
Two and a half years later the merge is complete
A lot of new committers
Significant efforts by the Merb creator Yehuda Katz
Lots of rewrites
A new beast
New tricks to learn
More power to developers
Less opinionated thus derailed but still using strong
conventions
Less monkey patching (oh yes)
The story after Rails 3
Many people accused Rails of
being spaghetti code
Not any more...
Django infuelnces...
Less monkey patching.
The code is well organized and
modular.
You can reuse the components
you want, add yours and create
the Rails you want, ala carte
* you can always monkey patch, do
not worry!
Rails 3 is a top Rack citizen. You can mount any Rack or
even Sinatra in your app.
It is as simple as that:
Store::Application.routes.draw do |map|
root :to => proc { |env| [200, {}, ["Welcome"]] }
end
Or if you want a custom controller:
In your routes.rb
match "/processes" => ProcessesApp
In lib/process_app.rb
class ProcessesApp < ActionController::Metal
include ActionController::Rendering
Pure Rack Goodness
New Responders, less verbose
def new
@product = Product.new
respond_with @product
end
Redirect shortcuts
redirect_to @product, :
notice => "Successfully created
Permanent Cookies
Custom responeders
No more Metal, you can create your own controllers
Controllers in Rails 3
No more gem.config in environment.rb
Anyway all this code is moved to application.rb
But your gem dependencies now live in Gemfile
Bundler is the new way to solve the dependency hell
problem.
Bundler locks all used gems so when you clone the
project you get the same exactly gems and
dependencies
# Edit this Gemfile to bundle your application's dependencies.
source 'http://gemcutter.org'
gem "rails", "3.0.0.beta"
# ActiveRecord requires a database adapter. By default,
# Rails has selected sqlite3.
gem "sqlite3-ruby", :require => "sqlite3"
Gem dependecies. Bundler.
Forget script, say hello to rails
New Generators and Commands
Generators help you create *YOUR* convetions
The new ActionMailer is descentant of ActionController so
you no longer have to mixin your models and mailers.
class UserMailer < ActionMailer::Base
default :from => "eifion@asciicasts.com"
def registration_confirmation(user)
mail(:to => user.email, :subject => "Registered")
end
end
A new ActionMailer! At last!
Everything is escaped by default. Use <%=raw %> if
you want markup in your views.
First of all Rails 3 is not tight to Prototype. It is still the
default but you can use easily any major Javascript
library.
All helpers produce UJS code
In your views:
<%= link_to "Destroy", @product, :confirm => "Are you sure?", :method => :delete %>
Produces the following html code:
<a href="/products/8" data-confirm="Are you sure?" data-method="delete" rel="nofollow">Destroy</a>
Unobtrusive JS using HTML5, XSS Security
ActiveRecord inherits from ActiveModel
You can use ActiveModel to build your own ORM
compatible with Rails
Query language is now AReL
Chain everything!
More details by Savvas
ActiveRecord
An awesome way to extend Rails apps!
Build plugins in no time!
Source: http://www.igvita.com/2010/08/04/rails-3-internals-railtie-creating-plugins/
Railties
Rails 3 bring
more options to
developers and
a better API to
build upon.
You still have
the Golden Path
or the Rails
defaults but you
face less
restrictions on
how to build
stuff
Huge performance gains
You better start off with
Ruby 1.9 using RVM
so that you migrate to
the new Ruby stack
Be careful with your gem and plugins selections, things are a
bit... edgy
Tested against other major
VMs such as Ruby 1.8, 1.9,
JRuby, Rubinious
Thank You!
@panosjee

Contenu connexe

Tendances

1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)Yuichiro MASUI
 
CakePHP SessionAcl Component
CakePHP SessionAcl ComponentCakePHP SessionAcl Component
CakePHP SessionAcl ComponentTakashi Nojima
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails WorkshopAlex Rupérez
 
Deploying Rails Apps with Capistrano
Deploying Rails Apps with CapistranoDeploying Rails Apps with Capistrano
Deploying Rails Apps with CapistranoNyros Technologies
 
ZfDayIt 2014 - There is a module for everything
ZfDayIt 2014 - There is a module for everythingZfDayIt 2014 - There is a module for everything
ZfDayIt 2014 - There is a module for everythingGianluca Arbezzano
 
Apikit in studio
Apikit in studioApikit in studio
Apikit in studiofedefortin
 
Web service with Laravel
Web service with LaravelWeb service with Laravel
Web service with LaravelAbuzer Firdousi
 
Top laravel packages to install handpicked list from expert
Top laravel packages to install handpicked list from expertTop laravel packages to install handpicked list from expert
Top laravel packages to install handpicked list from expertKaty Slemon
 
Angular & rails
Angular & railsAngular & rails
Angular & railsneodynamic
 
Task scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorialTask scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorialKaty Slemon
 
Be happy with Ruby on Rails - CEUNSP Itu
Be happy with Ruby on Rails - CEUNSP ItuBe happy with Ruby on Rails - CEUNSP Itu
Be happy with Ruby on Rails - CEUNSP ItuLucas Renan
 
Laravel Restful API and AngularJS
Laravel Restful API and AngularJSLaravel Restful API and AngularJS
Laravel Restful API and AngularJSBlake Newman
 
RoR 101: Session 5
RoR 101: Session 5RoR 101: Session 5
RoR 101: Session 5Rory Gianni
 

Tendances (19)

Rack
RackRack
Rack
 
Cocoa on-rails-3rd
Cocoa on-rails-3rdCocoa on-rails-3rd
Cocoa on-rails-3rd
 
Rail3 intro 29th_sep_surendran
Rail3 intro 29th_sep_surendranRail3 intro 29th_sep_surendran
Rail3 intro 29th_sep_surendran
 
1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)
 
CakePHP SessionAcl Component
CakePHP SessionAcl ComponentCakePHP SessionAcl Component
CakePHP SessionAcl Component
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails Workshop
 
Deploying Rails Apps with Capistrano
Deploying Rails Apps with CapistranoDeploying Rails Apps with Capistrano
Deploying Rails Apps with Capistrano
 
ZfDayIt 2014 - There is a module for everything
ZfDayIt 2014 - There is a module for everythingZfDayIt 2014 - There is a module for everything
ZfDayIt 2014 - There is a module for everything
 
Apikit in studio
Apikit in studioApikit in studio
Apikit in studio
 
Web service with Laravel
Web service with LaravelWeb service with Laravel
Web service with Laravel
 
Top laravel packages to install handpicked list from expert
Top laravel packages to install handpicked list from expertTop laravel packages to install handpicked list from expert
Top laravel packages to install handpicked list from expert
 
Angular & rails
Angular & railsAngular & rails
Angular & rails
 
Task scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorialTask scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorial
 
Rails 3
Rails 3Rails 3
Rails 3
 
Be happy with Ruby on Rails - CEUNSP Itu
Be happy with Ruby on Rails - CEUNSP ItuBe happy with Ruby on Rails - CEUNSP Itu
Be happy with Ruby on Rails - CEUNSP Itu
 
Laravel Restful API and AngularJS
Laravel Restful API and AngularJSLaravel Restful API and AngularJS
Laravel Restful API and AngularJS
 
Sinatra
SinatraSinatra
Sinatra
 
RoR 101: Session 5
RoR 101: Session 5RoR 101: Session 5
RoR 101: Session 5
 
Sinatra
SinatraSinatra
Sinatra
 

En vedette

Fundamental Analysis & Analyst Recommendations - DAXglobal® China Urbanization
Fundamental Analysis & Analyst Recommendations - DAXglobal® China UrbanizationFundamental Analysis & Analyst Recommendations - DAXglobal® China Urbanization
Fundamental Analysis & Analyst Recommendations - DAXglobal® China UrbanizationBCV
 
Sakai11 Citations BOF Introductory Slides
Sakai11 Citations BOF Introductory SlidesSakai11 Citations BOF Introductory Slides
Sakai11 Citations BOF Introductory SlidesJon W. Dunn
 
Fundamental Equity Analysis - World Gold Miners
Fundamental Equity Analysis - World Gold MinersFundamental Equity Analysis - World Gold Miners
Fundamental Equity Analysis - World Gold MinersBCV
 
Fundamental Equity Analysis - TOPIX 100 Index Members (TPX100 Index)
Fundamental Equity Analysis - TOPIX 100 Index Members (TPX100 Index)Fundamental Equity Analysis - TOPIX 100 Index Members (TPX100 Index)
Fundamental Equity Analysis - TOPIX 100 Index Members (TPX100 Index)BCV
 
Financial Analysis - Kubota corporation manufactures industrial machinery,…
Financial Analysis - Kubota corporation manufactures industrial machinery,…Financial Analysis - Kubota corporation manufactures industrial machinery,…
Financial Analysis - Kubota corporation manufactures industrial machinery,…BCV
 
Hied blackboard dell_whitepaper
Hied blackboard dell_whitepaperHied blackboard dell_whitepaper
Hied blackboard dell_whitepaperSteve Feldman
 
Financial Analysis - China Communications Construction Company Ltd. is a tran...
Financial Analysis - China Communications Construction Company Ltd. is a tran...Financial Analysis - China Communications Construction Company Ltd. is a tran...
Financial Analysis - China Communications Construction Company Ltd. is a tran...BCV
 
Ruby On Google App Engine 2nd Athens Ruby Me
Ruby On Google App Engine 2nd Athens Ruby MeRuby On Google App Engine 2nd Athens Ruby Me
Ruby On Google App Engine 2nd Athens Ruby MePanagiotis Papadopoulos
 
Project Connect: Connect and Collaborate Session A- October 1
Project Connect: Connect and Collaborate Session A- October 1Project Connect: Connect and Collaborate Session A- October 1
Project Connect: Connect and Collaborate Session A- October 1Terri Sallee
 
Financial Analysis - Banque Cantonale Vaudoise - Banque Cantonale Vaudoise (B...
Financial Analysis - Banque Cantonale Vaudoise - Banque Cantonale Vaudoise (B...Financial Analysis - Banque Cantonale Vaudoise - Banque Cantonale Vaudoise (B...
Financial Analysis - Banque Cantonale Vaudoise - Banque Cantonale Vaudoise (B...BCV
 
D&B Business Verification API Code Sample in C#
D&B Business Verification API Code Sample in C#D&B Business Verification API Code Sample in C#
D&B Business Verification API Code Sample in C#Lynn Langit
 

En vedette (15)

Fundamental Analysis & Analyst Recommendations - DAXglobal® China Urbanization
Fundamental Analysis & Analyst Recommendations - DAXglobal® China UrbanizationFundamental Analysis & Analyst Recommendations - DAXglobal® China Urbanization
Fundamental Analysis & Analyst Recommendations - DAXglobal® China Urbanization
 
Sakai11 Citations BOF Introductory Slides
Sakai11 Citations BOF Introductory SlidesSakai11 Citations BOF Introductory Slides
Sakai11 Citations BOF Introductory Slides
 
Science Sandbox
Science SandboxScience Sandbox
Science Sandbox
 
Fundamental Equity Analysis - World Gold Miners
Fundamental Equity Analysis - World Gold MinersFundamental Equity Analysis - World Gold Miners
Fundamental Equity Analysis - World Gold Miners
 
Fundamental Equity Analysis - TOPIX 100 Index Members (TPX100 Index)
Fundamental Equity Analysis - TOPIX 100 Index Members (TPX100 Index)Fundamental Equity Analysis - TOPIX 100 Index Members (TPX100 Index)
Fundamental Equity Analysis - TOPIX 100 Index Members (TPX100 Index)
 
Financial Analysis - Kubota corporation manufactures industrial machinery,…
Financial Analysis - Kubota corporation manufactures industrial machinery,…Financial Analysis - Kubota corporation manufactures industrial machinery,…
Financial Analysis - Kubota corporation manufactures industrial machinery,…
 
Hied blackboard dell_whitepaper
Hied blackboard dell_whitepaperHied blackboard dell_whitepaper
Hied blackboard dell_whitepaper
 
Zensko Telo
Zensko TeloZensko Telo
Zensko Telo
 
Financial Analysis - China Communications Construction Company Ltd. is a tran...
Financial Analysis - China Communications Construction Company Ltd. is a tran...Financial Analysis - China Communications Construction Company Ltd. is a tran...
Financial Analysis - China Communications Construction Company Ltd. is a tran...
 
Ruby openfest
Ruby openfestRuby openfest
Ruby openfest
 
Sfalma Pitch
Sfalma PitchSfalma Pitch
Sfalma Pitch
 
Ruby On Google App Engine 2nd Athens Ruby Me
Ruby On Google App Engine 2nd Athens Ruby MeRuby On Google App Engine 2nd Athens Ruby Me
Ruby On Google App Engine 2nd Athens Ruby Me
 
Project Connect: Connect and Collaborate Session A- October 1
Project Connect: Connect and Collaborate Session A- October 1Project Connect: Connect and Collaborate Session A- October 1
Project Connect: Connect and Collaborate Session A- October 1
 
Financial Analysis - Banque Cantonale Vaudoise - Banque Cantonale Vaudoise (B...
Financial Analysis - Banque Cantonale Vaudoise - Banque Cantonale Vaudoise (B...Financial Analysis - Banque Cantonale Vaudoise - Banque Cantonale Vaudoise (B...
Financial Analysis - Banque Cantonale Vaudoise - Banque Cantonale Vaudoise (B...
 
D&B Business Verification API Code Sample in C#
D&B Business Verification API Code Sample in C#D&B Business Verification API Code Sample in C#
D&B Business Verification API Code Sample in C#
 

Similaire à Derailing rails

Rails-3-app-auto-generator-20100817
Rails-3-app-auto-generator-20100817Rails-3-app-auto-generator-20100817
Rails-3-app-auto-generator-20100817Tse-Ching Ho
 
Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3Clinton Dreisbach
 
Migration from Rails2 to Rails3
Migration from Rails2 to Rails3Migration from Rails2 to Rails3
Migration from Rails2 to Rails3Umair Amjad
 
Introduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman OrtegaIntroduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman Ortegaarman o
 
What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...
What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...
What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...Matt Gauger
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发shaokun
 
Introduction To Ruby On Rails
Introduction To Ruby On RailsIntroduction To Ruby On Rails
Introduction To Ruby On RailsSteve Keener
 
Get Going With RVM and Rails 3
Get Going With RVM and Rails 3Get Going With RVM and Rails 3
Get Going With RVM and Rails 3Karmen Blake
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?Srijan Technologies
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteDr Nic Williams
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011Fabio Akita
 
09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do railsDNAD
 
Ruby off Rails (english)
Ruby off Rails (english)Ruby off Rails (english)
Ruby off Rails (english)Stoyan Zhekov
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails DevsDiacode
 

Similaire à Derailing rails (20)

Rails-3-app-auto-generator-20100817
Rails-3-app-auto-generator-20100817Rails-3-app-auto-generator-20100817
Rails-3-app-auto-generator-20100817
 
Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3
 
Migration from Rails2 to Rails3
Migration from Rails2 to Rails3Migration from Rails2 to Rails3
Migration from Rails2 to Rails3
 
Rails3 changesets
Rails3 changesetsRails3 changesets
Rails3 changesets
 
Introduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman OrtegaIntroduction to Rails - presented by Arman Ortega
Introduction to Rails - presented by Arman Ortega
 
Create a new project in ROR
Create a new project in RORCreate a new project in ROR
Create a new project in ROR
 
rails.html
rails.htmlrails.html
rails.html
 
rails.html
rails.htmlrails.html
rails.html
 
Supa fast Ruby + Rails
Supa fast Ruby + RailsSupa fast Ruby + Rails
Supa fast Ruby + Rails
 
What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...
What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...
What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...
 
Speedy TDD with Rails
Speedy TDD with RailsSpeedy TDD with Rails
Speedy TDD with Rails
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发
 
Introduction To Ruby On Rails
Introduction To Ruby On RailsIntroduction To Ruby On Rails
Introduction To Ruby On Rails
 
Get Going With RVM and Rails 3
Get Going With RVM and Rails 3Get Going With RVM and Rails 3
Get Going With RVM and Rails 3
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
 
09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails
 
Ruby off Rails (english)
Ruby off Rails (english)Ruby off Rails (english)
Ruby off Rails (english)
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 

Dernier

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
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
 
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
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Dernier (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
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...
 
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...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Derailing rails

  • 2. Merb and Rails merge announced on December 23 2008 The hell freezed High Expectations Two and a half years later the merge is complete A lot of new committers Significant efforts by the Merb creator Yehuda Katz Lots of rewrites A new beast New tricks to learn More power to developers Less opinionated thus derailed but still using strong conventions Less monkey patching (oh yes) The story after Rails 3
  • 3. Many people accused Rails of being spaghetti code
  • 4. Not any more... Django infuelnces...
  • 5. Less monkey patching. The code is well organized and modular. You can reuse the components you want, add yours and create the Rails you want, ala carte * you can always monkey patch, do not worry!
  • 6. Rails 3 is a top Rack citizen. You can mount any Rack or even Sinatra in your app. It is as simple as that: Store::Application.routes.draw do |map| root :to => proc { |env| [200, {}, ["Welcome"]] } end Or if you want a custom controller: In your routes.rb match "/processes" => ProcessesApp In lib/process_app.rb class ProcessesApp < ActionController::Metal include ActionController::Rendering Pure Rack Goodness
  • 7. New Responders, less verbose def new @product = Product.new respond_with @product end Redirect shortcuts redirect_to @product, : notice => "Successfully created Permanent Cookies Custom responeders No more Metal, you can create your own controllers Controllers in Rails 3
  • 8. No more gem.config in environment.rb Anyway all this code is moved to application.rb But your gem dependencies now live in Gemfile Bundler is the new way to solve the dependency hell problem. Bundler locks all used gems so when you clone the project you get the same exactly gems and dependencies # Edit this Gemfile to bundle your application's dependencies. source 'http://gemcutter.org' gem "rails", "3.0.0.beta" # ActiveRecord requires a database adapter. By default, # Rails has selected sqlite3. gem "sqlite3-ruby", :require => "sqlite3" Gem dependecies. Bundler.
  • 9. Forget script, say hello to rails New Generators and Commands Generators help you create *YOUR* convetions
  • 10. The new ActionMailer is descentant of ActionController so you no longer have to mixin your models and mailers. class UserMailer < ActionMailer::Base default :from => "eifion@asciicasts.com" def registration_confirmation(user) mail(:to => user.email, :subject => "Registered") end end A new ActionMailer! At last!
  • 11. Everything is escaped by default. Use <%=raw %> if you want markup in your views. First of all Rails 3 is not tight to Prototype. It is still the default but you can use easily any major Javascript library. All helpers produce UJS code In your views: <%= link_to "Destroy", @product, :confirm => "Are you sure?", :method => :delete %> Produces the following html code: <a href="/products/8" data-confirm="Are you sure?" data-method="delete" rel="nofollow">Destroy</a> Unobtrusive JS using HTML5, XSS Security
  • 12. ActiveRecord inherits from ActiveModel You can use ActiveModel to build your own ORM compatible with Rails Query language is now AReL Chain everything! More details by Savvas ActiveRecord
  • 13. An awesome way to extend Rails apps! Build plugins in no time! Source: http://www.igvita.com/2010/08/04/rails-3-internals-railtie-creating-plugins/ Railties
  • 14. Rails 3 bring more options to developers and a better API to build upon. You still have the Golden Path or the Rails defaults but you face less restrictions on how to build stuff Huge performance gains You better start off with Ruby 1.9 using RVM so that you migrate to the new Ruby stack Be careful with your gem and plugins selections, things are a bit... edgy Tested against other major VMs such as Ruby 1.8, 1.9, JRuby, Rubinious Thank You! @panosjee