fisl 11 - ecossistema ruby on rails

Download Fisl 11 - Ecossistema Ruby on Rails

Post on 05-Sep-2014

2.111 views

Category:

Technology

1 download

Embed Size (px)

DESCRIPTION

Ruby on Rails é um framework web. Mas essa é a parte menos importante. O que torna difícil a qualquer um de "clonar" essa iniciativa é que seria necessário clonar toda a comunidade. Sem o ecossistema que faz open source, trás preceitos ágeis, empreendedorismo, produtos, nada disso seria possível.

TRANSCRIPT

  • Ruby on Rails A apresentao j vai comear ...
  • Ruby on Rails
  • AkitaOnRails.com @AkitaOnRails
  • www.slideshare.net/akitaonrails boss@akitaonrails.com
  • Ruby on Rails 2.3.x Ruby on Rails 3 Beta Ruby 1.8.x Ruby 1.9.x
  • Ruby on Rails 2.3.x Ruby on Rails 3 Beta Ruby 1.8.x Ruby 1.9.x
  • Ruby on Rails 2.3.x Ruby on Rails 3 Beta Ruby 1.8.x Ruby 1.9.x
  • Ruby on Rails 2.3.x Ruby on Rails 3 Beta Ruby 1.8.x Ruby 1.9.x
  • Matz 1993
  • Dave Thomas 2001
  • DHH 2004
  • Charles Nutter 2006
  • JRuby 1.5.x Rubinius 1.0 IronRuby 1.0 MacRuby 0.6
  • JRuby 1.5.x Rubinius 1.0 IronRuby 1.0 MacRuby 0.6
  • JRuby 1.5.x Rubinius 1.0 IronRuby 1.0 MacRuby 0.6
  • JRuby 1.5.x Rubinius 1.0 IronRuby 1.0 MacRuby 0.6
  • Tornar as coisas simples fceis e as coisas complexas possveis Filoso a Ruby
  • Alan Kay Dan Ingalls
  • Eu inventei o termo Orientao a Objetos e posso dizer que no era C++ que eu tinha em mente. Alan Kay
  • Meta Programao
  • Meta Apresentao
  • Cdigo que gera Cdigo Convention over Con guration Dont Repeat Yourself Extreme Programming
  • Cdigo que gera Cdigo Convention over Con guration Dont Repeat Yourself Extreme Programming
  • Cdigo que gera Cdigo Convention over Con guration Dont Repeat Yourself Extreme Programming
  • Cdigo que gera Cdigo Convention over Con guration Dont Repeat Yourself Extreme Programming
  • Recursos Restful Unicode, Time Zone, i18n Segurana (XSS, CSRF, Injection)
  • Recursos Restful Unicode, Time Zone, i18n Segurana (XSS, CSRF, Injection)
  • Recursos Restful Unicode, Time Zone, i18n Segurana (XSS, CSRF, Injection)
  • Templates ERB, HAML HTTP Basic, HTTP Digest, Autenticao Devise MySQL, PostgreSQL, Oracle, Bancos de Dados MongoDB, CouchDB ActiveRecord, DataMapper, ORMs MongoMapper, Sequel Prototype, jQuery, Javascript SproutCore Apache 2, NginX, Web Servers Lighty, Litespeed
  • Templates ERB, HAML HTTP Basic, HTTP Digest, Autenticao Devise MySQL, PostgreSQL, Oracle, Bancos de Dados MongoDB, CouchDB ActiveRecord, DataMapper, ORMs MongoMapper, Sequel Prototype, jQuery, Javascript SproutCore Apache 2, NginX, Web Servers Lighty, Litespeed
  • Templates ERB, HAML HTTP Basic, HTTP Digest, Autenticao Devise MySQL, PostgreSQL, Oracle, Bancos de Dados MongoDB, CouchDB ActiveRecord, DataMapper, ORMs MongoMapper, Sequel Prototype, jQuery, Javascript SproutCore Apache 2, NginX, Web Servers Lighty, Litespeed
  • Templates ERB, HAML HTTP Basic, HTTP Digest, Autenticao Devise MySQL, PostgreSQL, Oracle, Bancos de Dados MongoDB, CouchDB ActiveRecord, DataMapper, ORMs MongoMapper, Sequel Prototype, jQuery, Javascript SproutCore Apache 2, NginX, Web Servers Lighty, Litespeed
  • Templates ERB, HAML HTTP Basic, HTTP Digest, Autenticao Devise MySQL, PostgreSQL, Oracle, Bancos de Dados MongoDB, CouchDB ActiveRecord, DataMapper, ORMs MongoMapper, Sequel Prototype, jQuery, Javascript SproutCore Apache 2, NginX, Web Servers Lighty, Litespeed
  • Templates ERB, HAML HTTP Basic, HTTP Digest, Autenticao Devise MySQL, PostgreSQL, Oracle, Bancos de Dados MongoDB, CouchDB ActiveRecord, DataMapper, ORMs MongoMapper, Sequel Prototype, jQuery, Javascript SproutCore Apache 2, NginX, Web Servers Lighty, Litespeed
  • Estrutura de Diretrios Similar
  • Model class Product < ActiveRecord::Base after_create :set_initial_inventory has_many :variants, :dependent => :destroy has_many :images, :as => :viewable, :order => :position, :dependent => :destroy has_many :properties, :through => :product_properties belongs_to :tax_category validates_presence_of :name validates_presence_of :master_price validates_presence_of :description make_permalink :with => :name, :field => :permalink end
  • Views ERB

    "shared/products.html.erb", :locals => {:products => @products, :taxon => @taxon } %>
    "shared/taxonomies" %> 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? %>
  • Controller class UsersController < Spree::BaseController resource_controller before_filter :initialize_extension_partials actions :all, :except => [:index, :destroy] show.before do @orders = Order.checkout_completed(true) .find_all_by_user_id(current_user.id) end create.after { self.current_user = @user } create.response do |wants| wants.html { redirect_back_or_default(products_path) } end end
  • Beautiful Code
  • @Transient public BigDecimal getTotal() //$Id: Booking.java 5579 2007-06-27 00:06:49Z gavin $ { package org.jboss.seam.example.booking; return hotel.getPrice().multiply( new BigDecimal( getNights() ) ); } import java.io.Serializable; import java.math.BigDecimal; @Transient import java.text.DateFormat; public int getNights() import java.util.Date; { return (int) ( checkoutDate.getTime() - checkinDate.getTime() ) / import javax.persistence.Basic; 1000 / 60 / 60 / 24; import javax.persistence.Entity; } import javax.persistence.GeneratedValue; import javax.persistence.Id; @Id @GeneratedValue import javax.persistence.ManyToOne; public Long getId() import javax.persistence.Temporal; { import javax.persistence.TemporalType; return id; import javax.persistence.Transient; }