SlideShare a Scribd company logo
Discutindo Rails
 e Arquiteturas

  a apresentação já vai começar ...
Discutindo Rails
 e Arquiteturas
Fabio Akita
www.akitaonrails.com
  @akitaonrails
Fabio Akita
www.akitaonrails.com
  @akitaonrails




  1990
Anos 80   Fim Anos 90   Século XXI
Anos 80               Fim Anos 90                    Século XXI

                                            Perl
Basic                 Pascal                              Java
                  C                   PHP

 dBase                    Delphi           Python         ABAP
   III
                                                                 Ruby
        Clipper
                                     ASP           .NET
                                                                 ObjC
                                    VB6
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
<prólogo>
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
Como o cliente      Como o Líder de    Como o Analista     Como o Programador   Como o Consultor de
    explicou         Projeto entendeu      desenhou               escreveu        Negócios descreveu




Como o projeto foi   Como Operações     Como o cliente foi                          O que o cliente
                                                             Como foi o suporte
  documentado           instalou            cobrado                                realmente queria
Requerimentos:
 ENTENDIDO!
.NET Architects Day - DNAD 2011
LOL
DESIGN
DESIGN
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
Pattern   PADRÃO
STANDARD


 Pattern   PADRÃO


 Default
“Pattern”
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
NÃO é “Standard”!
Christopher Alexander
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
cada padrão (“pattern”)
representa nosso melhor chute agora ...
  os padrões ainda são hipóteses, ... e
  portanto todos são tentativas, todos
  livres para evoluir sob o impacto de
   novas experiências e observações."

          Christopher Alexander
.NET Architects Day - DNAD 2011
2 + 2 = 5!
2 + 2 = 5!
2 + 2 = 4!
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
Aqui estão os fatos. Que   Aqui está a conclusão.
  conclusões podemos        Que fatos podemos
   chegar com eles?         suportar com eles?
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
80
20


     80
20


     80
          “Long Tail”
.NET Architects Day - DNAD 2011
</prólogo>
.NET Architects Day - DNAD 2011
Pequenos
 (Startups?)


   Grandes
(Enterprisey?)
Pequenos
       (Startups?)


D DD Grandes
  (Enterprisey?)
Pequenos
     (Startups?)


  DD ”
D ht  Grandes
“Lig
   (Enterprisey?)
Pequenos
 (Startups?)


   Grandes
(Enterprisey?)
.NET Architects Day - DNAD 2011
Complexidade
  Acidental
.NET Architects Day - DNAD 2011
Ruby on Rails é a melhor forma de desenvolver
qualquer aplicação Web.
.NET Architects Day - DNAD 2011
Todas as outras formas de desenvolver aplicações
Web são inferiores a Ruby on Rails.
.NET Architects Day - DNAD 2011
Ruby on Rails é uma das maneiras competentes
de se desenvolver aplicações Web em alguns
cenários.
1994
  (linguagem)




                  2004
(framework web)
1.8.7
  1.9.2
1.9.3-dev
 2.3.11
  3.0.7
3.1-RC1
1.8.7
  1.9.2
1.9.3-dev
 2.3.11
  3.0.7
3.1-RC1
1.8.7
  1.9.2
1.9.3-dev
 2.3.11
  3.0.7
3.1-RC1
1.8.7
  1.9.2
1.9.3-dev
 2.3.11
  3.0.7
3.1-RC1
.NET Architects Day - DNAD 2011
gem install rails

rails new nome_do_projeto
gem install rails

rails new nome_do_projeto
gem install rails

rails new nome_do_projeto

      SIM! Via CLI! :-P
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Request

       Web Server


   Rack Middlewares


                    Routes

       Controller

View                Model
Response                Request

           Web Server


     Rack Middlewares


                        Routes

           Controller

  View                  Model
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
~30 mil gems

  ~15 GB
.NET Architects Day - DNAD 2011
bundle install
RubyGems   Library Assembly (DLL)


  Rake            MSBuild


 Bundler          NuGet
> bundle list

Gems included by the bundle:   *   mail (2.2.19)
  * abstract (1.0.0)           *   mime-types (1.16)
  * actionmailer (3.0.7)       *   polyglot (0.3.1)
  * actionpack (3.0.7)         *   rack (1.2.2)
  * activemodel (3.0.7)        *   rack-mount (0.6.14)
  * activerecord (3.0.7)       *   rack-test (0.5.7)
  * activeresource (3.0.7)     *   rails (3.0.7)
  * activesupport (3.0.7)      *   railties (3.0.7)
  * arel (2.0.9)               *   rake (0.8.7)
  * builder (2.1.2)            *   sqlite3 (1.3.3)
  * bundler (1.0.13)           *   thor (0.14.6)
  * erubis (2.6.6)             *   treetop (1.4.9)
  * i18n (0.5.0)               *   tzinfo (0.3.27)
> bundle list

Gems included by the bundle:   *   mail (2.2.19)
  * abstract (1.0.0)           *   mime-types (1.16)
  * actionmailer (3.0.7)       *   polyglot (0.3.1)
  * actionpack (3.0.7)         *   rack (1.2.2)
  * activemodel (3.0.7)        *   rack-mount (0.6.14)
  * activerecord (3.0.7)       *   rack-test (0.5.7)
  * activeresource (3.0.7)     *   rails (3.0.7)
  * activesupport (3.0.7)      *   railties (3.0.7)
  * arel (2.0.9)               *   rake (0.8.7)
  * builder (2.1.2)            *   sqlite3 (1.3.3)
  * bundler (1.0.13)           *   thor (0.14.6)
  * erubis (2.6.6)             *   treetop (1.4.9)
  * i18n (0.5.0)               *   tzinfo (0.3.27)
> rake -T
                           rake   log:clear
rake   about               rake   middleware
rake   db:create           rake   notes
rake   db:drop             rake   notes:custom
rake   db:fixtures:load    rake   rails:template
rake   db:migrate          rake   rails:update
rake   db:migrate:status   rake   routes
rake   db:rollback         rake   secret
rake   db:schema:dump      rake   stats
rake   db:schema:load      rake   test
rake   db:seed             rake   test:recent
rake   db:setup            rake   test:uncommitted
rake   db:structure:dump   rake   time:zones:all
rake   db:version          rake   tmp:clear
rake   doc:app             rake   tmp:create
> rails generate
Usage: rails generate GENERATOR [args] [options]

