20101106 ramaze発表

Download 20101106 ramaze発表

Post on 31-May-2015

1.117 views

Category:

Technology

6 download

Embed Size (px)

DESCRIPTION

Rails新時代に「Ramaze」で作る簡単iPhone/iPad向けWebサイト 関西Ruby会議03

TRANSCRIPT

  • 1. Ramaze iPhone/iPad Web Rails Ruby/iRubySystems iR3 12010117

2. Rubyhttp://d.hatena.ne.jp/iR3 twitter: iR3 facebook: fukui.osamu Ruby KOF2002 Lightweight Language 2003Ruby 2004 Ruby CD 2004/11/27 0Ruby@ ... 22010117 3. 2002KOF Matz 32010117 4. http://k-of.jp/2002/event.html KOFRuby2002.12.7 Ruby 42010117 5. 2003.10.5 Ruby Ruby 52010117 6. http://k-of.jp/2003/1101.html Ruby KOFRuby 2003.11.1 62010117 7. 20048 Ruby 72010117 8. http://k-of.jp/2004/1023.html Ruby KOFRuby 2004.10.23 82010117 9. Ruby 2004KOFRuby http://www.fdiary.net/ml/ruby/msg/435 92010117 10. RubyCD KOF2004100 No.001 Matz 102010117 11. http://www.fdiary.net/ml/ruby/msg/508 112010117 12. kof2004 122010117 13. 20041127 Ruby@-0 KOF2004 Ruby@ http://jp.rubyist.net/?KansaiWorkshop 132010117 14. Ruby 142010117 15. RubyWorldConference2010 Ruby RubyKaigi RubyKaigi2011 Regional Ruby Ruby03 Ruby03 152010117 16. http://maitore.net/ 162010117 17. 172010117 18. Ruby 182010117 19. Ruby1.9.2 192010117 20. Rails 202010117 21. Rails3 212010117 22. Ramaze 222010117 23. Ramaze 232010117 24. iPhone 242010117 25. iPad 252010117 26. HTML5 262010117 27. RailsRamaze 272010117 28. http://it-center.mri.co.jp/les/ossocw/course01/lesson09.pdf 282010117 29. Rails Ramaze Sinatra CGI Rails 292010117 30. Rails Rails3 302010117 31. Rails Rails 312010117 32. WEB+DB#58 P.15 Rails3 322010117 33. Rails Rack SinatraRamaze Rails Railtie Rails 332010117 34. ActionDispatch Rack AbstractController ActionView ActiveModel RailtieRails Rails3MVC 1 2 3 4 5 342010117 35. 352010117 36. 362010117 37. Rails3 Rails Ramaze RailsRamaze 372010117 38. 382010117 39. Rack 392010117 40. Ruck Web env() HTTPHTTP WSGI: Web Server Gateway Interface ruckup 402010117 41. Ruck Rackhttp:// route477.net/w/?RackReferenceJA 5Ruckhttp:// route477.net/d/?date=20080716 412010117 42. Ramaze 422010117 43. Ramaze Ramazehttp://ramaze.net RamazeMichael Felinger RubyKaigi2009 The innate beauty of Ramaze Vi 2008.2.4 ruby-list:44567 432010117 44. Ramaze Haml ActiveRecord InnateRamaze Ramaze 1 3 4 2 Ramaze2009.04ramazeinnate InnateRamaze DefaultEtanni M V C 442010117 45. Ramaze/Rack/Haml/Sass/ActiveRecord 452010117 46. Ramaze SinatraDSL RamazeRuby CGI 462010117 47. Ramaze Ruby1.9.2 > gem i ramaze =============================================== Thank you for installing Ramaze! To create a new project: $ ramaze create yourproject =============================================== Successfully installed ramaze-2010.06.18 1 gem installed Installing ri documentation for ramaze-2010.06.18... Installing RDoc documentation for ramaze-2010.06.18... innate innate > gem i innate 472010117 48. require 'ramaze' class MainController < Ramaze::Controller def index "Hello, Ramaze!" end end Ramaze.start Hello Ramaze! hello.rbRuby http://localhost:7000/ 482010117 49. Railsrestful Rails3routs Ramaze 492010117 50. require 'ramaze' class MainController < Ramaze::Controller map /another def hello "Hello from Another" end end Ramaze.start another Hello ! hello2.rbRuby http://localhost:7000/another/hello 502010117 51. Ramaze https://github.com/Ramaze/ramaze/tree/ master/exampls Ramazeyhara http://gihyo.jp/dev/serial/01/ruby/0012 512010117 52. Ramaze1Web > rails new app > ramaze create app Rails Ramaze 522010117 53. Ramaze mkdir controller mkdir layout mkdir model mkdir public mkdir public/css mkdir public/js mkdir spec mkdir view create app.rb create config.ru create controller/init.rb create controller/main.rb create layout/default.xhtml create model/init.rb create public/.htaccess create public/css/screen.css create public/dispatch.fcgi create public/favicon.ico create public/js/jquery.js create public/ramaze.png create spec/main.rb create start.rb create view/index.xhtml controller model view Rails 532010117 54. Ramaze class Controller < Ramaze::Controller layout :default helper :xhtml engine :Etanni end class Controller < Ramaze::Controller layout :default helper :user engine :Haml end engine: 542010117 55. Ramaze DataMapper.setup(:default, "sqlite3://#{__DIR__('words.db')}") class Word include DataMapper::Resource property :id, Serial property :name, String property :description, Text validates_is_unique :name end DataMapper.auto_upgrade! require 'activerecord' ActiveRecord::Base.establish_connection( :adapter => 'postgresql', :database => 'app', :username => 'postgres', :password => 'xxxxx', :encoding => 'unicode' ) DataMapper ActiveRecord 552010117 56. Haml/Sass 562010117 57. Haml/Sass

Welcome to our site!
"sidebar" %>

#content .left.column %h2 Welcome to our site! %p= print_information .right.column = render :partial => "sidebar" erb Haml Haml 572010117 58. Haml/Sass HamlHTML/XHTML Haml http://haml.ursm.jp 582010117 59. Haml/Sass SassCSS Haml div.commenth2 CSS 592010117 60. Haml/Sass body -webkit-text-size-adjust: none background: #C5CCD3 body { -webkit-text-size-adjust: none; background: #c5ccd3; } sass css sasscss 602010117 61. Haml/Sass { }2 ; sassCSS saas saag gem install sugamasao-saag --source http://gems.githu 612010117 62. iPhone/iPad Web 622010117 63. iPhone/iPadWeb (Mobile)Safari HTML5/CSS3 Viewport: 632010117 64. 320px (416)px 768px 1024px (416)px 320px 1024px 768px iPhone iPad 642010117 65. iPhone (Vewport 980 ) !!! XML !!! %html{ html_attrs("ja") } %head %meta{:"http-equiv"=>"Content-Type", :content=>"text/html", :charset=>"utf-8"} %meta{:name=>"viewport", :content=>"width=device-width", :charset=>"utf-8"} - if /MSIE/ =~ request.env['HTTP_USER_AGENT'] %link{:href=>"/css/maitore_ie.css", :rel => "stylesheet", :type => "text/css"} - elsif /iPhone/ =~ request.env['HTTP_USER_AGENT'] %script{:type => "text/javascript", :src => "/js/maitore.js"} %link{:media=>"only screen and (max-device-width: 480px)",:href=>"/css/ maitore_iphone.css", :rel => "stylesheet", :type => "text/css"} - else %link{:media=>"screen and (min-device-width: 481px)",:href=>"/css/ maitore_pc.css", :rel => "stylesheet", :type => "text/css"} iPhonemeta 652010117 66. !!! XML !!! %html{ html_attrs("ja") } %head %meta{:"http-equiv"=>"Content-Type", :content=>"text/ html", :charset=>"utf-8"} %meta{:name=>"viewport", :content=>"width=device- width", :charset=>"utf-8"} .haml.xhtml 662010117 67. HTML5 672010117 68. HTML5 HTML5 iPhone/iPad(Mobile)SafariHTML5 IEIE9HTML5 iPhone/iPadFlash HTML5 canvas 682010117 69. HTML5 HTML5 HTML4 http://standards.mitsue.co.jp/resources/w3c/TR/html5-diff/ HTML5 http://www.designwalker.com/2009/11/html5.html 692010117 70. 702010117 71. 712010117 72. RubyKaigi RubyWorldConference 722010117 73. Web iPhone/iPad 732010117 74. http://maitore.net/ iPhoneiPad PCchromeHTML5 742010117 75. 752010117 76. http://innate-gae.appspot.com/ Ruby1.9.2ERROR: While executing gem ... (RuntimeError) can't add a new key into hash during iteration RamazeGAE Google App Engine 762010117