Merb?

I've basically completed my first Rails app.

It's so simple, though, that I was thinking of porting it to Merb. How
hard would it be to do that? The only plugins I'm using are
will_paginate and Restful Authentication.

I'm pretty new to programming, would it be over my head?

Anyone used Merb and have thoughts on this?

Thanks!

It shouldn't be too hard at all actually. I believe both of those
plugins actually support Merb, so it'd just be a matter of porting
your other code over to their controller schemes etc.

--Jeremy

out of curiosity, why are you wanting to port the application to Merb?

RSL

RSL ___ wrote:

out of curiosity, why are you wanting to port the application to Merb?

Performance, what else?

Cool. What are the performance benefits exactly?

RSL

RSL ___ wrote:

Cool. What are the performance benefits exactly?

RSL

I don't know, exactly. It seems the general consensus is that it is
more performant. I'm not skilled enough, so that's what I have to go
off of. If you think otherwise, I'd gladly hear it.

I don't want to port to Merb when I don't have to.

I have nothing bad to say about Merb really. Just that I’ve yet to see any compelling evidence for leaving Rails for it. Was hoping you had seen something. :slight_smile:

RSL

I don't know, exactly. It seems the general consensus is that it is
more performant. I'm not skilled enough, so that's what I have to go
off of. If you think otherwise, I'd gladly hear it.

I don't want to port to Merb when I don't have to.

Not just you don't have to, it'd be retarded if you do. Don't waste
your time. There are many better things you can do, especially if
you're new, you can learn shitloads more about Rails.

Uh, yeah if "performance" is your only reason, then I'd highly
recommend you don't bother. :slight_smile:

--Jeremy

It doesn’t necessarily need to be to be honest and if it is, then for most applications the benefit could be well below your expectations.

Merb by nature is more lightweight than Rails and it also has a few fundamental concepts that could be beneficial to certain developers. Merb has always been about giving the developer a broader choice when it comes to building your MVC stack: your models can use ActiveRecord (which will be just as fast as ActiveRecord in Rails, since they are exactly the same) or DataMapper or Sequel or . It’s a bit like putting together a custom built-computer vs getting a well balanced and completely outfitted one. If you know what you are doing and you have a very clear understanding on where Merb will make your app faster, you should choose Merb. It’s more of a hacker’s framework and some people that have done pure Ruby programming with their own framework will in fact like Merb better because of its openness.

Rails is a full stack framework. It’s opinionated in every way and makes choices for you. ActiveRecord, ActionPack (ActionView and ActionController), ActiveSupport, Prototype/Scriptaculous, Rails makes them work together and makes sure you don’t have to write a single line of code to do so. You can still take one of the components out and replace it with your own preference, but it will either make you lose features or force you to implement all code to make them work together with the rest of framework yourself.

From what I can see, the concept of Merb being faster than Rails is based on comments from the past. Most of them have to do with Merb being threadsafe and Rails being single threaded. But, if you look back at the speed of Rails 1.1.6 (when the whole Merb being so much faster blog posts started appearing) and compare it to Rails >2, the difference is huge. There has changed so much in the last year that you can’t just compare the comments from then to how Rails performs right now. Also, the good thing about opensource projects is they can borrow ideas from each other. Rails 2.2 will be threadsafe for one. If it will make such a dramatic difference is to be seen, but it will sound good in one of those tech meetings in enterprises, that’s for sure.

Like some of the other people replied, don’t assume switching to Merb will make your app so much better. It’s another framework to get used to and unless you have a real deep understanding of Ruby, you’ll hit more walls with Merb than you ever will when using Rails.

That said, I love Merb just as much as I love Rails, and the choice for either one would depend on the project. However, if I would be new to Ruby instead of working fulltime on Rails apps for over two or three years now, I would never ever go for Merb. It’s better having a big brother like Rails forcing you to be civilized and structured than having the “do-whatever-you-want” attitude of Merb.

Best regards

Peter De Berdt