Five Minutes Introduction For Rails
Upcoming SlideShare
Loading in...5
×
 

Five Minutes Introduction For Rails

on

  • 2,182 views

 

Statistics

Views

Total Views
2,182
Views on SlideShare
2,182
Embed Views
0

Actions

Likes
0
Downloads
18
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Five Minutes Introduction For Rails Five Minutes Introduction For Rails Presentation Transcript

  • Presents
  • JIN SHINTARO NISHIKAWA KAKUTANI Special Thanks
  • AND ESM EIJI LLWG IENAGA Special Thanks
  • 人はあらゆるプロセスよりも重要である。 優れた人々に優れたプロセスを与えれ ば、プロセスを持たない優れた人々より も常に効率が上がる。 ー Grady Booch
  • On December 13, 2005 the David Heinemeier Hanson major released on excellent framework for the all of its programmers. Its purpose was to get back the lost Quality of Engineering Life and to insure that the all of men who comprehensive were the nice programmers in the world. They succeeded. Today, the Programmer calls it Web Application Framework. The programmers call it: 2005年12月13日
  • On December 13, 2005 the David Heinemeier Hanson major released on excellent framework for the all of its programmers. Its purpose was to get back the lost Quality of Engineering Life and to insure that the all of men who comprehensive were the nice programmers in the world. They succeeded. Today, the Programmer calls it Web Application Framework. The programmers call it: DHHはすべての プログラマーのために
  • On December 13, 2005 the David Heinemeier Hanson major released on excellent framework for the all of its programmers. Its purpose was to get back the lost Quality of Engineering Life and to insure that the all of men who comprehensive were the nice programmers in the world. They succeeded. Today, the Programmer calls it Web Application Framework. The programmers call it: WebアプリケーションF/Wを メジャーリリースした
  • On December 13, 2005 the David Heinemeier Hanson major released on excellent framework for the all of its programmers. Its purpose was to get back the lost Quality of Engineering Life and to insure that the all of men who comprehensive were the nice programmers in the world. They succeeded. Today, the Programmer calls it Web Application Framework. The programmers call it: 目的は失われつつある エンジニア人生の質
  • On December 13, 2005 the David Heinemeier Hanson major released on excellent framework for the all of its programmers. Its purpose was to get back the lost Quality of Engineering Life and to insure that the all of men who comprehensive were the nice programmers in the world. They succeeded. Today, the Programmer calls it Web Application Framework. The programmers call it: 世界最高の WebアプリケーションF/Wの 呼び名は
  • Get back the lost Quality of Engineering Life with 分間の 入門
  • Part1: Rails の思想 Part2: Rails の構成 Part3: Rails とRuby
  • の思想 1.DRY 2.CoC
  • Don ’ t Repeat Yourself 繰り返しを避けること
  • Convention over Configuration 設定よりも規約
  • まとめ あ あとで書く と で あとで書く
  • の構成 1.AR 2.AP 3.Rails
  • ORMのパッケージ
  • より データベースのテーブル やビューの列をラップし、 データベースアクセスをカ プセル化し、ドメインロジッ クを追加するオブジェクト http://capsctrl.que.jp/kdmsnr/wiki/PofEAA/?ActiveRecord PoEAAで紹介されている ORMパターンのひとつ
  • app/models/person.rb class Person < ActiveRecord::Base end ActiveRecord::Baseを継承
  • データベース管理 db/migrate/001_create_people.rb class CreatePeople < ActiveRecord::Migration def self.up create_table :people do |table| table.column :first_name, :string, :limit => 32 table.column :last_name, :string, :limit => 32 table.column :number_of_dependents, :integer end end def self.down drop_table :people end end MigrationによるDB管理が可能
  • の威力 Ruby だけ知っていれば よいか? ドメイン特化言語としてのRuby
  • SQLの知識は重要、超重要
  • ActionControllerと ActionViewを含むパッケージ
  • app/controllers/people_controller.rb class PeopleController < ActionController::Base def show @person = Person.find(params[:id]) end end ActionController::Baseを継承
  • app/views/people/show.rhtml <% for column in Person.content_columns %> <p> <b><%= column.human_name %>:</b> <%=h @person.send(column.name) %> </p> <% end %> コントローラと インスタンス変数を共有する
  • app/views/layouts/people.rhtml <html> <head> <title><%= controller.action_name %></title> </head> <body> <%= @content_for_layout %> </body> </html> レイアウトを使って共通する ビューをまとめる
  • レイヤーをつなげる線路
  • まとめ 道 Tool 具 重 Matters 要 職人は道具を選ぶ
  • と 1.DSL 2.Agile 3.Fun
  • なぜDSL が大事か?
  • の効用 Human Readable コードは人間にとって 読み易くあるべき
  • RubyがDSLに向く3つの理由 1.括弧を省略できる 2.シンボルがオブジェクト 3.ブロックがある (名前空間の重複を防げる) http://blog.nikkeibp.co.jp/itpro/java/archives/2006/02/rubydsl.html 宣言的な記述が可能
  • Is Ruby Agile? http://www.objectclub.jp/event/2005christmas/schedule#2-2 オブジェクト倶楽部 2005年クリスマスイベントにて
  • まつもとさんの答え http://www.rubyist.net/~matz/slides/oc2005/mgp00005.html Rubyはアジャイルである
  • あとで書く あとで書く
  • まとめ 誇りと希望を持った仕事が QoELにつながる
  • 結論 コンパイル / ビルドの 終わりを 待っているほど 人生は長くはない アジャイルな人の道具には Rubyが馴染むと思うのです
  • Enjoy Engineering Life