SlideShare a Scribd company logo
Rails 3
..and the real secret to high productivity
5
2004 - 2009
quot;You may have noticed that pretty much everyone in
the Ruby camp are insultants with many of them being
book authors attempting to capitalize on hype.quot;
                     James McGovern
We’re still here
The philosophy
  of Rails 3
The progress
 of Rails 3
New router
                Faster
Route by subdomains, user agents, more
    Route to other Rack machinery
map.with_options(:controller   => quot;sessionsquot;) do |sessions|
   sessions.login   quot;loginquot;,    :action => quot;newquot;,     :conditions => { :method => :get }
   sessions.connect quot;loginquot;,    :action => quot;createquot;, :conditions => { :method => :post }
   sessions.logout quot;logoutquot;,    :action => quot;destroyquot;, :conditions => { :method => :post }
 end




controller :sessions do
  match 'logout', :via => :delete, :to => :destroy, :as => :logout

  match 'login' do
    get :new, :as => :login
    post :create
  end
end
map.resources :projects, :controller => 'project' do |projects|
  projects.resources :attachments
  projects.resources :participants, :collection => { :update_all => :put }
  projects.resources :companies, :has_many => :people, :has_one => :avatar
end




     resources :projects, :controller => :project do
       resources :attachments

        resources :participants do
          put :update_all, :on => :collection
        end

       resources :companies do
         resources :people
         resource :avatar
       end
     end
XSS protection
<%# => quot;I've hacked you good! <script>quot; %>
<%= comment.body %>

<%# => quot;I've hacked you bad! &lt;script&gt;quot; %>
<%=h comment.body %>




<%# => quot;I've hacked you good! &lt;script&gt;quot; %>
<%= comment.body %>

<%# => quot;I've hacked you bad! <script>quot; %>
<%=raw comment.body %>
def safe_helper(text)
  content_tag(:div, text) + tag(:br)
end

def needs_to_be_marked_safe_helper(text)
  (content_tag(:div, text) + quot;<br/>quot;).html_safe!
end
JavaScript goes
unobtrusive & agnostic
<%= link_to_remote quot;Deletequot;, :url => @comment, :method => :delete %>

<a href=quot;#quot; onclick=quot;new Ajax.Request('/comments/1', {asynchronous:true,
evalScripts:true, method:'delete'}); return false;quot;>Destroy</a>




<%= link_to quot;Deletequot;, @comment, :remote => true, :method => :delete %>

<a href=quot;/comments/1quot; data-remote=quot;truequot; data-method=quot;deletequot;>Destroy</a>
<% remote_form_for(@comment) do %>

<form action=quot;/commentsquot; class=quot;new_commentquot; id=quot;new_commentquot;
method=quot;postquot; onsubmit=quot;new Ajax.Request('/comments',
{asynchronous:true, evalScripts:true,
parameters:Form.serialize(this)}); return false;quot;>




<% form_for(@comment, :remote => true) do %>

<form action=quot;/commentsquot; class=quot;new_commentquot;
id=quot;new_commentquot; method=quot;postquot; data-remote=quot;truequot;>
<%= link_to quot;Deletequot;, @comment, :method => :delete %>

<a href=quot;/comments/1quot; onclick=quot;var f =
document.createElement('form'); f.style.display = 'none';
this.parentNode.appendChild(f); f.method = 'POST'; f.action =
this.href;var m = document.createElement('input');
m.setAttribute('type', 'hidden'); m.setAttribute('name',
'_method'); m.setAttribute('value', 'delete');
f.appendChild(m);f.submit();return false;quot;>Destroy</a>




<a href=quot;/comments/1quot; data-method=quot;deletequot;>Destroy</a>
<%= link_to quot;Deletequot;, @comment, :method => :delete, :confirm
=> quot;Are you sure?quot; %>

<a href=quot;/comments/1quot; onclick=quot;if (confirm('Are you sure?'))
{ var f = document.createElement('form'); f.style.display =
'none'; this.parentNode.appendChild(f); f.method = 'POST';
f.action = this.href;var m = document.createElement('input');
m.setAttribute('type', 'hidden'); m.setAttribute('name',
'_method'); m.setAttribute('value', 'delete');
f.appendChild(m);f.submit(); };return false;quot;>Destroy</a>




<a href=quot;/comments/1quot; data-method=quot;deletequot; data-
confirm=quot;Are you sure?quot;>Destroy</a>
$(document.body).observe(quot;clickquot;, function(event) {
  var element = event.findElement(quot;a['data-remote']quot;);
  if (element) {
    var method = element.readAttribute(quot;data-methodquot;) || quot;getquot;;
    new Ajax.Request(element.readAttribute(quot;hrefquot;), { method:
method });
    event.stop();
  }
});
More agnosticism
     Action ORM
      Generators
The great refactoring
    Abstract Controller + Action Dispatch
   Action Relation underpins Active Record
     Cherry picking from Active Support
              Speedy callbacks
The real secret
to high productivity
Renegotiate
requirements
“Sure, whatever”
   Stakeholders every where
“I don’t know how”
“It’s just too hard”
“I’d be bored senseless”
“That would kill the abstraction”
Programmer
Partner
Questions?

More Related Content

What's hot

The Devil Inside
The Devil InsideThe Devil Inside
The Devil Inside
Brian Buckalew
 
20 Jo P Aug 08
20 Jo P Aug 0820 Jo P Aug 08
20 Jo P Aug 08
Ganesh Samarthyam
 
SlideShare Instant
SlideShare InstantSlideShare Instant
SlideShare Instant
Saket Choudhary
 
SlideShare Instant
SlideShare InstantSlideShare Instant
SlideShare Instant
Saket Choudhary
 
REST, the internet as a database?
REST, the internet as a database?REST, the internet as a database?
REST, the internet as a database?
Andrej Koelewijn
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
brynary
 
Preparing a WordPress Plugin for Translation
Preparing a WordPress Plugin for TranslationPreparing a WordPress Plugin for Translation
Preparing a WordPress Plugin for Translation
Brian Hogg
 
My PPP Project / Digital Resume
My PPP Project / Digital ResumeMy PPP Project / Digital Resume
My PPP Project / Digital Resume
ARRuggiero
 
Select * from internet
Select * from internetSelect * from internet
Select * from internet
markandey
 
Add row in asp.net Gridview on button click using C# and vb.net
Add row in asp.net Gridview on button click using C# and vb.netAdd row in asp.net Gridview on button click using C# and vb.net
Add row in asp.net Gridview on button click using C# and vb.net
Vijay Saklani
 
Catalogmakr teaser
Catalogmakr teaserCatalogmakr teaser
Catalogmakr teaser
catalogmakr
 
Thairuralnet
ThairuralnetThairuralnet
Thairuralnet
thaiventure.com
 
Colección Primavera de Blaubloom
Colección Primavera de BlaubloomColección Primavera de Blaubloom
Colección Primavera de Blaubloom
MASmedia
 
HTML5, the open web, and what it means for you -Tech4Africa
HTML5, the open web, and what it means for you -Tech4AfricaHTML5, the open web, and what it means for you -Tech4Africa
HTML5, the open web, and what it means for you -Tech4Africa
Robert Nyman
 
Lipstick on a Magical Pony: dynamic web pages without Javascript
Lipstick on a Magical Pony: dynamic web pages without JavascriptLipstick on a Magical Pony: dynamic web pages without Javascript
Lipstick on a Magical Pony: dynamic web pages without Javascript
Tim Bell
 
UAE Saves Week
UAE  Saves WeekUAE  Saves Week
UAE Saves Week
nimameeja
 
Search APIs for Hack Days
Search APIs for Hack DaysSearch APIs for Hack Days
Search APIs for Hack Days
Martin Belam
 
Youkomlun
YoukomlunYoukomlun
Youkomlun
wongsrida
 
User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!
Greg Bell
 
Mundos de fantasía, Blaubloom
Mundos de fantasía, BlaubloomMundos de fantasía, Blaubloom
Mundos de fantasía, Blaubloom
MASmedia
 

What's hot (20)

The Devil Inside
The Devil InsideThe Devil Inside
The Devil Inside
 
20 Jo P Aug 08
20 Jo P Aug 0820 Jo P Aug 08
20 Jo P Aug 08
 
SlideShare Instant
SlideShare InstantSlideShare Instant
SlideShare Instant
 
SlideShare Instant
SlideShare InstantSlideShare Instant
SlideShare Instant
 
REST, the internet as a database?
REST, the internet as a database?REST, the internet as a database?
REST, the internet as a database?
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
 
Preparing a WordPress Plugin for Translation
Preparing a WordPress Plugin for TranslationPreparing a WordPress Plugin for Translation
Preparing a WordPress Plugin for Translation
 
My PPP Project / Digital Resume
My PPP Project / Digital ResumeMy PPP Project / Digital Resume
My PPP Project / Digital Resume
 
Select * from internet
Select * from internetSelect * from internet
Select * from internet
 
Add row in asp.net Gridview on button click using C# and vb.net
Add row in asp.net Gridview on button click using C# and vb.netAdd row in asp.net Gridview on button click using C# and vb.net
Add row in asp.net Gridview on button click using C# and vb.net
 
