추천중입니다.
닫기 블로그로 보내기


설정된 블로그가 없습니다.

블로그 설정하기

슬라이드를 블로그에 보내는 중입니다.
놀러오세요~ 레일스
1
283087
deepblue 2008.06.29 23:09:36
6회 루비세미나 튜토리얼 세션에서 발표한 내용입니다.
마가린 바르기bookmarkr.netmetagsWzd.com네이버에 북마크하기다음에 북마크하기HanRSS에 북마크하기이올린에 북마크하기Pumfit에 글 올리기News2.0에 투고하기del.icio.us에 북마크하기
URL Copy_btn
EMBED Copy_btn
작성자가 등록한 다른 큐
    댓글을 작성하기 위해서는 먼저 로그인 하셔야 합니다.
    현재 댓글의 수는 7 개 입니다.
    똥파리
    똥파리
    멋진 자료 고맙습니다... ㅎㅎ 해외자료 같아요 (2008-06-30 09:38:51 에 작성)
    deepblue
    deepblue
    엇, 파리님은 언제 여기까지 ^^ (2008-06-30 09:52:02 에 작성)
    chang
    chang
    정말 멋져요. 하루만에 만들었다는게 믿어지지 않아요. (2008-06-30 10:51:13 에 작성)
    deepblue
    deepblue
    chang// 하하, 그게 루비세미나의 힘? :) (2008-06-30 13:23:31 에 작성)
    thinkr
    thinkr
    이렇게 재미나는 튜토리얼인줄 알았으면 일찍 가서 들을 걸 그랬습니다. 튜토리얼 안들어도 되는 사람은 2시 이후에 오라는 말만 믿고, 2시 이후에 갔던 게 아쉽네요.ㅎㅎ 참, 그리고 이렇게 좋은 사이트(StoryQ)도 알려 주셔서 감사드려요~ (2008-06-30 14:49:27 에 작성)
    duecorda
    duecorda
    재밌게 잘 봤습니다. 슬라이드 만드시는 센스도 쵝오였습니다. 저도 어떻게 비주얼 슬라이드로 스토리 텔링해볼까 했지만 내공부족; (2008-06-30 15:14:30 에 작성)
    withover.com
    withover.com
    이렇게 아이디로 만나니깐 새롭네요. ^^ (2008-07-11 10:51:41 에 작성)
    Page 0: Page 1: ~ deepblue @ openmaru http://myruby.net/ Page 2: Person.new 'deepblue', :rubykr => 5.years, :write => 'myruby.net', :develop => 'springnote' http://www.flickr.com/photos/ucumari/2401057328/ Page 3: Agenda • • • • • Page 4: Page 5: Page 6: Ruby on Rails is an open-source web framework that’s optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration. Page 7: Page 8: Page 9: “Now, web designers and software engineers can develop a website much faster and more simply, enabling them to be more productive and effective in their work.” Page 10: http://www.flickr.com/photos/adrianruiz/2116494509 Page 11: http://www.flickr.com/photos/drachmann/327122302/ Page 12: ~ http://www.flickr.com/photos/eyefruit/179553810/ Page 13: ~ http://www.flickr.com/photos/eyefruit/179553810/ Page 14: ~ http://www.flickr.com/photos/eyefruit/179553810/ Page 15: http://www.flickr.com/photos/flattop341/1085739925 Page 16: ? . . . . http://www.flickr.com/photos/flattop341/1085739925 Page 17: http://railsenvy.com/ Page 18: 5% 6% 31% 15% 16% 26% Page 19: 5% 6% 31% 15% 16% 26% Page 20: ! http://www.flickr.com/photos/dacotahsgirl/299198494/ Page 21: ! # 12.kilobytes == 12288.bytes 1.month.from_now #=> Mon Jul 28 18:00:00 +0900 2008 2.years.ago #=> Wed Jun 28 18:00:00 +0900 2006 "apple".pluralize #=> "apples" 'ActionController'.underscore #=> "action_controller" w(1 2 3 4 5 6 7).in_groups_of(3) #=> [%w(1 2 3), %w(4 5 6), %w(7)] http://www.flickr.com/photos/dacotahsgirl/299198494/ Page 22: ! # {:a=>1}.to_xml #=> ".. <a type=\"integer\">1</a>..." {:a=>1}.to_json #=> "{\"a\": 1}" # " ".chars.length #=> 2 # Time.zone = 'Hawaii' #=> "Hawaii" Time.zone.now #=> Wed Jun 28 18:00:00 -1000 2006 # ActiveSupport::Cache.lookup_store, :mem_cache_store, 'localhost' http://www.flickr.com/photos/dacotahsgirl/299198494/ Page 23: Domain Specific Language Do not Repeat Yourself http://www.flickr.com/photos/dacotahsgirl/299198494/ Page 24: Page 25: An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data http://martinfowler.com/eaaCatalog/activeRecord.html Page 26: deepblue% script/console Loading development environment (Rails 2.1.0) Page 27: deepblue% script/console Loading development environment (Rails 2.1.0) class Person < ActiveRecord::Base end Page 28: deepblue% script/console Loading development environment (Rails 2.1.0) class Person < ActiveRecord::Base end >> Person => Person(id: integer, identity_url: string, nickname: string, email: string) >> person = Person.first => #<Person id: 1, identity_url: "http://deepblue.myid.net/", nickname: "deepblue", email: nil> >> person.nickname => "deepblue" Page 29: deepblue% script/console Loading development environment (Rails 2.1.0) class Person < ActiveRecord::Base end >> Person => Person(id: integer, identity_url: string, nickname: string, email: string) >> person = Person.first => #<Person id: 1, identity_url: "http://deepblue.myid.net/", nickname: "deepblue", email: nil> >> person.nickname => "deepblue" Convention over Configuration Page 30: Naming - File, Class, Table DB Mapping Directory Structure Request Dispatching View Rendering http://www.flickr.com/photos/psilver/461848858/ Page 31: before_create :record_signup belongs_to has_one has_many :portfolio :project_manager :milestones validates_acceptance_of :terms_of_service validates_inclusion_of :age, :in => 0..99 acts_as_tree :order => "name" Page 32: HTTP Verb + URI + format GET GET GET /pages/1 # PagesController#show(:id => 1) /pages/1.xml # Page.find(1).to_xml /pages/1.iphone # /app/views/pages/show.iphone.* POST /pages.iphone # PagesController#create(:page => {}) PUT /pages/1.json # PagesController#update DELETE /pages/1 # PagesController#destroy http://www.flickr.com/photos/blion/789123423 Page 33: class PagesController < ApplicationController before_filter :login_requred after_filer :gzip # GET /pages/:id.:format def show @page = Page.find(params[:id]) respond_to do |format| format.html format.xml { render :xml => @page } format.iphone { skip_gzip } end end http://www.flickr.com/photos/blion/789123423 Page 34: ~ Template /app/views/:controller/:action.format.render /pages/show.html.erb /pages/show.xml.builder /pages/show.iphone.haml /pages/_footer.html.liquid http://www.flickr.com/photos/blion/789123423 Page 35: ! prompt> gem install ruby-openid prompt> script/plugin install svn://rubyforge.org/var/ svn/springnote/plugins/open_id_authentication prompt> script/generate open_id_store_migration AddOpenIdStore prompt> rake db:migrate prompt> script/generate open_id_consumer_controller session map.resource :session, :collection => {:begin => :any, :complete => :any} http://www.flickr.com/photos/ppdigital/2058130092 Page 36: Red Green Refactor! # bowling_spec.rb require 'bowling' describe Bowling do before(:each) do @bowling = Bowling.new end it "should score 0 for gutter game" do 20.times { @bowling.hit(0) } @bowling.score.should == 0 end end http://www.flickr.com/photos/asurroca/55367485/ Page 37: rails my_first_rails_app # 30% script/generate resource .. # 50% 24 http://www.flickr.com/photos/flattop341/1085739925 Page 38: rails my_first_rails_app # 30% script/generate resource .. # 50% 24 http://www.flickr.com/photos/flattop341/1085739925 Page 39: http://www.flickr.com/photos/nexus_6/339726862 Page 40: http://www.flickr.com/photos/drachmann/327122302/ Page 41: Page 42: Page 43: Page 44: fin. http://myruby.net/ by deepblue Page 45: