1 / 25

Ruby on Rails による Web サイト構築

Ruby on Rails による Web サイト構築. 吉田 和弘 moriq@moriq.com 2008-10-25 オープンセミナー 2008@ 岡山. Web application framework. Ruby on Rails Merb. Ruby on Rails. rails-2.1.1 gem install rails Rails Trac → Git and Lighthouse http://github.com/rails http :// rails.lighthouseapp.com. move to ….

bary
Download Presentation

Ruby on Rails による Web サイト構築

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ruby on RailsによるWebサイト構築 吉田 和弘 moriq@moriq.com 2008-10-25 オープンセミナー2008@岡山

  2. Web application framework • Ruby on Rails • Merb

  3. Ruby on Rails • rails-2.1.1 • gem install rails • Rails Trac→ Git and Lighthouse • http://github.com/rails • http://rails.lighthouseapp.com

  4. move to … • Subversion → Git • Test Unit → RSpec • Mongrel → Thin • Multi process → Multi thread • Ruby 1.8 → Ruby 1.9

  5. Test Driven Development テスト駆動開発

  6. Testing framework • Test Unit→RSpec • RubyistMagagine(るびま) • スはスペックのス

  7. RSpec • test/unit → spec/models • test/functional → • spec/controllers • spec/helpers • spec/views • test/integration → stories → features

  8. test/functional Controller View Model Model

  9. spec/controllers Controller View stub render stub Model mock Model Model Model

  10. Stub and Mock • isolation from database • isolation from view

  11. cucumber • RSpec story runner → cucumber • integration test • rake features

  12. rcov • code coverage tool • rake spec:rcov

  13. Ajax 動的なUI

  14. Ajax • Sortable element • Add/Remove element (Client side)

  15. Security セキュリティ

  16. security features • SQL quoting • HTML sanitization • CSRF protection

  17. possible vulnerabilities • Cookie session store • Mass assignment • DoS: ex. XML entity explosion attack

  18. Cache キャッシュ

  19. Cache • ActiveSupport::Cache • Cache type: Page / Action / Fragment • Cache store: Memory / File / DRb /MemCache / CompressedMemCache

  20. Deployment サーバ構成

  21. Thread implementation • Ruby 1.8: • Thread = Green Thread • Ruby 1.9: • Thread = Native Thread with GIL • and Fiber

  22. Network programming • Multi Threading + I/O Blocking • Single Threading + Non I/O Blocking • Never Block: Multi Fibering

  23. Rails 2.1 Web Server Ruby on Rails App DB Ruby on Rails App Ruby on Rails App

  24. Rails 2.2 Web Server Ruby on Rails App DB App Pool App

  25. Thank you

More Related