Catalogmakr teaser
Catalogmakr teaserCatalogmakr teaser
Catalogmakr teaser
 
Thairuralnet
ThairuralnetThairuralnet
Thairuralnet
 
Colección Primavera de Blaubloom
Colección Primavera de BlaubloomColección Primavera de Blaubloom
Colección Primavera de Blaubloom
 
HTML5, the open web, and what it means for you -Tech4Africa
HTML5, the open web, and what it means for you -Tech4AfricaHTML5, the open web, and what it means for you -Tech4Africa
HTML5, the open web, and what it means for you -Tech4Africa
 
Lipstick on a Magical Pony: dynamic web pages without Javascript
Lipstick on a Magical Pony: dynamic web pages without JavascriptLipstick on a Magical Pony: dynamic web pages without Javascript
Lipstick on a Magical Pony: dynamic web pages without Javascript
 
UAE Saves Week
UAE  Saves WeekUAE  Saves Week
UAE Saves Week
 
Search APIs for Hack Days
Search APIs for Hack DaysSearch APIs for Hack Days
Search APIs for Hack Days
 
Youkomlun
YoukomlunYoukomlun
Youkomlun
 
User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!User Experience is dead. Long live the user experience!
User Experience is dead. Long live the user experience!
 
Mundos de fantasía, Blaubloom
Mundos de fantasía, BlaubloomMundos de fantasía, Blaubloom
Mundos de fantasía, Blaubloom
 

Viewers also liked

Rails Is From Mars Ruby Is From Venus Presentation 1
Rails Is From Mars  Ruby Is From Venus Presentation 1Rails Is From Mars  Ruby Is From Venus Presentation 1
Rails Is From Mars Ruby Is From Venus Presentation 1
railsconf
 
Sd208 Ds%2 C0
Sd208 Ds%2 C0Sd208 Ds%2 C0
Sd208 Ds%2 C0
railsconf
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentation
railsconf
 
Smacking Git Around Advanced Git Tricks
Smacking Git Around   Advanced Git TricksSmacking Git Around   Advanced Git Tricks
Smacking Git Around Advanced Git Tricks
railsconf
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
nedirtv
 
Running The Show Configuration Management With Chef Presentation
Running The Show  Configuration Management With Chef PresentationRunning The Show  Configuration Management With Chef Presentation
Running The Show Configuration Management With Chef Presentation
railsconf
 
Quality Code With Cucumber Presentation
Quality Code With Cucumber PresentationQuality Code With Cucumber Presentation
Quality Code With Cucumber Presentation
railsconf
 

Viewers also liked (7)

Rails Is From Mars Ruby Is From Venus Presentation 1
Rails Is From Mars  Ruby Is From Venus Presentation 1Rails Is From Mars  Ruby Is From Venus Presentation 1
Rails Is From Mars Ruby Is From Venus Presentation 1
 
Sd208 Ds%2 C0
Sd208 Ds%2 C0Sd208 Ds%2 C0
Sd208 Ds%2 C0
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentation
 
Smacking Git Around Advanced Git Tricks
Smacking Git Around   Advanced Git TricksSmacking Git Around   Advanced Git Tricks
Smacking Git Around Advanced Git Tricks
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
Running The Show Configuration Management With Chef Presentation
Running The Show  Configuration Management With Chef PresentationRunning The Show  Configuration Management With Chef Presentation
Running The Show Configuration Management With Chef Presentation
 
Quality Code With Cucumber Presentation
Quality Code With Cucumber PresentationQuality Code With Cucumber Presentation
Quality Code With Cucumber Presentation
 

Similar to Rails 3 And The Real Secret To High Productivity Presentation

Merb jQuery
Merb jQueryMerb jQuery
Merb jQuery
Yehuda Katz
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
Wen-Tien Chang
 
Ajax On S2 Odp
Ajax On S2 OdpAjax On S2 Odp
Ajax On S2 Odp
ghessler
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
jeresig
 
Neil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do ItNeil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do It
Carsonified Team
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
John Brunswick
 
Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008
Rob
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?
goodfriday
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
Ignacio Coloma
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
Carles Farré
 
merb.intro
merb.intromerb.intro
merb.intro
pjb3
 
Widgets Tools Keynote
Widgets Tools KeynoteWidgets Tools Keynote
Widgets Tools Keynote
Michael Mahemoff
 
Merb Pluming - The Router
Merb Pluming - The RouterMerb Pluming - The Router
Merb Pluming - The Router
carllerche
 
Solr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJsSolr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJs
Wildan Maulana
 
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
Chris Toohey
 
Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosDjango - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazos
Igor Sobreira
 
Ajax ons2
Ajax ons2Ajax ons2
Ajax ons2
Chad Davis
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
Yi-Ting Cheng
 
Opensocial Codelab
Opensocial CodelabOpensocial Codelab
Opensocial Codelab
Pieter De Schepper
 
Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009
bturnbull
 

Similar to Rails 3 And The Real Secret To High Productivity Presentation (20)

Merb jQuery
Merb jQueryMerb jQuery
Merb jQuery
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
 
Ajax On S2 Odp
Ajax On S2 OdpAjax On S2 Odp
Ajax On S2 Odp
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
 
Neil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do ItNeil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do It
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
 
Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
 
merb.intro
merb.intromerb.intro
merb.intro
 
Widgets Tools Keynote
Widgets Tools KeynoteWidgets Tools Keynote
Widgets Tools Keynote
 
Merb Pluming - The Router
Merb Pluming - The RouterMerb Pluming - The Router
Merb Pluming - The Router
 
Solr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJsSolr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJs
 
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
 
Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosDjango - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazos
 
Ajax ons2
Ajax ons2Ajax ons2
Ajax ons2
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
 
Opensocial Codelab
Opensocial CodelabOpensocial Codelab
Opensocial Codelab
 
Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009
 

More from railsconf

Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby AmfIntegrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
railsconf
 
Don T Mock Yourself Out Presentation
Don T Mock Yourself Out PresentationDon T Mock Yourself Out Presentation
Don T Mock Yourself Out Presentation
railsconf
 
Gov 2 0 Transparency Collaboration And Participation In Practice Presentation
Gov 2 0  Transparency  Collaboration  And Participation In Practice PresentationGov 2 0  Transparency  Collaboration  And Participation In Practice Presentation
Gov 2 0 Transparency Collaboration And Participation In Practice Presentation
railsconf
 
Crate Packaging Standalone Ruby Applications
Crate  Packaging Standalone Ruby ApplicationsCrate  Packaging Standalone Ruby Applications
Crate Packaging Standalone Ruby Applications
railsconf
 
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
railsconf
 
Building A Mini Google High Performance Computing In Ruby
Building A Mini Google  High Performance Computing In RubyBuilding A Mini Google  High Performance Computing In Ruby
Building A Mini Google High Performance Computing In Ruby
railsconf
 
A Z Introduction To Ruby On Rails
A Z Introduction To Ruby On RailsA Z Introduction To Ruby On Rails
A Z Introduction To Ruby On Rails
railsconf
 
The Even Darker Art Of Rails Engines Presentation
The Even Darker Art Of Rails Engines PresentationThe Even Darker Art Of Rails Engines Presentation
The Even Darker Art Of Rails Engines Presentation
railsconf
 
Below And Beneath Tdd Test Last Development And Other Real World Test Patter...
Below And Beneath Tdd  Test Last Development And Other Real World Test Patter...Below And Beneath Tdd  Test Last Development And Other Real World Test Patter...
Below And Beneath Tdd Test Last Development And Other Real World Test Patter...
railsconf
 

More from railsconf (9)

Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby AmfIntegrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
 
Don T Mock Yourself Out Presentation
Don T Mock Yourself Out PresentationDon T Mock Yourself Out Presentation
Don T Mock Yourself Out Presentation
 
Gov 2 0 Transparency Collaboration And Participation In Practice Presentation
Gov 2 0  Transparency  Collaboration  And Participation In Practice PresentationGov 2 0  Transparency  Collaboration  And Participation In Practice Presentation
Gov 2 0 Transparency Collaboration And Participation In Practice Presentation
 
Crate Packaging Standalone Ruby Applications
Crate  Packaging Standalone Ruby ApplicationsCrate  Packaging Standalone Ruby Applications
Crate Packaging Standalone Ruby Applications
 
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
 
Building A Mini Google High Performance Computing In Ruby
Building A Mini Google  High Performance Computing In RubyBuilding A Mini Google  High Performance Computing In Ruby
Building A Mini Google High Performance Computing In Ruby
 
A Z Introduction To Ruby On Rails
A Z Introduction To Ruby On RailsA Z Introduction To Ruby On Rails
A Z Introduction To Ruby On Rails
 
The Even Darker Art Of Rails Engines Presentation
The Even Darker Art Of Rails Engines PresentationThe Even Darker Art Of Rails Engines Presentation
The Even Darker Art Of Rails Engines Presentation
 
Below And Beneath Tdd Test Last Development And Other Real World Test Patter...
Below And Beneath Tdd  Test Last Development And Other Real World Test Patter...Below And Beneath Tdd  Test Last Development And Other Real World Test Patter...
Below And Beneath Tdd Test Last Development And Other Real World Test Patter...
 

Recently uploaded

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 

Recently uploaded (20)

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 

Rails 3 And The Real Secret To High Productivity Presentation

  • 1. Rails 3 ..and the real secret to high productivity
  • 3. quot;You may have noticed that pretty much everyone in the Ruby camp are insultants with many of them being book authors attempting to capitalize on hype.quot; James McGovern
  • 4.
  • 5.
  • 6.
  • 7.
  • 9. The philosophy of Rails 3
  • 10.
  • 11.
  • 12.
  • 13. The progress of Rails 3
  • 14. New router Faster Route by subdomains, user agents, more Route to other Rack machinery
  • 15. map.with_options(:controller => quot;sessionsquot;) do |sessions| sessions.login quot;loginquot;, :action => quot;newquot;, :conditions => { :method => :get } sessions.connect quot;loginquot;, :action => quot;createquot;, :conditions => { :method => :post } sessions.logout quot;logoutquot;, :action => quot;destroyquot;, :conditions => { :method => :post } end controller :sessions do match 'logout', :via => :delete, :to => :destroy, :as => :logout match 'login' do get :new, :as => :login post :create end end
  • 16. map.resources :projects, :controller => 'project' do |projects| projects.resources :attachments projects.resources :participants, :collection => { :update_all => :put } projects.resources :companies, :has_many => :people, :has_one => :avatar end resources :projects, :controller => :project do resources :attachments resources :participants do put :update_all, :on => :collection end resources :companies do resources :people resource :avatar end end
  • 18. <%# => quot;I've hacked you good! <script>quot; %> <%= comment.body %> <%# => quot;I've hacked you bad! &lt;script&gt;quot; %> <%=h comment.body %> <%# => quot;I've hacked you good! &lt;script&gt;quot; %> <%= comment.body %> <%# => quot;I've hacked you bad! <script>quot; %> <%=raw comment.body %>
  • 19. def safe_helper(text) content_tag(:div, text) + tag(:br) end def needs_to_be_marked_safe_helper(text) (content_tag(:div, text) + quot;<br/>quot;).html_safe! end
  • 21. <%= link_to_remote quot;Deletequot;, :url => @comment, :method => :delete %> <a href=quot;#quot; onclick=quot;new Ajax.Request('/comments/1', {asynchronous:true, evalScripts:true, method:'delete'}); return false;quot;>Destroy</a> <%= link_to quot;Deletequot;, @comment, :remote => true, :method => :delete %> <a href=quot;/comments/1quot; data-remote=quot;truequot; data-method=quot;deletequot;>Destroy</a>
  • 22. <% remote_form_for(@comment) do %> <form action=quot;/commentsquot; class=quot;new_commentquot; id=quot;new_commentquot; method=quot;postquot; onsubmit=quot;new Ajax.Request('/comments', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;quot;> <% form_for(@comment, :remote => true) do %> <form action=quot;/commentsquot; class=quot;new_commentquot; id=quot;new_commentquot; method=quot;postquot; data-remote=quot;truequot;>
  • 23. <%= link_to quot;Deletequot;, @comment, :method => :delete %> <a href=quot;/comments/1quot; onclick=quot;var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'delete'); f.appendChild(m);f.submit();return false;quot;>Destroy</a> <a href=quot;/comments/1quot; data-method=quot;deletequot;>Destroy</a>
  • 24. <%= link_to quot;Deletequot;, @comment, :method => :delete, :confirm => quot;Are you sure?quot; %> <a href=quot;/comments/1quot; onclick=quot;if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'delete'); f.appendChild(m);f.submit(); };return false;quot;>Destroy</a> <a href=quot;/comments/1quot; data-method=quot;deletequot; data- confirm=quot;Are you sure?quot;>Destroy</a>
  • 25. $(document.body).observe(quot;clickquot;, function(event) { var element = event.findElement(quot;a['data-remote']quot;); if (element) { var method = element.readAttribute(quot;data-methodquot;) || quot;getquot;; new Ajax.Request(element.readAttribute(quot;hrefquot;), { method: method }); event.stop(); } });
  • 26. More agnosticism Action ORM Generators
  • 27. The great refactoring Abstract Controller + Action Dispatch Action Relation underpins Active Record Cherry picking from Active Support Speedy callbacks
  • 28. The real secret to high productivity
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. “Sure, whatever” Stakeholders every where
  • 36. “I don’t know how” “It’s just too hard” “I’d be bored senseless” “That would kill the abstraction”
  • 37.
  • 38.