SlideShare une entreprise Scribd logo
1  sur  120
Télécharger pour lire hors ligne
Geradores de código
     com Thor


                             @josevalim
             http://plataformatec.com.br
            jose@plataformatec.com.br
               Plataforma Tecnologia, José Valim 2009
Quem sou?




        Plataforma Tecnologia, José Valim 2009
Desenvolvedor líder na
Plataforma Tecnologia




               Plataforma Tecnologia, José Valim 2009
22 anos, Engenheiro pela
   Escola Politécnica




                Plataforma Tecnologia, José Valim 2009
Desenvolvedor ruby
 há quase 3 anos




             Plataforma Tecnologia, José Valim 2009
Google Summer of Code
 Student e contribuidor
  ativo do Rails Core



               Plataforma Tecnologia, José Valim 2009
Inherited Resources




             Plataforma Tecnologia, José Valim 2009
Inherited Resources
  Rails Footnotes




             Plataforma Tecnologia, José Valim 2009
Inherited Resources
  Rails Footnotes
    Remarkable




             Plataforma Tecnologia, José Valim 2009
Inherited Resources
  Rails Footnotes
    Remarkable
     Formtastic


             Plataforma Tecnologia, José Valim 2009
O que está errado com os
 geradores do Rails 2.x?




                Plataforma Tecnologia, José Valim 2009
script/generate scaffold




                 Plataforma Tecnologia, José Valim 2009
script/generate scaffold


   ActiveRecord
     TestUnit
       ERB



                 Plataforma Tecnologia, José Valim 2009
script/generate rspec_scaffold




                    Plataforma Tecnologia, José Valim 2009
script/generate rspec_scaffold


      ActiveRecord
         Rspec
          ERB



                    Plataforma Tecnologia, José Valim 2009
script/generate dm_scaffold




                   Plataforma Tecnologia, José Valim 2009
script/generate dm_scaffold


      DataMapper
       TestUnit
         ERB



                   Plataforma Tecnologia, José Valim 2009
script/generate dm_rspec_scaffold




                      Plataforma Tecnologia, José Valim 2009
script/generate dm_rspec_scaffold


         DataMapper
           Rspec
            ERB



                      Plataforma Tecnologia, José Valim 2009
Agnosticismo?




          Plataforma Tecnologia, José Valim 2009
Remarkable +
Inherited Resources +
      Formtastic




               Plataforma Tecnologia, José Valim 2009
Remarkable +
Inherited Resources +
      Formtastic
         =




               Plataforma Tecnologia, José Valim 2009
Remarkable +
Inherited Resources +
      Formtastic
            =
      script/generate
remarkable_inherited_formta
       stic_scaffold


                   Plataforma Tecnologia, José Valim 2009
Remarkable +
Inherited Resources +
      Formtastic
            =
      script/generate
remarkable_inherited_formta
       stic_scaffold
                                    FAIL?
                   Plataforma Tecnologia, José Valim 2009
script/generate nifty_scaffold
script/generate dry_scaffold




                     Plataforma Tecnologia, José Valim 2009
Pouca reutilização de
       código




              Plataforma Tecnologia, José Valim 2009
Sem divisão de
responsabilidades




            Plataforma Tecnologia, José Valim 2009
Plataforma Tecnologia, José Valim 2009
Por quê Thor?




          Plataforma Tecnologia, José Valim 2009
class AppGenerator < Thor::Group
  def create_app_folders
    empty_directory “app/models”
    empty_directory “app/controllers”
  end

  def copy_config_files
    copy_file “config/routes.rb”
  end
end

                        Plataforma Tecnologia, José Valim 2009
class AppGenerator < Thor::Group
  def create_app_folders
    empty_directory “app/models”
    empty_directory “app/controllers”
  end

  def copy_config_files
    copy_file “config/routes.rb”
  end
end

                        Plataforma Tecnologia, José Valim 2009
class AppGenerator < Thor::Group
  def create_app_folders
    empty_directory “app/models”
    empty_directory “app/controllers”
  end

  def copy_config_files
    copy_file “config/routes.rb”
  end
end

                        Plataforma Tecnologia, José Valim 2009
Execute tudo...
AppGenerator.start




            Plataforma Tecnologia, José Valim 2009
ou selecione!
app_tasks = AppGenerator.new
app_tasks.create_app_folders
app_tasks.copy_config_files




                   Plataforma Tecnologia, José Valim 2009
Herança




          Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ScaffoldGenerator < ResourceGenerator
    # generation
  end
end




                              Plataforma Tecnologia, José Valim 2009
Argumentos




        Plataforma Tecnologia, José Valim 2009
script/generate scaffold User name:string
    --no-layout -o datamapper -t rspec




                          Plataforma Tecnologia, José Valim 2009
self.class_name


script/generate scaffold User name:string
    --no-layout -o datamapper -t rspec




                          Plataforma Tecnologia, José Valim 2009
self.attributes


script/generate scaffold User name:string
    --no-layout -o datamapper -t rspec




                          Plataforma Tecnologia, José Valim 2009
Opções




         Plataforma Tecnologia, José Valim 2009
script/generate scaffold User name:string
    --no-layout -o datamapper -t rspec




                          Plataforma Tecnologia, José Valim 2009
script/generate scaffold User name:string
    --no-layout -o datamapper -t rspec


            self.options[:orm]
            #=> “datamapper”


                          Plataforma Tecnologia, José Valim 2009
script/generate scaffold User name:string
    --no-layout -o datamapper -t rspec


   self.options.layout? #=> false



                           Plataforma Tecnologia, José Valim 2009
:type => :string
--orm=activerecord




             Plataforma Tecnologia, José Valim 2009
:type => :numeric
    --rails=3.0




            Plataforma Tecnologia, José Valim 2009
:type => :boolean
--layout --no-helpers




               Plataforma Tecnologia, José Valim 2009
:type => :array
--actions=index new create




                 Plataforma Tecnologia, José Valim 2009
:type => :hash
--actions=name:string age:index




                    Plataforma Tecnologia, José Valim 2009
:required, :desc, :optional




                  Plataforma Tecnologia, José Valim 2009
Invocações




         Plataforma Tecnologia, José Valim 2009
class ResourceGenerator < Thor::Group
  def run_dependencies
    invoke ModelGenerator
    invoke ControllerGenerator
    invoke “testunit:resource”
  end
end




                        Plataforma Tecnologia, José Valim 2009
class ResourceGenerator < Thor::Group
  def run_dependencies
    invoke ModelGenerator
    invoke ControllerGenerator
    invoke “testunit:resource”
  end
end




                        Plataforma Tecnologia, José Valim 2009
invoke ModelGenerator




              Plataforma Tecnologia, José Valim 2009
invoke ModelGenerator

ModelGenerator.start



              Plataforma Tecnologia, José Valim 2009
invoke ModelGenerator
         !=
 ModelGenerator.start



              Plataforma Tecnologia, José Valim 2009
Shell




        Plataforma Tecnologia, José Valim 2009
Gerencia input e output




               Plataforma Tecnologia, José Valim 2009
Thor::Shell::Basic




             Plataforma Tecnologia, José Valim 2009
Thor::Shell::Basic
Apenas para Windows



              Plataforma Tecnologia, José Valim 2009
Thor::Shell::Color




             Plataforma Tecnologia, José Valim 2009
Thor::Shell::Web




            Plataforma Tecnologia, José Valim 2009
Thor::Shell::Web
       ?

            Plataforma Tecnologia, José Valim 2009
Plataforma Tecnologia, José Valim 2009
Qual a diferença entre
geradores de código e
 tarefas (como rake)?



               Plataforma Tecnologia, José Valim 2009
Geradores de código são
  um grupo de tarefas




               Plataforma Tecnologia, José Valim 2009
class Alphabet < Thor
  def a
    print :a
  end

  def b
    print :b
  end
end

$ thor alphabet:a #=> “a”
$ thor alphabet:b #=> “b”
                        Plataforma Tecnologia, José Valim 2009
class Alphabet < Thor
  def a
    print :a
  end

  def b
    print :b
  end
end

$ thor alphabet:a #=> “a”
$ thor alphabet:b #=> “b”
                        Plataforma Tecnologia, José Valim 2009
class Alphabet < Thor
  def a
    print :a
  end

  def b
    print :b
  end
end

$ thor alphabet:a #=> “a”
$ thor alphabet:b #=> “b”
                        Plataforma Tecnologia, José Valim 2009
class Alphabet < Thor::Group
  def a
    print :a
  end

  def b
    print :b
  end
end

$ thor alphabet #=> “ab”

                      Plataforma Tecnologia, José Valim 2009
class Alphabet < Thor::Group
  def a
    print :a
  end

  def b
    print :b
  end
end

$ thor alphabet #=> “ab”

                      Plataforma Tecnologia, José Valim 2009
Thor




       Plataforma Tecnologia, José Valim 2009
Thor
 =




       Plataforma Tecnologia, José Valim 2009
Thor
 =
Rake




       Plataforma Tecnologia, José Valim 2009
Thor
     =
Rake + Sake




         Plataforma Tecnologia, José Valim 2009
Thor
      =
Rake + Sake +
  Rubigen



          Plataforma Tecnologia, José Valim 2009
Thor
       =
Rake + Sake +
  Rubigen +
RailsTemplates


           Plataforma Tecnologia, José Valim 2009
Thor::Actions
      ==
RailsTemplates



           Plataforma Tecnologia, José Valim 2009
create_file “users_helper.rb”, <<-END
  module UsersHelper
  end
END




                        Plataforma Tecnologia, José Valim 2009
copy_file “doc/README”, “doc/README”
copy_file “doc/README”




                       Plataforma Tecnologia, José Valim 2009
Thor.source_root


copy_file “doc/README”, “doc/README”
copy_file “doc/README”




                        Plataforma Tecnologia, José Valim 2009
Dir.pwd


copy_file “doc/README”, “doc/README”
copy_file “doc/README”




                       Plataforma Tecnologia, José Valim 2009
get “http://pastie.org/2.txt”, “pastie.rb”

get “http://pastie.org/2.txt” do |content|
  content =~ /class (w)+/
  “#{$1 || 'content'}.rb”
end




                           Plataforma Tecnologia, José Valim 2009
template “doc/README”, “doc/README”
template “doc/README.tt”




                       Plataforma Tecnologia, José Valim 2009
chmod “script/*”, 755




                   Plataforma Tecnologia, José Valim 2009
prepend_file “environments/test.rb”
             “config.gem "rspec"”

prepend_file “environments/test.rb” do
  “config.gem "rspec"”
end




                         Plataforma Tecnologia, José Valim 2009
append_file “environments/test.rb”
             “config.gem "rspec"”

append_file “environments/test.rb” do
  “config.gem "rspec"”
end




                         Plataforma Tecnologia, José Valim 2009
flag = "Rails::Initializer.run do |config|n"

inject_into_file "config/environment.rb",
                 "config.gem :thor",
                 :after => flag




                             Plataforma Tecnologia, José Valim 2009
inject_into_class “users_controller.rb”
                  UsersController,
                  “before_filter :authenticate”




                              Plataforma Tecnologia, José Valim 2009
remove_file “doc/README”




                   Plataforma Tecnologia, José Valim 2009
empty_directory “doc”




                   Plataforma Tecnologia, José Valim 2009
directory “script”, “script”
directory “script”




                   Plataforma Tecnologia, José Valim 2009
inside “doc” do
  copy_file “README”
end




                   Plataforma Tecnologia, José Valim 2009
apply "http://gist.github.com/103208.txt"




                          Plataforma Tecnologia, José Valim 2009
run “ln -s ~/edge rails”




                   Plataforma Tecnologia, José Valim 2009
Actions específicas do
         Rails em:
Rails::Generators::Actions



                 Plataforma Tecnologia, José Valim 2009
Thor unifica APIs de
geradores de código, tarefas
    e templates do Rails



                  Plataforma Tecnologia, José Valim 2009
Rails::Generators




            Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
module Rails::Generators
  class ControllerGenerator < NamedBase
    argument :actions, :type => :array, :default => []
    check_class_collision :suffix => "Controller"

    def create_controller_files
      destination =
        File.join('app/controllers', class_path,
                  "#{file_name}_controller.rb")

      template 'controller.rb', destination
    end

    hook_for :template_engine, :test_framework, :helper
  end
end


                                    Plataforma Tecnologia, José Valim 2009
hook_for :test_framework




                Plataforma Tecnologia, José Valim 2009
hook_for :test_framework
 --test_framework=rspec




                Plataforma Tecnologia, José Valim 2009
hook_for :test_framework
 --test_framework=rspec
invoke “rspec:controller”



                Plataforma Tecnologia, José Valim 2009
Thorfile




           Plataforma Tecnologia, José Valim 2009
Thor::RakeCompat




           Plataforma Tecnologia, José Valim 2009
require File.join(File.dirname(__FILE__),
                  'config', 'boot')

require 'rake/testtask'
require 'rake/rdoctask'
require 'thor/rake_compat'

class Default < Thor
  include Thor::RakeCompat
  require 'rails/tasks'
end


                             Plataforma Tecnologia, José Valim 2009
require File.join(File.dirname(__FILE__),
                  'config', 'boot')

require 'rake/testtask'
require 'rake/rdoctask'
require 'thor/rake_compat'

class Default < Thor
  include Thor::RakeCompat
  require 'rails/tasks'
end


                             Plataforma Tecnologia, José Valim 2009
require File.join(File.dirname(__FILE__),
                  'config', 'boot')

require 'rake/testtask'
require 'rake/rdoctask'
require 'thor/rake_compat'

class Default < Thor
  include Thor::RakeCompat
  require 'rails/tasks'
end


                             Plataforma Tecnologia, José Valim 2009
require File.join(File.dirname(__FILE__),
                  'config', 'boot')

require 'rake/testtask'
require 'rake/rdoctask'
require 'thor/rake_compat'

class Default < Thor
  include Thor::RakeCompat
  require 'rails/tasks'
end


                             Plataforma Tecnologia, José Valim 2009
Show me the code!




            Plataforma Tecnologia, José Valim 2009
?!
                      @josevalim
      http://plataformatec.com.br
     jose@plataformatec.com.br
        Plataforma Tecnologia, José Valim 2009
blog.plataformatec.com.br



                                @josevalim
                http://plataformatec.com.br
               jose@plataformatec.com.br
                  Plataforma Tecnologia, José Valim 2009

Contenu connexe

Tendances

Morpheus configuration engine (slides from Saint Perl-2 conference)
Morpheus configuration engine (slides from Saint Perl-2 conference)Morpheus configuration engine (slides from Saint Perl-2 conference)
Morpheus configuration engine (slides from Saint Perl-2 conference)Vyacheslav Matyukhin
 
Slim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutSlim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutVic Metcalfe
 
Hello World on Slim Framework 3.x
Hello World on Slim Framework 3.xHello World on Slim Framework 3.x
Hello World on Slim Framework 3.xRyan Szrama
 
170517 damien gérard framework facebook
170517 damien gérard   framework facebook170517 damien gérard   framework facebook
170517 damien gérard framework facebookGeeks Anonymes
 
Aprendendo solid com exemplos
Aprendendo solid com exemplosAprendendo solid com exemplos
Aprendendo solid com exemplosvinibaggio
 
Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkJeremy Kendall
 
Laravel5 Introduction and essentials
Laravel5 Introduction and essentialsLaravel5 Introduction and essentials
Laravel5 Introduction and essentialsPramod Kadam
 
Lightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClientLightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClientAdam Wiggins
 
Rack is Spectacular
Rack is SpectacularRack is Spectacular
Rack is SpectacularBryce Kerley
 
How Danga::Socket handles asynchronous processing and how to write asynchrono...
How Danga::Socket handles asynchronous processing and how to write asynchrono...How Danga::Socket handles asynchronous processing and how to write asynchrono...
How Danga::Socket handles asynchronous processing and how to write asynchrono...Gosuke Miyashita
 
Laravel 5 In Depth
Laravel 5 In DepthLaravel 5 In Depth
Laravel 5 In DepthKirk Bushell
 
Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyUsing Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyLaunchAny
 
Silex: From nothing to an API
Silex: From nothing to an APISilex: From nothing to an API
Silex: From nothing to an APIchrisdkemper
 

Tendances (20)

Morpheus configuration engine (slides from Saint Perl-2 conference)
Morpheus configuration engine (slides from Saint Perl-2 conference)Morpheus configuration engine (slides from Saint Perl-2 conference)
Morpheus configuration engine (slides from Saint Perl-2 conference)
 
Modern PHP
Modern PHPModern PHP
Modern PHP
 
Red5 - PHUG Workshops
Red5 - PHUG WorkshopsRed5 - PHUG Workshops
Red5 - PHUG Workshops
 
Slim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutSlim RedBeanPHP and Knockout
Slim RedBeanPHP and Knockout
 
Hello World on Slim Framework 3.x
Hello World on Slim Framework 3.xHello World on Slim Framework 3.x
Hello World on Slim Framework 3.x
 
170517 damien gérard framework facebook
170517 damien gérard   framework facebook170517 damien gérard   framework facebook
170517 damien gérard framework facebook
 
Aprendendo solid com exemplos
Aprendendo solid com exemplosAprendendo solid com exemplos
Aprendendo solid com exemplos
 
Perlbal Tutorial
Perlbal TutorialPerlbal Tutorial
Perlbal Tutorial
 
Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro framework
 
Smoking docker
Smoking dockerSmoking docker
Smoking docker
 
Modern Catalyst
Modern  CatalystModern  Catalyst
Modern Catalyst
 
Laravel5 Introduction and essentials
Laravel5 Introduction and essentialsLaravel5 Introduction and essentials
Laravel5 Introduction and essentials
 
Lightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClientLightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClient
 
Laravel 5
Laravel 5Laravel 5
Laravel 5
 
Rack is Spectacular
Rack is SpectacularRack is Spectacular
Rack is Spectacular
 
How Danga::Socket handles asynchronous processing and how to write asynchrono...
How Danga::Socket handles asynchronous processing and how to write asynchrono...How Danga::Socket handles asynchronous processing and how to write asynchrono...
How Danga::Socket handles asynchronous processing and how to write asynchrono...
 
Laravel 5 In Depth
Laravel 5 In DepthLaravel 5 In Depth
Laravel 5 In Depth
 
Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyUsing Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in Ruby
 
Get your teeth into Plack
Get your teeth into PlackGet your teeth into Plack
Get your teeth into Plack
 
Silex: From nothing to an API
Silex: From nothing to an APISilex: From nothing to an API
Silex: From nothing to an API
 

En vedette

Is it Copyrighted? Can I Use it? (NLA2014)
Is it Copyrighted? Can I Use it? (NLA2014)Is it Copyrighted? Can I Use it? (NLA2014)
Is it Copyrighted? Can I Use it? (NLA2014)Michael Sauers
 
Lessons Learnt in 2009
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009pratiknaik
 
Participating in the Creative Commons (NLA/NEMA 2008)
Participating in the Creative Commons (NLA/NEMA 2008)Participating in the Creative Commons (NLA/NEMA 2008)
Participating in the Creative Commons (NLA/NEMA 2008)Michael Sauers
 
O que mudou no Ruby 1.9
O que mudou no Ruby 1.9O que mudou no Ruby 1.9
O que mudou no Ruby 1.9Nando Vieira
 
Yet Another Ruby Framework - Como o Rails funciona por dentro
Yet Another Ruby Framework - Como o Rails funciona por dentroYet Another Ruby Framework - Como o Rails funciona por dentro
Yet Another Ruby Framework - Como o Rails funciona por dentroCarlos Brando
 
DSLs Internas e Ruby
DSLs Internas e RubyDSLs Internas e Ruby
DSLs Internas e RubyFabio Kung
 

En vedette (9)

Expert Group Report: From Niche to Norm – Raimund Bleischwitz
Expert Group Report: From Niche to Norm – Raimund BleischwitzExpert Group Report: From Niche to Norm – Raimund Bleischwitz
Expert Group Report: From Niche to Norm – Raimund Bleischwitz
 
Is it Copyrighted? Can I Use it? (NLA2014)
Is it Copyrighted? Can I Use it? (NLA2014)Is it Copyrighted? Can I Use it? (NLA2014)
Is it Copyrighted? Can I Use it? (NLA2014)
 
Lessons Learnt in 2009
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009
 
Participating in the Creative Commons (NLA/NEMA 2008)
Participating in the Creative Commons (NLA/NEMA 2008)Participating in the Creative Commons (NLA/NEMA 2008)
Participating in the Creative Commons (NLA/NEMA 2008)
 
O que mudou no Ruby 1.9
O que mudou no Ruby 1.9O que mudou no Ruby 1.9
O que mudou no Ruby 1.9
 
Smart aging
Smart agingSmart aging
Smart aging
 
Yet Another Ruby Framework - Como o Rails funciona por dentro
Yet Another Ruby Framework - Como o Rails funciona por dentroYet Another Ruby Framework - Como o Rails funciona por dentro
Yet Another Ruby Framework - Como o Rails funciona por dentro
 
The Solid Fuel Regulations and the on-going challenge to clean air
The Solid Fuel Regulations and the on-going challenge to clean airThe Solid Fuel Regulations and the on-going challenge to clean air
The Solid Fuel Regulations and the on-going challenge to clean air
 
DSLs Internas e Ruby
DSLs Internas e RubyDSLs Internas e Ruby
DSLs Internas e Ruby
 

Similaire à Thor - RSLA - 13oct2009

RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesPavol Pitoňák
 
Protocol-Oriented Programming in Swift
Protocol-Oriented Programming in SwiftProtocol-Oriented Programming in Swift
Protocol-Oriented Programming in SwiftOleksandr Stepanov
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.FormsBrad Pillow
 
DSL or NoDSL - Euruko - 29may2010
DSL or NoDSL - Euruko - 29may2010DSL or NoDSL - Euruko - 29may2010
DSL or NoDSL - Euruko - 29may2010Plataformatec
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressJeroen van Dijk
 
Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!cloudbring
 
Tales About Scala Performance
Tales About Scala PerformanceTales About Scala Performance
Tales About Scala PerformanceHaim Yadid
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
 
Jericho Attack Technique
Jericho Attack TechniqueJericho Attack Technique
Jericho Attack TechniqueJan Seidl
 
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоWebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоGeeksLab Odessa
 
How to switch stack without downtime
How to switch stack without downtimeHow to switch stack without downtime
How to switch stack without downtimeFabien Penso
 
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationMinimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationOutlyer
 
Sylius and Api Platform The story of integration
Sylius and Api Platform The story of integrationSylius and Api Platform The story of integration
Sylius and Api Platform The story of integrationŁukasz Chruściel
 
Modernizing i5 Applications
Modernizing i5 ApplicationsModernizing i5 Applications
Modernizing i5 ApplicationsZendCon
 
Reusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de ZopeReusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de Zopementtes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Similaire à Thor - RSLA - 13oct2009 (20)

A First Date With Scala
A First Date With ScalaA First Date With Scala
A First Date With Scala
 
Php
PhpPhp
Php
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Protocol-Oriented Programming in Swift
Protocol-Oriented Programming in SwiftProtocol-Oriented Programming in Swift
Protocol-Oriented Programming in Swift
 
Introduction to Xamarin.Forms
Introduction to Xamarin.FormsIntroduction to Xamarin.Forms
Introduction to Xamarin.Forms
 
Rhodes Overview
Rhodes OverviewRhodes Overview
Rhodes Overview
 
DSL or NoDSL - Euruko - 29may2010
DSL or NoDSL - Euruko - 29may2010DSL or NoDSL - Euruko - 29may2010
DSL or NoDSL - Euruko - 29may2010
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
 
Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!
 
Tales About Scala Performance
Tales About Scala PerformanceTales About Scala Performance
Tales About Scala Performance
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
Jericho Attack Technique
Jericho Attack TechniqueJericho Attack Technique
Jericho Attack Technique
 
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоWebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
 
How to switch stack without downtime
How to switch stack without downtimeHow to switch stack without downtime
How to switch stack without downtime
 
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationMinimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestration
 
Sylius and Api Platform The story of integration
Sylius and Api Platform The story of integrationSylius and Api Platform The story of integration
Sylius and Api Platform The story of integration
 
Modernizing i5 Applications
Modernizing i5 ApplicationsModernizing i5 Applications
Modernizing i5 Applications
 
Reusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de ZopeReusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de Zope
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Plus de Plataformatec

Do your own hacking evening - RubyConf UR
Do your own hacking evening - RubyConf URDo your own hacking evening - RubyConf UR
Do your own hacking evening - RubyConf URPlataformatec
 
Product Owner - Simples como dizem? - Agile Tour 2011
Product Owner - Simples como dizem? - Agile Tour 2011Product Owner - Simples como dizem? - Agile Tour 2011
Product Owner - Simples como dizem? - Agile Tour 2011Plataformatec
 
As reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
As reais razões do porque eu devo ser Ágil - Agile Tour São PauloAs reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
As reais razões do porque eu devo ser Ágil - Agile Tour São PauloPlataformatec
 
Writing your own programming language to understand Ruby better - Euruko 2011
Writing your own programming language to understand Ruby better - Euruko 2011Writing your own programming language to understand Ruby better - Euruko 2011
Writing your own programming language to understand Ruby better - Euruko 2011Plataformatec
 
Railties - Ruby Masters Conf - 26Feb2011
Railties - Ruby Masters Conf - 26Feb2011Railties - Ruby Masters Conf - 26Feb2011
Railties - Ruby Masters Conf - 26Feb2011Plataformatec
 
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010Plataformatec
 
Rails 3 - The Developers Conference - 21aug2010
Rails 3 - The Developers Conference - 21aug2010Rails 3 - The Developers Conference - 21aug2010
Rails 3 - The Developers Conference - 21aug2010Plataformatec
 
CRUDing Open Source - WhyDay - 19aug2010
CRUDing Open Source - WhyDay - 19aug2010CRUDing Open Source - WhyDay - 19aug2010
CRUDing Open Source - WhyDay - 19aug2010Plataformatec
 
Rails 3 - RS on Rails - 21aug2010
Rails 3 - RS on Rails - 21aug2010Rails 3 - RS on Rails - 21aug2010
Rails 3 - RS on Rails - 21aug2010Plataformatec
 
Project Rescue - Oxente Rails - 05aug2010
Project Rescue - Oxente Rails - 05aug2010Project Rescue - Oxente Rails - 05aug2010
Project Rescue - Oxente Rails - 05aug2010Plataformatec
 
The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010Plataformatec
 
Classificação de textos - Dev in Sampa - 28nov2009
Classificação de textos - Dev in Sampa - 28nov2009Classificação de textos - Dev in Sampa - 28nov2009
Classificação de textos - Dev in Sampa - 28nov2009Plataformatec
 
Devise - RSLA - 13oct2009
Devise - RSLA - 13oct2009Devise - RSLA - 13oct2009
Devise - RSLA - 13oct2009Plataformatec
 

Plus de Plataformatec (13)

Do your own hacking evening - RubyConf UR
Do your own hacking evening - RubyConf URDo your own hacking evening - RubyConf UR
Do your own hacking evening - RubyConf UR
 
Product Owner - Simples como dizem? - Agile Tour 2011
Product Owner - Simples como dizem? - Agile Tour 2011Product Owner - Simples como dizem? - Agile Tour 2011
Product Owner - Simples como dizem? - Agile Tour 2011
 
As reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
As reais razões do porque eu devo ser Ágil - Agile Tour São PauloAs reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
As reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
 
Writing your own programming language to understand Ruby better - Euruko 2011
Writing your own programming language to understand Ruby better - Euruko 2011Writing your own programming language to understand Ruby better - Euruko 2011
Writing your own programming language to understand Ruby better - Euruko 2011
 
Railties - Ruby Masters Conf - 26Feb2011
Railties - Ruby Masters Conf - 26Feb2011Railties - Ruby Masters Conf - 26Feb2011
Railties - Ruby Masters Conf - 26Feb2011
 
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
 
Rails 3 - The Developers Conference - 21aug2010
Rails 3 - The Developers Conference - 21aug2010Rails 3 - The Developers Conference - 21aug2010
Rails 3 - The Developers Conference - 21aug2010
 
CRUDing Open Source - WhyDay - 19aug2010
CRUDing Open Source - WhyDay - 19aug2010CRUDing Open Source - WhyDay - 19aug2010
CRUDing Open Source - WhyDay - 19aug2010
 
Rails 3 - RS on Rails - 21aug2010
Rails 3 - RS on Rails - 21aug2010Rails 3 - RS on Rails - 21aug2010
Rails 3 - RS on Rails - 21aug2010
 
Project Rescue - Oxente Rails - 05aug2010
Project Rescue - Oxente Rails - 05aug2010Project Rescue - Oxente Rails - 05aug2010
Project Rescue - Oxente Rails - 05aug2010
 
The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010
 
Classificação de textos - Dev in Sampa - 28nov2009
Classificação de textos - Dev in Sampa - 28nov2009Classificação de textos - Dev in Sampa - 28nov2009
Classificação de textos - Dev in Sampa - 28nov2009
 
Devise - RSLA - 13oct2009
Devise - RSLA - 13oct2009Devise - RSLA - 13oct2009
Devise - RSLA - 13oct2009
 

Dernier

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Dernier (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Thor - RSLA - 13oct2009

  • 1. Geradores de código com Thor @josevalim http://plataformatec.com.br jose@plataformatec.com.br Plataforma Tecnologia, José Valim 2009
  • 2. Quem sou? Plataforma Tecnologia, José Valim 2009
  • 3. Desenvolvedor líder na Plataforma Tecnologia Plataforma Tecnologia, José Valim 2009
  • 4. 22 anos, Engenheiro pela Escola Politécnica Plataforma Tecnologia, José Valim 2009
  • 5. Desenvolvedor ruby há quase 3 anos Plataforma Tecnologia, José Valim 2009
  • 6. Google Summer of Code Student e contribuidor ativo do Rails Core Plataforma Tecnologia, José Valim 2009
  • 7. Inherited Resources Plataforma Tecnologia, José Valim 2009
  • 8. Inherited Resources Rails Footnotes Plataforma Tecnologia, José Valim 2009
  • 9. Inherited Resources Rails Footnotes Remarkable Plataforma Tecnologia, José Valim 2009
  • 10. Inherited Resources Rails Footnotes Remarkable Formtastic Plataforma Tecnologia, José Valim 2009
  • 11. O que está errado com os geradores do Rails 2.x? Plataforma Tecnologia, José Valim 2009
  • 12. script/generate scaffold Plataforma Tecnologia, José Valim 2009
  • 13. script/generate scaffold ActiveRecord TestUnit ERB Plataforma Tecnologia, José Valim 2009
  • 14. script/generate rspec_scaffold Plataforma Tecnologia, José Valim 2009
  • 15. script/generate rspec_scaffold ActiveRecord Rspec ERB Plataforma Tecnologia, José Valim 2009
  • 16. script/generate dm_scaffold Plataforma Tecnologia, José Valim 2009
  • 17. script/generate dm_scaffold DataMapper TestUnit ERB Plataforma Tecnologia, José Valim 2009
  • 18. script/generate dm_rspec_scaffold Plataforma Tecnologia, José Valim 2009
  • 19. script/generate dm_rspec_scaffold DataMapper Rspec ERB Plataforma Tecnologia, José Valim 2009
  • 20. Agnosticismo? Plataforma Tecnologia, José Valim 2009
  • 21. Remarkable + Inherited Resources + Formtastic Plataforma Tecnologia, José Valim 2009
  • 22. Remarkable + Inherited Resources + Formtastic = Plataforma Tecnologia, José Valim 2009
  • 23. Remarkable + Inherited Resources + Formtastic = script/generate remarkable_inherited_formta stic_scaffold Plataforma Tecnologia, José Valim 2009
  • 24. Remarkable + Inherited Resources + Formtastic = script/generate remarkable_inherited_formta stic_scaffold FAIL? Plataforma Tecnologia, José Valim 2009
  • 25. script/generate nifty_scaffold script/generate dry_scaffold Plataforma Tecnologia, José Valim 2009
  • 26. Pouca reutilização de código Plataforma Tecnologia, José Valim 2009
  • 27. Sem divisão de responsabilidades Plataforma Tecnologia, José Valim 2009
  • 29. Por quê Thor? Plataforma Tecnologia, José Valim 2009
  • 30. class AppGenerator < Thor::Group def create_app_folders empty_directory “app/models” empty_directory “app/controllers” end def copy_config_files copy_file “config/routes.rb” end end Plataforma Tecnologia, José Valim 2009
  • 31. class AppGenerator < Thor::Group def create_app_folders empty_directory “app/models” empty_directory “app/controllers” end def copy_config_files copy_file “config/routes.rb” end end Plataforma Tecnologia, José Valim 2009
  • 32. class AppGenerator < Thor::Group def create_app_folders empty_directory “app/models” empty_directory “app/controllers” end def copy_config_files copy_file “config/routes.rb” end end Plataforma Tecnologia, José Valim 2009
  • 33. Execute tudo... AppGenerator.start Plataforma Tecnologia, José Valim 2009
  • 34. ou selecione! app_tasks = AppGenerator.new app_tasks.create_app_folders app_tasks.copy_config_files Plataforma Tecnologia, José Valim 2009
  • 35. Herança Plataforma Tecnologia, José Valim 2009
  • 36. module Rails::Generators class ScaffoldGenerator < ResourceGenerator # generation end end Plataforma Tecnologia, José Valim 2009
  • 37. Argumentos Plataforma Tecnologia, José Valim 2009
  • 38. script/generate scaffold User name:string --no-layout -o datamapper -t rspec Plataforma Tecnologia, José Valim 2009
  • 39. self.class_name script/generate scaffold User name:string --no-layout -o datamapper -t rspec Plataforma Tecnologia, José Valim 2009
  • 40. self.attributes script/generate scaffold User name:string --no-layout -o datamapper -t rspec Plataforma Tecnologia, José Valim 2009
  • 41. Opções Plataforma Tecnologia, José Valim 2009
  • 42. script/generate scaffold User name:string --no-layout -o datamapper -t rspec Plataforma Tecnologia, José Valim 2009
  • 43. script/generate scaffold User name:string --no-layout -o datamapper -t rspec self.options[:orm] #=> “datamapper” Plataforma Tecnologia, José Valim 2009
  • 44. script/generate scaffold User name:string --no-layout -o datamapper -t rspec self.options.layout? #=> false Plataforma Tecnologia, José Valim 2009
  • 45. :type => :string --orm=activerecord Plataforma Tecnologia, José Valim 2009
  • 46. :type => :numeric --rails=3.0 Plataforma Tecnologia, José Valim 2009
  • 47. :type => :boolean --layout --no-helpers Plataforma Tecnologia, José Valim 2009
  • 48. :type => :array --actions=index new create Plataforma Tecnologia, José Valim 2009
  • 49. :type => :hash --actions=name:string age:index Plataforma Tecnologia, José Valim 2009
  • 50. :required, :desc, :optional Plataforma Tecnologia, José Valim 2009
  • 51. Invocações Plataforma Tecnologia, José Valim 2009
  • 52. class ResourceGenerator < Thor::Group def run_dependencies invoke ModelGenerator invoke ControllerGenerator invoke “testunit:resource” end end Plataforma Tecnologia, José Valim 2009
  • 53. class ResourceGenerator < Thor::Group def run_dependencies invoke ModelGenerator invoke ControllerGenerator invoke “testunit:resource” end end Plataforma Tecnologia, José Valim 2009
  • 54. invoke ModelGenerator Plataforma Tecnologia, José Valim 2009
  • 55. invoke ModelGenerator ModelGenerator.start Plataforma Tecnologia, José Valim 2009
  • 56. invoke ModelGenerator != ModelGenerator.start Plataforma Tecnologia, José Valim 2009
  • 57. Shell Plataforma Tecnologia, José Valim 2009
  • 58. Gerencia input e output Plataforma Tecnologia, José Valim 2009
  • 59. Thor::Shell::Basic Plataforma Tecnologia, José Valim 2009
  • 60. Thor::Shell::Basic Apenas para Windows Plataforma Tecnologia, José Valim 2009
  • 61. Thor::Shell::Color Plataforma Tecnologia, José Valim 2009
  • 62. Thor::Shell::Web Plataforma Tecnologia, José Valim 2009
  • 63. Thor::Shell::Web ? Plataforma Tecnologia, José Valim 2009
  • 65. Qual a diferença entre geradores de código e tarefas (como rake)? Plataforma Tecnologia, José Valim 2009
  • 66. Geradores de código são um grupo de tarefas Plataforma Tecnologia, José Valim 2009
  • 67. class Alphabet < Thor def a print :a end def b print :b end end $ thor alphabet:a #=> “a” $ thor alphabet:b #=> “b” Plataforma Tecnologia, José Valim 2009
  • 68. class Alphabet < Thor def a print :a end def b print :b end end $ thor alphabet:a #=> “a” $ thor alphabet:b #=> “b” Plataforma Tecnologia, José Valim 2009
  • 69. class Alphabet < Thor def a print :a end def b print :b end end $ thor alphabet:a #=> “a” $ thor alphabet:b #=> “b” Plataforma Tecnologia, José Valim 2009
  • 70. class Alphabet < Thor::Group def a print :a end def b print :b end end $ thor alphabet #=> “ab” Plataforma Tecnologia, José Valim 2009
  • 71. class Alphabet < Thor::Group def a print :a end def b print :b end end $ thor alphabet #=> “ab” Plataforma Tecnologia, José Valim 2009
  • 72. Thor Plataforma Tecnologia, José Valim 2009
  • 73. Thor = Plataforma Tecnologia, José Valim 2009
  • 74. Thor = Rake Plataforma Tecnologia, José Valim 2009
  • 75. Thor = Rake + Sake Plataforma Tecnologia, José Valim 2009
  • 76. Thor = Rake + Sake + Rubigen Plataforma Tecnologia, José Valim 2009
  • 77. Thor = Rake + Sake + Rubigen + RailsTemplates Plataforma Tecnologia, José Valim 2009
  • 78. Thor::Actions == RailsTemplates Plataforma Tecnologia, José Valim 2009
  • 79. create_file “users_helper.rb”, <<-END module UsersHelper end END Plataforma Tecnologia, José Valim 2009
  • 80. copy_file “doc/README”, “doc/README” copy_file “doc/README” Plataforma Tecnologia, José Valim 2009
  • 81. Thor.source_root copy_file “doc/README”, “doc/README” copy_file “doc/README” Plataforma Tecnologia, José Valim 2009
  • 82. Dir.pwd copy_file “doc/README”, “doc/README” copy_file “doc/README” Plataforma Tecnologia, José Valim 2009
  • 83. get “http://pastie.org/2.txt”, “pastie.rb” get “http://pastie.org/2.txt” do |content| content =~ /class (w)+/ “#{$1 || 'content'}.rb” end Plataforma Tecnologia, José Valim 2009
  • 84. template “doc/README”, “doc/README” template “doc/README.tt” Plataforma Tecnologia, José Valim 2009
  • 85. chmod “script/*”, 755 Plataforma Tecnologia, José Valim 2009
  • 86. prepend_file “environments/test.rb” “config.gem "rspec"” prepend_file “environments/test.rb” do “config.gem "rspec"” end Plataforma Tecnologia, José Valim 2009
  • 87. append_file “environments/test.rb” “config.gem "rspec"” append_file “environments/test.rb” do “config.gem "rspec"” end Plataforma Tecnologia, José Valim 2009
  • 88. flag = "Rails::Initializer.run do |config|n" inject_into_file "config/environment.rb", "config.gem :thor", :after => flag Plataforma Tecnologia, José Valim 2009
  • 89. inject_into_class “users_controller.rb” UsersController, “before_filter :authenticate” Plataforma Tecnologia, José Valim 2009
  • 90. remove_file “doc/README” Plataforma Tecnologia, José Valim 2009
  • 91. empty_directory “doc” Plataforma Tecnologia, José Valim 2009
  • 92. directory “script”, “script” directory “script” Plataforma Tecnologia, José Valim 2009
  • 93. inside “doc” do copy_file “README” end Plataforma Tecnologia, José Valim 2009
  • 94. apply "http://gist.github.com/103208.txt" Plataforma Tecnologia, José Valim 2009
  • 95. run “ln -s ~/edge rails” Plataforma Tecnologia, José Valim 2009
  • 96. Actions específicas do Rails em: Rails::Generators::Actions Plataforma Tecnologia, José Valim 2009
  • 97. Thor unifica APIs de geradores de código, tarefas e templates do Rails Plataforma Tecnologia, José Valim 2009
  • 98. Rails::Generators Plataforma Tecnologia, José Valim 2009
  • 99. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 100. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 101. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 102. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 103. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 104. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 105. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 106. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 107. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 108. module Rails::Generators class ControllerGenerator < NamedBase argument :actions, :type => :array, :default => [] check_class_collision :suffix => "Controller" def create_controller_files destination = File.join('app/controllers', class_path, "#{file_name}_controller.rb") template 'controller.rb', destination end hook_for :template_engine, :test_framework, :helper end end Plataforma Tecnologia, José Valim 2009
  • 109. hook_for :test_framework Plataforma Tecnologia, José Valim 2009
  • 110. hook_for :test_framework --test_framework=rspec Plataforma Tecnologia, José Valim 2009
  • 111. hook_for :test_framework --test_framework=rspec invoke “rspec:controller” Plataforma Tecnologia, José Valim 2009
  • 112. Thorfile Plataforma Tecnologia, José Valim 2009
  • 113. Thor::RakeCompat Plataforma Tecnologia, José Valim 2009
  • 114. require File.join(File.dirname(__FILE__), 'config', 'boot') require 'rake/testtask' require 'rake/rdoctask' require 'thor/rake_compat' class Default < Thor include Thor::RakeCompat require 'rails/tasks' end Plataforma Tecnologia, José Valim 2009
  • 115. require File.join(File.dirname(__FILE__), 'config', 'boot') require 'rake/testtask' require 'rake/rdoctask' require 'thor/rake_compat' class Default < Thor include Thor::RakeCompat require 'rails/tasks' end Plataforma Tecnologia, José Valim 2009
  • 116. require File.join(File.dirname(__FILE__), 'config', 'boot') require 'rake/testtask' require 'rake/rdoctask' require 'thor/rake_compat' class Default < Thor include Thor::RakeCompat require 'rails/tasks' end Plataforma Tecnologia, José Valim 2009
  • 117. require File.join(File.dirname(__FILE__), 'config', 'boot') require 'rake/testtask' require 'rake/rdoctask' require 'thor/rake_compat' class Default < Thor include Thor::RakeCompat require 'rails/tasks' end Plataforma Tecnologia, José Valim 2009
  • 118. Show me the code! Plataforma Tecnologia, José Valim 2009
  • 119. ?! @josevalim http://plataformatec.com.br jose@plataformatec.com.br Plataforma Tecnologia, José Valim 2009
  • 120. blog.plataformatec.com.br @josevalim http://plataformatec.com.br jose@plataformatec.com.br Plataforma Tecnologia, José Valim 2009