Hoopla!

now with extra whiz-bang!

Hoopla!

Rails Components Abandoned

August 20, 2006 · 4 comments

I’ve been hearing from several places now, including DDH that the ‘components’ folder in all our Rails installations is becoming decreasingly useful. That’s quite a feat considering 89% of all Railers never knew what Components were all about anyway.

What Are Components?

As far as I understand it components allow you to implement the result of a controller request inside another. Just as partials allow you to put views within views components allow you to render a whole http response from a controller inside the view of another.

I’ve heard of shopping cart systems considering a solution like this. It would allow for a persistent cart session happening on the side of the page while allowing you to keep the actions of multiple controllers distinct.

Why are they disappearing?

I really like what DHH said in the above link: “The problem with components is that they’ve never actually been in style. We just forgot to tell people that. Our bad, now being rectified.” So, for starters, they were never popular.

The other main reason is that Railers who have implemented components are noticing themselves refactoring away from them. It’s becoming clear that, in most circumstances, plugins or helpers or possibly even an engine would serve an application better than components.

Lastly, they’re slow. Blecchhh. That’s a show-stopper.

Why do I bring this up?

If you’re reading this post within the first few days you might notice that my theme has changed. I was using Hemmingway (hard to read but at least it had soul) and now I’m using… well, I’m using one of the only themes that still works. When I updated Typo (I ride the trunk) today I saw that there had been some significant work done on the components: namely, they’ve been removed. The folks in the TypoSphere have made some substantial improvements to the code on their way to Typo 4.1. One of these is a much, much better sidebar system that doesn’t rely on components.

Don’t believe me? Take Pier’s word for it.

Now, if I can just figure out how to fix my themes…

→ 4 comments Tags:

Switching fromTypo to Mephisto - some concerns

August 19, 2006 · 6 comments

I wrote earlier about installing Mephisto on Dreamhost and my first reactions to it. It installed successfully and I actually got the thing working but then it became apparent that there were some serious problems.

I accept full responsibility for my misconceptions about Mephisto. I didn’t research it, I didn’t ask anybody about it. Still, I was surprised to find that it’s very immature software. For those who don’t already know: Mephisto is in ALPHA.

Now, I have to admit that it looks great and I think Liquid (can somebody get me a URL with info about Liquid?) is an excellent choice for theme designing. Also, I respect that it’s got the backing of Rick Olson and some other talented developers.

I hope nobody takes this the wrong way because I do intend to get Mephisto up and running and to use it as a primary blogging system and I’ve got lots of respect for the folks involved. Still, for now I’ll have to stick with Typo. It’s a little bulky but it does the job. Plus, new stuff in the Rails trunk will allow the Typo team to greatly reduce some of the redundancies and workarounds in the Typo code.

Problems I had with Mephisto:

It can’t be installed in a subdirectory

This was the show-stopper. I’ve been using the root of my domain (6brand.com) for this blog but I intend to transition to using a dedicated subdirectory (6brand.com/hoopla). This is where I installed Mephisto and it doesn’t know it’s not at the domain root. The Admin section works just fine (well, regarding this particular problem) but the layouts all assume that it’s hosted at the domain root. I saw some discussion about this on the Mephisto Google Group but most of the answers told people to set `ActionController::AbstractRequest.relative_url_root = ”/subdir”` in environment.rb This may be an acceptable hack for Rails developers but there aren’t many good reasons for why the Blog_URL set in the Admin menus can’t tell the app where it’s served from.

Other bugs:

I think it has poor session management. I kept getting logged out after a minute or so. Users cannot be deleted. There are links in the admin section that take you straight to a 500 error. The Mephisto team is working on an Assets menu but for now it’s just an error-generator. The settings menu is really counter-intuitive. There are buttons on the top to take you to different parts of the menu but they’re only linked to anchors within the current page – and it’s a really small page. One of the sections doesn’t even exist on the page.

So it’s a no-go for me right now. I’m gonna leave in installed (you’re welcome to check it out: http://6brand.com/hoopla) but it may not be usable for some time.

→ 6 comments Tags: