slices in rails 3.0

2 views
Skip to first unread message

weepy

unread,
Dec 24, 2008, 4:39:41 PM12/24/08
to merb
One feature of merb that for me was truly exciting was the potential
of slices. In particular, the plan for merb 1.1 allowing any merb app
to be mountable in another.

I was wondering if the merb-core team had figured out whether this
feature would make it into rails 3.0 ?

weepy

Ezra Zygmuntowicz

unread,
Dec 24, 2008, 4:56:16 PM12/24/08
to me...@googlegroups.com


Yes this is definitely one feature that will be making it across.

Cheers-

Ezra

Yehuda Katz

unread,
Dec 24, 2008, 5:39:58 PM12/24/08
to me...@googlegroups.com
To be even more clear, slices in Merb were going to be replaced by first-class apps (any app can be a slice). This should make it in to Rails3.

-- Yehuda
--
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325

Jon Hancock

unread,
Dec 24, 2008, 6:26:50 PM12/24/08
to merb
I'm still a bit dubious about slices being ready for prime time.
The only real world slice is the auth one. Its great, as is auth-
core, but has some obvious issues:

Doesn't inherit from my application controller so I lose common
behavior. I end up copy/pasting code from application into
global_helpers to get around some of the quirks. Other things I've
yet to find a solution for (like fixing bugs - https redirect??))
besides patching the slice.

The password slice is very nicely written, but its an example of
"advanced" ruby coding. Its highly factored and parameterized. We
really cannot expect the masses to dig through this level of code on a
regular basis. I had to read and re-read the auth slice many times to
ensure I was using it correct.

The extra files littered in my project is another oddity about
slices. I get not one, but two new trees of files ;).

I'm sure your aware of these issues. I'll re-post them in the future
if somehow things slip ;).

thanks, Jon


On Dec 25, 6:39 am, "Yehuda Katz" <wyc...@gmail.com> wrote:
> To be even more clear, slices in Merb were going to be replaced by
> first-class apps (any app can be a slice). This should make it in to Rails3.
> -- Yehuda
>

Michael Klishin

unread,
Dec 24, 2008, 6:29:40 PM12/24/08
to me...@googlegroups.com

On 25.12.2008, at 2:26, Jon Hancock wrote:

> Doesn't inherit from my application controller so I lose common
> behavior


With modules, you wouldn't, so just refactor your Application
controller.

MK

Jon Hancock

unread,
Dec 24, 2008, 6:40:34 PM12/24/08
to merb
Michael,
Do you simply mean I should put my repeated code in a module and
include that module in both places? If so, sure it works to reduce
text but duplicates code in different classes. Is this just more of
"ruby style OO"? ;)

thanks, Jon

On Dec 25, 7:29 am, Michael Klishin <michael.s.klis...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages