Back to Blog

Get in Touch

Engines/Slices Support in Edge Rails

By Pradeep Elankumaran November 28, 2008 in rails, socialspring, slices, edge rails, engines

Missing

As of commit 5fa0457 (on Thanksgiving Day 2008, nonetheless), Edge Rails is getting work done on having plugins as engines. An engine (as of now) is defined as a plugin that has an app/ folder, which includes controllers, helpers, models and views. There’s also support for plugin routes at this moment.

As of the commit mentioned above, Rails engines are not yet app slices. A slice, at least in my opinion, contains its own assets (public/) and its own migrations. In essence, a slice would have the same structure as a regular Rails app. Not sure what the core guys have planned, but also having support for these two would greatly improve on the value of writing engines.

This replaces the old components framework, and paves the way for a new way of writing re-usable Rails plugins. For example, the 15-minute blog screencast can easily be reworked to be an engine and re-used within multiple apps. You can also write engines for audio, video, maybe a wiki engine and so on.

We’ve been working on the problem of sharing code between multiple apps for quite some time now at Intridea, and I’ve also been talking about it a lot at RailsConf Europe with Michael Bleigh and at Bay Area Ruby meetups. The commits I’m noticing in core are great, hopefully soon there will be some more relevant work into officially namespacing the new code so that engines are distinct from plugins externally; storing them in vendor/engines or app/engines would also be good — a clean codebase is always something to look forward to.

Interesting fact: Merb’s had this for a while :)

Medium

Pradeep Elankumaran

A former computational scientist, Pradeep was writing sophisticated astrophysical simulations in Ruby well before the language became fashionable. Since then, he has been working with and thinking a lot about social networks, machine learning and applying mathematical models to social data. At Intridea, he's responsible for researching and developing emerging web technologies, launching new products and writing beautiful code. He's also a member of the XMPP Standards Foundation.

More posts by Pradeep Elankumaran

Pradeep Elankumaran

Pradeep Elankumaran

Pradeep Elankumaran

Here's why, in no particular order, we think the

About Us

Intridea is based in Washington, D.C. Most of us live in the DC-MD-VA metro area, though we also have team members in California, Colorado, Kansas, Maine, Minnesota, Missouri, New Hampshire, New York, Pennsylvania, Wisconsin and Wyoming.

Interested in working with us, or have a question?
Feel free to contact us anytime.

© 2013 Intridea, Inc. All Rights Reserved.

Contact Us

DC Office
1020 16th Street NW
7th Floor
Washington, DC 20036
Phone
1-888-968-IDEA (4332)
1-888-968-IDEA (4332)
Email
info@intridea.com
Fax
1-202-280-1472
Twitter
@intridea

Contact Us

DC Office
1020 16th Street NW
7th Floor
Washington, DC 20036
Phone
1-888-968-IDEA (4332)
1-888-968-IDEA (4332)
Get in Touch
Email
info@intridea.com
Fax
1-202-280-1472
Twitter
@intridea

© 2013 Intridea, Inc. All Rights Reserved.

We're Hiring! Directions to office