Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Rails engines

on

  • 2,149 views

 

Statistics

Views

Total Views
2,149
Views on SlideShare
2,114
Embed Views
35

Actions

Likes
0
Downloads
20
Comments
0

1 Embed 35

http://devguru.pl 35

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

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

Rails engines Rails engines Presentation Transcript

  • Rails Engines - what, why, how Grzegorz Witek
  • Agenda
      • What engines are
      • How they appeared in Rails core
      • How to use them
      • What are their pros and cons
      • Summary
  • What engines are Application Engine Plugins
  • What are their capabilities?
    • Rails engines have:
    Rack middleware stack
  • What are their capabilities?
    • Rails engines have:
    environment.rb
  • What are their capabilities?
    • Rails engines have:
    Routes
  • What are their capabilities?
    • Rails engines have:
    Plugin support
  • Long way to the CORE
      • Plugin
      • Rails 2.3 - partial support
      • 2010 Ruby Summer of Code
      • Rails 3.1 - full engines in core
      • ...
      • 2011? - a few apps in the same process
  • A bit of code
    • Rails . application . routes . draw do mount Cms :: Engine => "/portal", :as => 'cms' end
    main_application.root_pathcms.articles_path rake railties:copy_migrations authenticate :admin do mount Tolk :: Engine => "/tolk" end
  • Are they really worth using?
    • Pros:
      • they are almost as powerful as rails app
      • they are isolated (you don't need to change your code to use them!)
      • You can share code between applications
      • they can save your time!
    • Cons:
      • they're not suitable for every application 
  • Do they exist?
      • Devise
      • Rails Admin 
      • Rails Assets (to be released in 3.1)
      • Tolk
  • Any questions? Thanks for your attention!
  • Sources:
      • http://piotrsarnacki.com
      • https://github.com/dhh/tolk
      • http://rails-engines.org/  
      • http://railscasts.com/episodes/149-rails-engines
      • http://github.com/sferik/rails_admin
      • https://github.com/lazyatom/engines
      • https://github.com/rails/rails