General options:
  -h, [--help]       #   Print generator's options and usage
  -p, [--pretend]    #   Run but do not make any changes
  -f, [--force]      #   Overwrite files that already exist
  -s, [--skip]       #   Skip files that already exist
  -q, [--quiet]      #   Suppress status output

Please choose a generator below.

Rails:                   observer
  controller             performance_test
  generator              plugin
  helper                 resource
  integration_test       scaffold
  mailer                 scaffold_controller
  migration              session_migration
  model                  stylesheets
> rake middleware                                   Rack
                                                 Middlewares
use   ActionDispatch::Static
use   Rack::Lock
use   ActiveSupport::Cache::Strategy::LocalCache
use   Rack::Runtime
use   Rails::Rack::Logger
use   ActionDispatch::ShowExceptions
use   ActionDispatch::RemoteIp
use   Rack::Sendfile
use   ActionDispatch::Callbacks
use   ActiveRecord::ConnectionAdapters::ConnectionManagement
use   ActiveRecord::QueryCache
use   ActionDispatch::Cookies
use   ActionDispatch::Session::CookieStore
use   ActionDispatch::Flash
use   ActionDispatch::ParamsParser
use   Rack::MethodOverride
use   ActionDispatch::Head
use   ActionDispatch::BestStandardsSupport
run   Demo::Application.routes
Response                Request

           Web Server


     Rack Middlewares


                        Routes

           Controller

  View                  Model
Response                Request

           Web Server


     Rack Middlewares


                        Routes

           Controller

  View                  Model
Response                Request

           Web Server

                                  Application
     Rack Middlewares             Server Rack:
                                    Mongrel,
                        Routes       Thin,
                                   Passenger,
           Controller               Unicorn
  View                  Model
Web Server:
                                    NginX
Response                Request
                                   Apache
           Web Server

                                  Application
     Rack Middlewares             Server Rack:
                                    Mongrel,
                        Routes       Thin,
                                   Passenger,
           Controller               Unicorn
  View                  Model
NginX, Apache, Lighty, IIS



         Reverse Proxy




Mongrel, Thin, Unicorn, Passenger

   ActiveRecord/DataMapper



         RDBMS/NoSQL
NginX, Apache, Lighty, IIS



         Reverse Proxy




Mongrel, Thin, Unicorn, Passenger    TidyTDS
   ActiveRecord/DataMapper

                                    SQL Server
                                    SQL Azure
         RDBMS/NoSQL
NginX, Apache, Lighty, IIS



         Reverse Proxy




Mongrel, Thin, Unicorn, Passenger

   ActiveRecord/DataMapper
ActiveResource/RestClient/Savon

                                    WCF
        RDBMS/NoSQL
   Web Services (REST, SOAP)
HAProxy
    NginX, Apache, Lighty, IIS



         Reverse Proxy




Mongrel, Thin, Unicorn, Passenger

   ActiveRecord/DataMapper
ActiveResource/RestClient/Savon



        RDBMS/NoSQL
   Web Services (REST, SOAP)
HAProxy
    NginX, Apache, Lighty, IIS

                                    Varnish
         Reverse Proxy




Mongrel, Thin, Unicorn, Passenger

   ActiveRecord/DataMapper
ActiveResource/RestClient/Savon



        RDBMS/NoSQL
   Web Services (REST, SOAP)
HAProxy
    NginX, Apache, Lighty, IIS

                                     Varnish
         Reverse Proxy




Mongrel, Thin, Unicorn, Passenger

   ActiveRecord/DataMapper
ActiveResource/RestClient/Savon
                                    Memcache

        RDBMS/NoSQL
   Web Services (REST, SOAP)
Request   Request   Request     Request      Request   Request




HTTPD     HTTPD     HTTPD        HTTPD       HTTPD     HTTPD




 Rails     Rails     Rails           Rails    Rails     Rails
 App       App       App             App      App       App




                             RDBMS
Request   Request   Request     Request      Request   Request




HTTPD     HTTPD     HTTPD        HTTPD       HTTPD     HTTPD




 Rails     Rails     Rails           Rails    Rails     Rails
 App       App       App             App      App       App




                             RDBMS
Request   Request   Request     Request      Request   Request




HTTPD     HTTPD     HTTPD        HTTPD       HTTPD     HTTPD




 Rails     Rails     Rails           Rails    Rails     Rails
 App       App       App             App      App       App




 Mais curto                  RDBMS
 possível!
Thread Context Switch
Thread Context Switch
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
$(':checkbox').map(function() {
  return this.id;
}).get().join(',');
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
Rails
Request
          App
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
Eventos Assíncronos
Envio de mensagens
Request   Request   Request     Request      Request   Request




HTTPD     HTTPD     HTTPD        HTTPD       HTTPD     HTTPD




 Rails     Rails     Rails           Rails    Rails     Rails
 App       App       App             App      App       App




                             RDBMS
Request   Request   Request   Request   Request   Request




                          NginX




                          Event
                         Machine




                         RDBMS
Request   Request   Request   Request   Request   Request




                          NginX




                          Event
                         Machine         “Look Ma!
                                        No Threads!”


                         RDBMS
Request   Request   Request   Request   Request   Request




                          NginX

                                          5k ~ 10k
                                          conexões
                          Event
                         Machine         “Look Ma!
                                        No Threads!”


                         RDBMS
Request   Request   Request   Request   Request   Request




                          NginX

                                          5k ~ 10k
                                          conexões
     Conexões
      Longas              Event
                         Machine         “Look Ma!
                                        No Threads!”


                         RDBMS
.NET Architects Day - DNAD 2011
<script src="http://js.pusherapp.com/1.8/pusher.min.js">
</script>

<script>
var pusher = new Pusher('API_KEY');
var myChannel = pusher.subscribe('MEU_CANAL');
</script>
<script src="http://js.pusherapp.com/1.8/pusher.min.js">
</script>

<script>
var pusher = new Pusher('API_KEY');
var myChannel = pusher.subscribe('MEU_CANAL');
</script>
<script src="http://js.pusherapp.com/1.8/pusher.min.js">
</script>

<script>
var pusher = new Pusher('API_KEY');
var myChannel = pusher.subscribe('MEU_CANAL');
</script>
myChannel.bind('coisa-criada', function(thing) {
  alert('Uma coisa foi criada: ' + thing.name);
});
myChannel.bind('coisa-criada', function(thing) {
  alert('Uma coisa foi criada: ' + thing.name);
});
myChannel.bind('coisa-criada', function(thing) {
  alert('Uma coisa foi criada: ' + thing.name);
});
require 'pusher'

Pusher.app_id = 'APP_ID'
Pusher.key = 'API_KEY'
Pusher.secret = 'SECRET_KEY'

class ThingsController < ApplicationController
  def create
    @thing = Thing.new(params[:thing])

    if @thing.save
      Pusher['MEU_CANAL'].trigger('coisa-criada',
        @thing.attributes)
    end
  end
end
require 'pusher'

Pusher.app_id = 'APP_ID'
Pusher.key = 'API_KEY'
Pusher.secret = 'SECRET_KEY'

class ThingsController < ApplicationController
  def create
    @thing = Thing.new(params[:thing])

    if @thing.save
      Pusher['MEU_CANAL'].trigger('coisa-criada',
        @thing.attributes)
    end
  end
end
require 'pusher'

Pusher.app_id = 'APP_ID'
Pusher.key = 'API_KEY'
Pusher.secret = 'SECRET_KEY'

class ThingsController < ApplicationController
  def create
    @thing = Thing.new(params[:thing])

    if @thing.save
      Pusher['MEU_CANAL'].trigger('coisa-criada',
        @thing.attributes)
    end
  end
end
require 'pusher'

Pusher.app_id = 'APP_ID'
Pusher.key = 'API_KEY'
Pusher.secret = 'SECRET_KEY'

class ThingsController < ApplicationController
  def create
    @thing = Thing.new(params[:thing])

    if @thing.save
      Pusher['MEU_CANAL'].trigger('coisa-criada',
        @thing.attributes)
    end
  end
end
Arquitetura de
Altíssima Concorrência
(
W. Edward Deming
.NET Architects Day - DNAD 2011
IN GOD WE TRUST
Todos os outros devem trazer dados
.NET Architects Day - DNAD 2011
EXPERIENCE BY ITSELF BRINGS
           NOTHING
Ciclo “Plan-Do-Check-Act”
       (melhoria contínua)




 P A
 D C
Ciclo “Plan-Do-Check-Act”
       (melhoria contínua)




 P A
 D C
      STANDARD
Ciclo “Plan-Do-Check-Act”
       (melhoria contínua)




 P A
 D C
Ciclo “Plan-Do-Check-Act”
       (melhoria contínua)




        P A
        D C
Ciclo “Plan-Do-Check-Act”
       (melhoria contínua)




                      P A
                      D C
Ciclo “Plan-Do-Check-Act”
       (melhoria contínua)



                             P A
                             D C
)
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
Perl
.NET Architects Day - DNAD 2011
Python
.NET Architects Day - DNAD 2011
PHP
.NET Architects Day - DNAD 2011
Ruby
OMG!
2011

2010



2009




2008

2007   Ruby on Rails
2011

2010



2009




          2.0.5

2008                           6
2007   Ruby on Rails   2.0.0
2011

2010



2009

         2.1.2

          2.0.5                3
                       2.1.0
2008                           6
2007   Ruby on Rails   2.0.0
2011

2010

         2.2.3
2009

         2.1.2
                               4
                       2.2.0
          2.0.5                3
                       2.1.0
2008                           6
2007   Ruby on Rails   2.0.0
2011     2.3.11
2010

         2.2.3
                               12
2009
                       2.3.0

         2.1.2
                               4
                       2.2.0
          2.0.5                3
                       2.1.0
2008                           6
2007   Ruby on Rails   2.0.0
3.0.7

         2.3.11
                               8
2011

2010                   3.0.0
         2.2.3
                               12
2009
                       2.3.0

         2.1.2
                               4
                       2.2.0
          2.0.5                3
                       2.1.0
2008                           6
2007   Ruby on Rails   2.0.0
3.0.7

2011     2.3.11
2010                   3.0.0
         2.2.3
2009

         2.1.2
                       2.3.0
                               31
                       2.2.0   Versões!

          2.0.5
                       2.1.0
2008

2007   Ruby on Rails   2.0.0
.NET Architects Day - DNAD 2011
Request



          Web Server




                      Rails
                      App


/public/stylesheets
Request



                      Web Server


Arquivos
Estáticos                         Rails
                                  App


            /public/stylesheets
.NET Architects Day - DNAD 2011
Variáveis
$blue: #3bbfce;
$margin: 16px;            /* CSS */

.content-navigation {     .content-navigation {
  border-color: $blue;      border-color: #3bbfce;
  color:                    color: #2b9eab;
    darken($blue, 9%);    }
}
                          .border {
.border {                   padding: 8px;
  padding: $margin / 2;     margin: 8px;
  margin: $margin / 2;      border-color: #3bbfce;
  border-color: $blue;    }
}
Nesting
table.hl {               /* CSS */
  margin: 2em 0;
  td.ln {                table.hl {
    text-align: right;     margin: 2em 0;
  }                      }
}                        table.hl td.ln {
                           text-align: right;
li {                     }
  font: {
     family: serif;      li {
     weight: bold;         font-family: serif;
     size: 1.2em;          font-weight: bold;
  }                        font-size: 1.2em;
}                        }
Mixins
@mixin table-base {
  th {
                          /* CSS */
    text-align: center;
    font-weight: bold;
                          #data {
  }
  td, th {padding: 2px}     float: left;
}                           margin-left: 10px;
                          }
@mixin left($dist) {      #data th {
  float: left;              text-align: center;
  margin-left: $dist;       font-weight: bold;
}
                          }
                          #data td, #data th {
#data {
  @include left(10px);      padding: 2px;
  @include table-base;    }
}
Selector Inheritance
                       /* CSS */

.error {
                       .error, .badError {
  border: 1px #f00;
                         border: 1px #f00;
  background: #fdd;
                         background: #fdd;
}
                       }
.error.intrusion {
  font-size: 1.3em;
                       .error.intrusion,
  font-weight: bold;
                       .badError.intrusion {
}
                         font-size: 1.3em;
                         font-weight: bold;
.badError {
                       }
  @extend .error;
  border-width: 3px;
                       .badError {
}
                         border-width: 3px;
                       }
.NET Architects Day - DNAD 2011
class Animal
  constructor: (@name) ->

  move: (meters) ->
    alert @name + " moved " + meters + "m."

class Snake extends Animal
  move: ->
    alert "Slithering..."
    super 5

class Horse extends Animal
  move: ->
    alert "Galloping..."
    super 45

sam = new Snake "Sammy the Python"
tom = new Horse "Tommy the Palomino"

sam.move()
tom.move()
var Animal, Horse, Snake, sam, tom;
                                              var __hasProp = Object.prototype.hasOwnProperty,
                                              __extends = function(child, parent) {
                                                 for (var key in parent) { if (__hasProp.call(parent,
                                              key)) child[key] = parent[key]; }
                                                 function ctor() { this.constructor = child; }
                                                 ctor.prototype = parent.prototype;
                                                 child.prototype = new ctor;
class Animal                                     child.__super__ = parent.prototype;
  constructor: (@name) ->                        return child;
                                              };
                                              Animal = (function() {
  move: (meters) ->                              function Animal(name) {
                                                    this.name = name;
    alert @name + " moved " + meters + "m."      }
                                                 Animal.prototype.move = function(meters) {
                                                    return alert(this.name + " moved " + meters + "m.");
class Snake extends Animal                       };
                                                 return Animal;
  move: ->                                    })();
    alert "Slithering..."                     Snake = (function() {
                                                 __extends(Snake, Animal);
    super 5                                      function Snake() {
                                                    Snake.__super__.constructor.apply(this, arguments);
                                                 }
class Horse extends Animal                       Snake.prototype.move = function() {
                                                    alert("Slithering...");
  move: ->                                          return Snake.__super__.move.call(this, 5);
    alert "Galloping..."                         };
                                                 return Snake;
    super 45                                  })();
                                              Horse = (function() {
                                                 __extends(Horse, Animal);
sam = new Snake "Sammy the Python"               function Horse() {
tom = new Horse "Tommy the Palomino"                Horse.__super__.constructor.apply(this, arguments);
                                                 }
                                                 Horse.prototype.move = function() {
                                                    alert("Galloping...");
sam.move()                                          return Horse.__super__.move.call(this, 45);
tom.move()                                       };
                                                 return Horse;
                                              })();
                                              sam = new Snake("Sammy the Python");
                                              tom = new Horse("Tommy the Palomino");
                                              sam.move();
                                              tom.move();
                                              loadrun
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
102
Request          Request


   Web Server       Web Server
(Desenvolvimento)   (Produção)




                               Rails
                               App




 /app/assets         /public
Request          Request


   Web Server       Web Server
(Desenvolvimento)   (Produção)




                               Rails
    Sprockets
                               App




 /app/assets         /public
Request          Request


   Web Server       Web Server
(Desenvolvimento)   (Produção)




                               Rails
    Sprockets
                               App

      Tilt




 /app/assets         /public
Request          Request


   Web Server       Web Server
(Desenvolvimento)   (Produção)




                               Rails
    Sprockets
                               App

       Tilt

     Ugli er



 /app/assets         /public
ENGINE                 FILE EXTENSIONS         REQUIRED LIBRARIES

ERB                    .erb, .rhtml
                                               none
Interpolated String    .str

Erubis                 .erb, .rhtml, .erubis   erubis

Haml                   .haml                   haml

Sass                   .sass
                                               sass
Scss                   .scss

Less CSS               .less                   less

Builder                .builder                builder

Liquid                 .liquid                 liquid

RDiscount                                      rdiscount

Redcarpet                                      redcarpet

BlueCloth              .markdown, .mkd, .md    bluecloth

Kramdown                                       kramdown

Maruku                                         maruku

RedCloth               .textile                redcloth

RDoc                   .rdoc                   rdoc

Radius                 .radius                 radius

Markaby                .mab                    markaby

Nokogiri               .nokogiri               nokogiri

CoffeeScript           .coffee                 coffee-script

Creole (Wiki markup)   .creole                 creole
Rails 3.1:
Release Candidate
   (may 2011)
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
RubyConf
     Brasil
3 e 4 de Novembro
    www.rubyconf.com.br
<epílogo>
Pedro Franceschi
     @pedroh96
15 anos


Pedro Franceschi
     @pedroh96
9 anos


Pedro Franceschi
     @pedroh96
6 anos


Pedro Franceschi
     @pedroh96
Pedro Franceschi
     @pedroh96
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
</epílogo>
Obrigado!
 www.akitaonrails.com
  u.akita.ws/dnad11




 .com.br

More Related Content

PDF
Security Goodness with Ruby on Rails
PDF
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
PDF
Debugging on rails
PDF
O que há de novo no Rails 3
KEY
Ruby on Rails Training - Module 1
PDF
Ror Seminar With agilebd.org on 23 Jan09
PDF
A Tale of a Server Architecture (Frozen Rails 2012)
PDF
TorqueBox for Rubyists
Security Goodness with Ruby on Rails
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Debugging on rails
O que há de novo no Rails 3
Ruby on Rails Training - Module 1
Ror Seminar With agilebd.org on 23 Jan09
A Tale of a Server Architecture (Frozen Rails 2012)
TorqueBox for Rubyists

What's hot (20)

PPTX
Apache camel overview dec 2011
PDF
Cloud Foundry Open Tour China
PDF
TorqueBox at DC:JBUG - November 2011
PPTX
Apache con 2011 gd
PDF
Introduction to Apache Camel
PPTX
Apache Camel: The Swiss Army Knife of Open Source Integration
PDF
Complex Made Simple: Sleep Better with TorqueBox
PDF
At Scale With Style
PDF
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
PDF
Rails Metal, Rack, and Sinatra
KEY
Ruby on Rails survival guide of an aged Java developer
PDF
DataMapper on Infinispan
PDF
Cloud Foundry Open Tour China (english)
ZIP
My sql replication advanced techniques presentation
PDF
Jaoo Michael Neale 09
KEY
Devignition 2011
PDF
RubyGems 3 & 4
KEY
TorqueBox - Ruby Hoedown 2011
PDF
When Ruby Meets Java - The Power of Torquebox
PDF
JUDCon 2010 Boston : BoxGrinder
Apache camel overview dec 2011
Cloud Foundry Open Tour China
TorqueBox at DC:JBUG - November 2011
Apache con 2011 gd
Introduction to Apache Camel
Apache Camel: The Swiss Army Knife of Open Source Integration
Complex Made Simple: Sleep Better with TorqueBox
At Scale With Style
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
Rails Metal, Rack, and Sinatra
Ruby on Rails survival guide of an aged Java developer
DataMapper on Infinispan
Cloud Foundry Open Tour China (english)
My sql replication advanced techniques presentation
Jaoo Michael Neale 09
Devignition 2011
RubyGems 3 & 4
TorqueBox - Ruby Hoedown 2011
When Ruby Meets Java - The Power of Torquebox
JUDCon 2010 Boston : BoxGrinder
Ad

Viewers also liked (20)

PDF
Claretiano 2009
PDF
Rails Summit - De Volta Ao Básico
PDF
Encontro de TI - Arteccom
PDF
Fisl - Deployment
PDF
Campus Party 2010
PDF
Making Rails Really restful
PDF
Oxente on Rails 2009
PDF
Rails Admin - Guru SP
PPTX
Evolución y retos de la educación virtual diapositivas
PPTX
Back exercises 1
PPS
PPTX
Prezentatsia111
PPTX
Equipo 3 redes sociales
PPTX
TIENDA DE ROPA
PPTX
G2 Marketing Digital - Rio Country Fest
PDF
Garrido Saúde
PDF
Class Exercise1-Image size
PDF
Guia j clic_br
PPTX
Halloween =)
PDF
hbstudy37 doc
Claretiano 2009
Rails Summit - De Volta Ao Básico
Encontro de TI - Arteccom
Fisl - Deployment
Campus Party 2010
Making Rails Really restful
Oxente on Rails 2009
Rails Admin - Guru SP
Evolución y retos de la educación virtual diapositivas
Back exercises 1
Prezentatsia111
Equipo 3 redes sociales
TIENDA DE ROPA
G2 Marketing Digital - Rio Country Fest
Garrido Saúde
Class Exercise1-Image size
Guia j clic_br
Halloween =)
hbstudy37 doc
Ad

Similar to .NET Architects Day - DNAD 2011 (20)

PDF
Rack
PDF
Deployment de Rails
PPTX
Rails in the bowels
PPT
Ruby on Rails workshop for beginner
KEY
Speedy TDD with Rails
PDF
RoR 101: Session 3
PDF
Rs on Rails 2011
PDF
Intro to Rack
PPTX
Asp.Net MVC3 - Basics
PDF
Ricardo Sanchez - Ruby projects of interest for devops
PDF
Ruby projects of interest for DevOps
PPTX
StrongLoop Overview
KEY
Wider than rails
KEY
Ruby On Rails
PDF
Connecting the Worlds of Java and Ruby with JRuby
PDF
Going serverless
KEY
Sinatra for REST services
PDF
Introduction to Rails - presented by Arman Ortega
PPTX
Sinatra
PDF
Ruby on Rails : 簡介與入門
Rack
Deployment de Rails
Rails in the bowels
Ruby on Rails workshop for beginner
Speedy TDD with Rails
RoR 101: Session 3
Rs on Rails 2011
Intro to Rack
Asp.Net MVC3 - Basics
Ricardo Sanchez - Ruby projects of interest for devops
Ruby projects of interest for DevOps
StrongLoop Overview
Wider than rails
Ruby On Rails
Connecting the Worlds of Java and Ruby with JRuby
Going serverless
Sinatra for REST services
Introduction to Rails - presented by Arman Ortega
Sinatra
Ruby on Rails : 簡介與入門

More from Fabio Akita (20)

PDF
Devconf 2019 - São Carlos
PDF
Meetup Nerdzão - English Talk about Languages
PDF
Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018
PDF
Desmistificando Blockchains - 20o Encontro Locaweb SP
PDF
Desmistificando Blockchains - Insiter Goiania
PDF
Blockchain em 7 minutos - 7Masters
PDF
Elixir -Tolerância a Falhas para Adultos - GDG Campinas
PDF
Desmistificando Mitos de Tech Startups - Intercon 2017
PDF
30 Days to Elixir and Crystal and Back to Ruby
PDF
Uma Discussão sobre a Carreira de TI
PDF
THE CONF - Opening Keynote
PDF
A Journey through New Languages - Rancho Dev 2017
PDF
Desmistificando Mitos de Startups - Sebrae - AP
PDF
A Journey through New Languages - Guru Sorocaba 2017
PDF
A Journey through New Languages - Insiter 2017
PDF
A Journey through New Languages - Locaweb Tech Day
PDF
A Journey through new Languages - Intercon 2016
PDF
Premature Optimization 2.0 - Intercon 2016
PDF
Conexão Kinghost - Otimização Prematura
PDF
The Open Commerce Conference - Premature Optimisation: The Root of All Evil
Devconf 2019 - São Carlos
Meetup Nerdzão - English Talk about Languages
Desmistificando Blockchains p/ Developers - Criciuma Dev Conf 2018
Desmistificando Blockchains - 20o Encontro Locaweb SP
Desmistificando Blockchains - Insiter Goiania
Blockchain em 7 minutos - 7Masters
Elixir -Tolerância a Falhas para Adultos - GDG Campinas
Desmistificando Mitos de Tech Startups - Intercon 2017
30 Days to Elixir and Crystal and Back to Ruby
Uma Discussão sobre a Carreira de TI
THE CONF - Opening Keynote
A Journey through New Languages - Rancho Dev 2017
Desmistificando Mitos de Startups - Sebrae - AP
A Journey through New Languages - Guru Sorocaba 2017
A Journey through New Languages - Insiter 2017
A Journey through New Languages - Locaweb Tech Day
A Journey through new Languages - Intercon 2016
Premature Optimization 2.0 - Intercon 2016
Conexão Kinghost - Otimização Prematura
The Open Commerce Conference - Premature Optimisation: The Root of All Evil

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Big Data Technologies - Introduction.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Encapsulation theory and applications.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Approach and Philosophy of On baking technology
KodekX | Application Modernization Development
Digital-Transformation-Roadmap-for-Companies.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The AUB Centre for AI in Media Proposal.docx
Building Integrated photovoltaic BIPV_UPV.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction
Understanding_Digital_Forensics_Presentation.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
NewMind AI Weekly Chronicles - August'25 Week I
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Encapsulation theory and applications.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
NewMind AI Monthly Chronicles - July 2025
Approach and Philosophy of On baking technology

.NET Architects Day - DNAD 2011

  • 1. Discutindo Rails e Arquiteturas a apresentação já vai começar ...
  • 2. Discutindo Rails e Arquiteturas
  • 4. Fabio Akita www.akitaonrails.com @akitaonrails 1990
  • 5. Anos 80 Fim Anos 90 Século XXI
  • 6. Anos 80 Fim Anos 90 Século XXI Perl Basic Pascal Java C PHP dBase Delphi Python ABAP III Ruby Clipper ASP .NET ObjC VB6
  • 15. Como o cliente Como o Líder de Como o Analista Como o Programador Como o Consultor de explicou Projeto entendeu desenhou escreveu Negócios descreveu Como o projeto foi Como Operações Como o cliente foi O que o cliente Como foi o suporte documentado instalou cobrado realmente queria
  • 18. LOL
  • 23. Pattern PADRÃO
  • 24. STANDARD Pattern PADRÃO Default
  • 34. cada padrão (“pattern”) representa nosso melhor chute agora ... os padrões ainda são hipóteses, ... e portanto todos são tentativas, todos livres para evoluir sob o impacto de novas experiências e observações." Christopher Alexander
  • 36. 2 + 2 = 5!
  • 37. 2 + 2 = 5!
  • 38. 2 + 2 = 4!
  • 44. Aqui estão os fatos. Que Aqui está a conclusão. conclusões podemos Que fatos podemos chegar com eles? suportar com eles?
  • 56. 80
  • 57. 20 80
  • 58. 20 80 “Long Tail”
  • 62. Pequenos (Startups?) Grandes (Enterprisey?)
  • 63. Pequenos (Startups?) D DD Grandes (Enterprisey?)
  • 64. Pequenos (Startups?) DD ” D ht Grandes “Lig (Enterprisey?)
  • 65. Pequenos (Startups?) Grandes (Enterprisey?)
  • 69. Ruby on Rails é a melhor forma de desenvolver qualquer aplicação Web.
  • 71. Todas as outras formas de desenvolver aplicações Web são inferiores a Ruby on Rails.
  • 73. Ruby on Rails é uma das maneiras competentes de se desenvolver aplicações Web em alguns cenários.
  • 74. 1994 (linguagem) 2004 (framework web)
  • 75. 1.8.7 1.9.2 1.9.3-dev 2.3.11 3.0.7 3.1-RC1
  • 76. 1.8.7 1.9.2 1.9.3-dev 2.3.11 3.0.7 3.1-RC1
  • 77. 1.8.7 1.9.2 1.9.3-dev 2.3.11 3.0.7 3.1-RC1
  • 78. 1.8.7 1.9.2 1.9.3-dev 2.3.11 3.0.7 3.1-RC1
  • 80. gem install rails rails new nome_do_projeto
  • 81. gem install rails rails new nome_do_projeto
  • 82. gem install rails rails new nome_do_projeto SIM! Via CLI! :-P
  • 83. Request Web Server Rack Middlewares Routes Controller View Model
  • 84. Request Web Server Rack Middlewares Routes Controller View Model
  • 85. Request Web Server Rack Middlewares Routes Controller View Model
  • 86. Request Web Server Rack Middlewares Routes Controller View Model
  • 87. Request Web Server Rack Middlewares Routes Controller View Model
  • 88. Request Web Server Rack Middlewares Routes Controller View Model
  • 89. Request Web Server Rack Middlewares Routes Controller View Model
  • 90. Request Web Server Rack Middlewares Routes Controller View Model
  • 91. Request Web Server Rack Middlewares Routes Controller View Model
  • 92. Request Web Server Rack Middlewares Routes Controller View Model
  • 93. Response Request Web Server Rack Middlewares Routes Controller View Model
  • 96. ~30 mil gems ~15 GB
  • 99. RubyGems Library Assembly (DLL) Rake MSBuild Bundler NuGet
  • 100. > bundle list Gems included by the bundle: * mail (2.2.19) * abstract (1.0.0) * mime-types (1.16) * actionmailer (3.0.7) * polyglot (0.3.1) * actionpack (3.0.7) * rack (1.2.2) * activemodel (3.0.7) * rack-mount (0.6.14) * activerecord (3.0.7) * rack-test (0.5.7) * activeresource (3.0.7) * rails (3.0.7) * activesupport (3.0.7) * railties (3.0.7) * arel (2.0.9) * rake (0.8.7) * builder (2.1.2) * sqlite3 (1.3.3) * bundler (1.0.13) * thor (0.14.6) * erubis (2.6.6) * treetop (1.4.9) * i18n (0.5.0) * tzinfo (0.3.27)
  • 101. > bundle list Gems included by the bundle: * mail (2.2.19) * abstract (1.0.0) * mime-types (1.16) * actionmailer (3.0.7) * polyglot (0.3.1) * actionpack (3.0.7) * rack (1.2.2) * activemodel (3.0.7) * rack-mount (0.6.14) * activerecord (3.0.7) * rack-test (0.5.7) * activeresource (3.0.7) * rails (3.0.7) * activesupport (3.0.7) * railties (3.0.7) * arel (2.0.9) * rake (0.8.7) * builder (2.1.2) * sqlite3 (1.3.3) * bundler (1.0.13) * thor (0.14.6) * erubis (2.6.6) * treetop (1.4.9) * i18n (0.5.0) * tzinfo (0.3.27)
  • 102. > rake -T rake log:clear rake about rake middleware rake db:create rake notes rake db:drop rake notes:custom rake db:fixtures:load rake rails:template rake db:migrate rake rails:update rake db:migrate:status rake routes rake db:rollback rake secret rake db:schema:dump rake stats rake db:schema:load rake test rake db:seed rake test:recent rake db:setup rake test:uncommitted rake db:structure:dump rake time:zones:all rake db:version rake tmp:clear rake doc:app rake tmp:create
  • 103. > rails generate Usage: rails generate GENERATOR [args] [options] General options: -h, [--help] # Print generator's options and usage -p, [--pretend] # Run but do not make any changes -f, [--force] # Overwrite files that already exist -s, [--skip] # Skip files that already exist -q, [--quiet] # Suppress status output Please choose a generator below. Rails: observer controller performance_test generator plugin helper resource integration_test scaffold mailer scaffold_controller migration session_migration model stylesheets
  • 104. > rake middleware Rack Middlewares use ActionDispatch::Static use Rack::Lock use ActiveSupport::Cache::Strategy::LocalCache use Rack::Runtime use Rails::Rack::Logger use ActionDispatch::ShowExceptions use ActionDispatch::RemoteIp use Rack::Sendfile use ActionDispatch::Callbacks use ActiveRecord::ConnectionAdapters::ConnectionManagement use ActiveRecord::QueryCache use ActionDispatch::Cookies use ActionDispatch::Session::CookieStore use ActionDispatch::Flash use ActionDispatch::ParamsParser use Rack::MethodOverride use ActionDispatch::Head use ActionDispatch::BestStandardsSupport run Demo::Application.routes
  • 105. Response Request Web Server Rack Middlewares Routes Controller View Model
  • 106. Response Request Web Server Rack Middlewares Routes Controller View Model
  • 107. Response Request Web Server Application Rack Middlewares Server Rack: Mongrel, Routes Thin, Passenger, Controller Unicorn View Model
  • 108. Web Server: NginX Response Request Apache Web Server Application Rack Middlewares Server Rack: Mongrel, Routes Thin, Passenger, Controller Unicorn View Model
  • 109. NginX, Apache, Lighty, IIS Reverse Proxy Mongrel, Thin, Unicorn, Passenger ActiveRecord/DataMapper RDBMS/NoSQL
  • 110. NginX, Apache, Lighty, IIS Reverse Proxy Mongrel, Thin, Unicorn, Passenger TidyTDS ActiveRecord/DataMapper SQL Server SQL Azure RDBMS/NoSQL
  • 111. NginX, Apache, Lighty, IIS Reverse Proxy Mongrel, Thin, Unicorn, Passenger ActiveRecord/DataMapper ActiveResource/RestClient/Savon WCF RDBMS/NoSQL Web Services (REST, SOAP)
  • 112. HAProxy NginX, Apache, Lighty, IIS Reverse Proxy Mongrel, Thin, Unicorn, Passenger ActiveRecord/DataMapper ActiveResource/RestClient/Savon RDBMS/NoSQL Web Services (REST, SOAP)
  • 113. HAProxy NginX, Apache, Lighty, IIS Varnish Reverse Proxy Mongrel, Thin, Unicorn, Passenger ActiveRecord/DataMapper ActiveResource/RestClient/Savon RDBMS/NoSQL Web Services (REST, SOAP)
  • 114. HAProxy NginX, Apache, Lighty, IIS Varnish Reverse Proxy Mongrel, Thin, Unicorn, Passenger ActiveRecord/DataMapper ActiveResource/RestClient/Savon Memcache RDBMS/NoSQL Web Services (REST, SOAP)
  • 115. Request Request Request Request Request Request HTTPD HTTPD HTTPD HTTPD HTTPD HTTPD Rails Rails Rails Rails Rails Rails App App App App App App RDBMS
  • 116. Request Request Request Request Request Request HTTPD HTTPD HTTPD HTTPD HTTPD HTTPD Rails Rails Rails Rails Rails Rails App App App App App App RDBMS
  • 117. Request Request Request Request Request Request HTTPD HTTPD HTTPD HTTPD HTTPD HTTPD Rails Rails Rails Rails Rails Rails App App App App App App Mais curto RDBMS possível!
  • 122. $(':checkbox').map(function() { return this.id; }).get().join(',');
  • 133. Request Request Request Request Request Request HTTPD HTTPD HTTPD HTTPD HTTPD HTTPD Rails Rails Rails Rails Rails Rails App App App App App App RDBMS
  • 134. Request Request Request Request Request Request NginX Event Machine RDBMS
  • 135. Request Request Request Request Request Request NginX Event Machine “Look Ma! No Threads!” RDBMS
  • 136. Request Request Request Request Request Request NginX 5k ~ 10k conexões Event Machine “Look Ma! No Threads!” RDBMS
  • 137. Request Request Request Request Request Request NginX 5k ~ 10k conexões Conexões Longas Event Machine “Look Ma! No Threads!” RDBMS
  • 139. <script src="http://js.pusherapp.com/1.8/pusher.min.js"> </script> <script> var pusher = new Pusher('API_KEY'); var myChannel = pusher.subscribe('MEU_CANAL'); </script>
  • 140. <script src="http://js.pusherapp.com/1.8/pusher.min.js"> </script> <script> var pusher = new Pusher('API_KEY'); var myChannel = pusher.subscribe('MEU_CANAL'); </script>
  • 141. <script src="http://js.pusherapp.com/1.8/pusher.min.js"> </script> <script> var pusher = new Pusher('API_KEY'); var myChannel = pusher.subscribe('MEU_CANAL'); </script>
  • 142. myChannel.bind('coisa-criada', function(thing) { alert('Uma coisa foi criada: ' + thing.name); });
  • 143. myChannel.bind('coisa-criada', function(thing) { alert('Uma coisa foi criada: ' + thing.name); });
  • 144. myChannel.bind('coisa-criada', function(thing) { alert('Uma coisa foi criada: ' + thing.name); });
  • 145. require 'pusher' Pusher.app_id = 'APP_ID' Pusher.key = 'API_KEY' Pusher.secret = 'SECRET_KEY' class ThingsController < ApplicationController def create @thing = Thing.new(params[:thing]) if @thing.save Pusher['MEU_CANAL'].trigger('coisa-criada', @thing.attributes) end end end
  • 146. require 'pusher' Pusher.app_id = 'APP_ID' Pusher.key = 'API_KEY' Pusher.secret = 'SECRET_KEY' class ThingsController < ApplicationController def create @thing = Thing.new(params[:thing]) if @thing.save Pusher['MEU_CANAL'].trigger('coisa-criada', @thing.attributes) end end end
  • 147. require 'pusher' Pusher.app_id = 'APP_ID' Pusher.key = 'API_KEY' Pusher.secret = 'SECRET_KEY' class ThingsController < ApplicationController def create @thing = Thing.new(params[:thing]) if @thing.save Pusher['MEU_CANAL'].trigger('coisa-criada', @thing.attributes) end end end
  • 148. require 'pusher' Pusher.app_id = 'APP_ID' Pusher.key = 'API_KEY' Pusher.secret = 'SECRET_KEY' class ThingsController < ApplicationController def create @thing = Thing.new(params[:thing]) if @thing.save Pusher['MEU_CANAL'].trigger('coisa-criada', @thing.attributes) end end end
  • 150. (
  • 153. IN GOD WE TRUST Todos os outros devem trazer dados
  • 155. EXPERIENCE BY ITSELF BRINGS NOTHING
  • 156. Ciclo “Plan-Do-Check-Act” (melhoria contínua) P A D C
  • 157. Ciclo “Plan-Do-Check-Act” (melhoria contínua) P A D C STANDARD
  • 158. Ciclo “Plan-Do-Check-Act” (melhoria contínua) P A D C
  • 159. Ciclo “Plan-Do-Check-Act” (melhoria contínua) P A D C
  • 160. Ciclo “Plan-Do-Check-Act” (melhoria contínua) P A D C
  • 161. Ciclo “Plan-Do-Check-Act” (melhoria contínua) P A D C
  • 162. )
  • 170. Perl
  • 172. Python
  • 174. PHP
  • 176. Ruby
  • 177. OMG!
  • 178. 2011 2010 2009 2008 2007 Ruby on Rails
  • 179. 2011 2010 2009 2.0.5 2008 6 2007 Ruby on Rails 2.0.0
  • 180. 2011 2010 2009 2.1.2 2.0.5 3 2.1.0 2008 6 2007 Ruby on Rails 2.0.0
  • 181. 2011 2010 2.2.3 2009 2.1.2 4 2.2.0 2.0.5 3 2.1.0 2008 6 2007 Ruby on Rails 2.0.0
  • 182. 2011 2.3.11 2010 2.2.3 12 2009 2.3.0 2.1.2 4 2.2.0 2.0.5 3 2.1.0 2008 6 2007 Ruby on Rails 2.0.0
  • 183. 3.0.7 2.3.11 8 2011 2010 3.0.0 2.2.3 12 2009 2.3.0 2.1.2 4 2.2.0 2.0.5 3 2.1.0 2008 6 2007 Ruby on Rails 2.0.0
  • 184. 3.0.7 2011 2.3.11 2010 3.0.0 2.2.3 2009 2.1.2 2.3.0 31 2.2.0 Versões! 2.0.5 2.1.0 2008 2007 Ruby on Rails 2.0.0
  • 186. Request Web Server Rails App /public/stylesheets
  • 187. Request Web Server Arquivos Estáticos Rails App /public/stylesheets
  • 189. Variáveis $blue: #3bbfce; $margin: 16px; /* CSS */ .content-navigation { .content-navigation { border-color: $blue; border-color: #3bbfce; color: color: #2b9eab; darken($blue, 9%); } } .border { .border { padding: 8px; padding: $margin / 2; margin: 8px; margin: $margin / 2; border-color: #3bbfce; border-color: $blue; } }
  • 190. Nesting table.hl { /* CSS */ margin: 2em 0; td.ln { table.hl { text-align: right; margin: 2em 0; } } } table.hl td.ln { text-align: right; li { } font: { family: serif; li { weight: bold; font-family: serif; size: 1.2em; font-weight: bold; } font-size: 1.2em; } }
  • 191. Mixins @mixin table-base { th { /* CSS */ text-align: center; font-weight: bold; #data { } td, th {padding: 2px} float: left; } margin-left: 10px; } @mixin left($dist) { #data th { float: left; text-align: center; margin-left: $dist; font-weight: bold; } } #data td, #data th { #data { @include left(10px); padding: 2px; @include table-base; } }
  • 192. Selector Inheritance /* CSS */ .error { .error, .badError { border: 1px #f00; border: 1px #f00; background: #fdd; background: #fdd; } } .error.intrusion { font-size: 1.3em; .error.intrusion, font-weight: bold; .badError.intrusion { } font-size: 1.3em; font-weight: bold; .badError { } @extend .error; border-width: 3px; .badError { } border-width: 3px; }
  • 194. class Animal constructor: (@name) -> move: (meters) -> alert @name + " moved " + meters + "m." class Snake extends Animal move: -> alert "Slithering..." super 5 class Horse extends Animal move: -> alert "Galloping..." super 45 sam = new Snake "Sammy the Python" tom = new Horse "Tommy the Palomino" sam.move() tom.move()
  • 195. var Animal, Horse, Snake, sam, tom; var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; class Animal child.__super__ = parent.prototype; constructor: (@name) -> return child; }; Animal = (function() { move: (meters) -> function Animal(name) { this.name = name; alert @name + " moved " + meters + "m." } Animal.prototype.move = function(meters) { return alert(this.name + " moved " + meters + "m."); class Snake extends Animal }; return Animal; move: -> })(); alert "Slithering..." Snake = (function() { __extends(Snake, Animal); super 5 function Snake() { Snake.__super__.constructor.apply(this, arguments); } class Horse extends Animal Snake.prototype.move = function() { alert("Slithering..."); move: -> return Snake.__super__.move.call(this, 5); alert "Galloping..." }; return Snake; super 45 })(); Horse = (function() { __extends(Horse, Animal); sam = new Snake "Sammy the Python" function Horse() { tom = new Horse "Tommy the Palomino" Horse.__super__.constructor.apply(this, arguments); } Horse.prototype.move = function() { alert("Galloping..."); sam.move() return Horse.__super__.move.call(this, 45); tom.move() }; return Horse; })(); sam = new Snake("Sammy the Python"); tom = new Horse("Tommy the Palomino"); sam.move(); tom.move(); loadrun
  • 198. 102
  • 199. Request Request Web Server Web Server (Desenvolvimento) (Produção) Rails App /app/assets /public
  • 200. Request Request Web Server Web Server (Desenvolvimento) (Produção) Rails Sprockets App /app/assets /public
  • 201. Request Request Web Server Web Server (Desenvolvimento) (Produção) Rails Sprockets App Tilt /app/assets /public
  • 202. Request Request Web Server Web Server (Desenvolvimento) (Produção) Rails Sprockets App Tilt Ugli er /app/assets /public
  • 203. ENGINE FILE EXTENSIONS REQUIRED LIBRARIES ERB .erb, .rhtml none Interpolated String .str Erubis .erb, .rhtml, .erubis erubis Haml .haml haml Sass .sass sass Scss .scss Less CSS .less less Builder .builder builder Liquid .liquid liquid RDiscount rdiscount Redcarpet redcarpet BlueCloth .markdown, .mkd, .md bluecloth Kramdown kramdown Maruku maruku RedCloth .textile redcloth RDoc .rdoc rdoc Radius .radius radius Markaby .mab markaby Nokogiri .nokogiri nokogiri CoffeeScript .coffee coffee-script Creole (Wiki markup) .creole creole
  • 210. RubyConf Brasil 3 e 4 de Novembro www.rubyconf.com.br
  • 212. Pedro Franceschi @pedroh96
  • 216. Pedro Franceschi @pedroh96
  • 222. Obrigado! www.akitaonrails.com u.akita.ws/dnad11 .com.br