Archive for November, 2008

latest news from Merbland (Nov 30)

Wow, It’s been two weeks since my last post. I’m really sorry about that but at the same time, I really enjoyed Qcon and Thanksgiving which did not give me much time to work on a blog post.

Mr Bean vs X-mas turkey

Mr Bean vs X-mas turkey

Thanksgiving is a big thing in America, and after few years I got used to it and I even learned to enjoy this special holiday.

For non North American readers, Thanksgiving is a non-religous/family oriented celebration where people get together, eat a lot of food and usually watch an American football game. It’s followed by “black-friday” the first day of X-mas shopping celebrated by huge sales and more recently “cyber-monday”, the black firday for the web.

Anyways, I’ve been visiting family in Florida and didn’t have much time to work on side projects, including Merb :(

Qcon was also an awesome event where I met a lot of very interesting people and could measure the Merb interest in the “Enterprise” community.

Merb and the enterprise

37signals, the company known for giving Rails to the Ruby community often talked about the “Enterprise” world and the fact that they want to stay far away from it, here is a quote from 37signals blog:

This is one of the reasons we think enterprise is a dirty word. It’s also why it’s an absolute pleasure to design products for what we call the Fortune 5,000,000.

On the other hand, Merb was mainly written by people working at EngineYard, a company dealing with a lot of so call “enterprisey” companies. Because we believe we all have different needs we are willing to help you out with your own needs. That’s also the reason why, even though none of the core team members use NetBeans for their day to day coding, we decided to help NetBeans add Merb support in their next release.

Interesting enough, during the preparation of my talk, I did a simple “hello world” benchmark and got some really interesting results:

Note that Django was tested with mod_python and I was told I could get slightly better results with mod_wsgi.

It was interesting to hear Tim Bray, known for his implication with XML and ATOM, mention Merb, DataMapper and CouchDB during his keynote!

Actually, the day before, Yehuda and I had supper with Tim Bray and Nick Sieger from JRuby to discuss few topics but particaluarly how could we improve the framework and of course take advantage of JRuby.

Merb and the Brazilian community

Brazil is well known for his beautiful beaches, girls and music. It’s also known for its soccer team and its BBQ. However it’s not really known for its software developers and IT community.

Nevertheless, there was a lot of Brazilians during Qcon and especially a team from LocaWeb, the biggest Brazilian web hosting!

You might not know LocaWeb, but but you might have heard of Fabio Akita. Fabio interviewed a lot of people for his blog and I guess he was bored so he decided to interview me ;)

We also sat down for a little while and went through creating a new Merb app, I think Fabio was pretty impressed ;) He was so impressed he mentioned the possibility of a  Merb book in Portuguese!

LocaWeb also mentioned their interest in offering better Merb hosting with the possibilty to have their own stack for people who decide to host their apps there.

Here is the site of the Merb community:

Rails 2.2

Congrats to the Rails team for releasing Rails 2.2! The new features are:

  • i18n
  • HTTP validators
  • Thread safety
  • JRuby/1.9 compatibility

I heard a lot of questions about the new Rails features and where does Merb stand. So let me take them address them one by one:

  • Internationalization. I, myself was involved with the Rails i18n project so you might be surprise to hear that Merb doesn’t have a built-in i18n solution.  Well, the fact of the matter is that Merb is modular and we don’t want to force anyone to have to use a i18n solution which will slow down your app. Instead we offer modules to do that. Of course, Merb itself offers hooks to l10n helpers and other stuff you might need. By default, Merb doesn’t offer UTF-8 string manipulation like ActiveSupport does, however, few months ago, I extracted AS’s feature and you can use the extracted gem without the rest of AS while we wait for 1.9 to save the world ;)
    Merb makes everything easy for i18n/l10n plugin developers, merb_babel and merb_global are just 2 of the Merb localization plugins, you’ll find many more and some more are coming up.
  • HTTP validators/etags. Merb already had this feature for a little while, I put a quick example in the wiki, check it out to see how to use etag and last-modified tags. Note that you can easy add other custom headers by just doing: headers["Cache-Control"] = “max-age=N”
  • Thread safety. Well, unlike Rails which added thread safety as an after thought, Merb was built with the concept of thread safety in mind. What does that mean? Well, by default, Merb requests don't go through any locks. How? simply because we do not share any data between requests. thread safety is really hard to deal with. However remember that even though your framework is thread safe, your plugins and your code also need to be thread safe. Watch Jim's talk about threads if you want to know more.

Merb bug fix releases

You might have noticed that Merb is at 1.0.3. We fixed few tiny bugs as well as bumped the generated app dependency to the latest version of DM. (DataMapper's do_sqlite3 had a conflict with ruby-sqlite3 because of the windows dll pacakged with the gem. Everything has been fixed since.)

Yehuda Katz, explained the release plan in an email to the mailing list:

We plan to release point-releases to 1.0 as fixes become available, so there may be more such releases than in Rails. The goal is to release often enough to keep the list of changes in each release relatively small and understandable, and you can feel free to upgrade to the latest point release every 2 weeks if you don't want to go through the upgrade process every week (or more frequently). Keep an eye out for point releases that reflect security fixes, because those upgrades should be considered mandatory.

To see 1.0.4 and 1.1 tickets, check LightHouse. We are planning on a 1.0.4 release for next week.

Better documentation

Merb's documentation is getting better and better, here is a selection of few blog posts I think you might want to read. (hopefully all the info are or will be available in the wiki)

, ,


Merb news nov-16-2008

I’ll try to keep the community posted on the latest merb news. Feel free to email me if you want me to feature your app, plugin, tool or blog post.

Read the rest of this entry »

, , , , ,


Rails vs Merb ¿drama?

That’s official, according to Twitter the fight has started.

In this corner, weighing in at XXX LOC, from 37signals in the white trunks: Rails and in this other corner,  weighing in at YYY LOC from Engine Yard: Merb!

Yehuda Katz

Yehuda Katz

David Heinemeier Hansson

David Heinemeier Hansson

I wish I had a more aggressive photo of Yehuda, but oh well…

So people love drama, from American Idol to the Elections without forgetting Survivor, Heroes and other TV shows. Few weeks ago there was a tentative from Giles to create some controversy but he did not really work so well. The last big drama we had in the Ruby community was Zed and his infamous blog post…

The plot

Once upon a time, in a world where .NET, JAVA and PHP were ruling the internet development world, a not so well known programming language was getting more and more traction in the far east. Ruby, as it was known in Japan, only had very little documentation in English and real ninjas had to translate docs from obscure Japanese writings in order to become enlightened. Nevertheless, a courageous Danish student named David decided to build an application called basecamp using this “exotic” language. David decided to extract a framework from his work for 37signals. He called his framework “Ruby on Rails” and offered it to the world under the MIT license. Pretty quickly, as Ruby was getting more popular in the West, people looked at “Rails” and loved the MVC architecture, the conventions over configuration, testing framework and especially the language: Ruby.

As Rails was getting popular, a man from Polish descent known as Ezra Zygmuntowicz and who was working for Engine Yard got frustrated with some of Rails limitations. He needed something simpler, easier and faster. In fact he just needed a Mongrel handler, a way to process a request really quickly without going through then entire stack and without slowing down the main app. That’s how Ezra started Merb.

Let’s fast forward 2 years. The year is 2008, the place is Orlando, Florida. Yehuda Katz, Merb’s lead developer announces the 1.0 release of a Ruby web framework started 2 years earlier by Ezra. The framework’s selling points are: performance, modularilty, flexibilty.  In the mean time other Ruby frameworks were developed such as camping, Sinatra, mack, waves

Read the rest of this entry »

, , ,


merb 1.0 – tips part 1


As you must know by now, last week, Merb 1.0 got released.

Because we wanted to assure the release was fine, we asked Engine Yard, Apple and to help us by hiring the NSA to monitor Merb users. After all, we need to know what people complain about so we can fix it ASAP.

Turns out all the echelon monitoring sites were already busy. So we had to go back to good old IRC and twitter search ;)

The release looks pretty solid, thanks to all the people reported bugs during the release candidate cycle. Thanks guys!

However there are still few points of confusion I’d like to address.

Read the rest of this entry »

, ,


Merb 1.0 released

On November 7, Yehuda Katz gave a talk at RubyConf and made 3 major announcements:

- Engine Yard to offer Merb support

- m|a agile to offer professional training

- Merb 1.0 released!

The first announcement is pretty substantial. Engine Yard has been financially supporting Merb by letting some of their staff work on Merb, fly them to different conferences and sponsoring events like Merb Camp. Engine Yard didn’t yet announce the price structure but having the option for enterprise level support for Merb is just awesome.

John Nunemaker made an interesting comment during RubyConf Pivotal Party. Something special about Merb is that it was designed to fit the needs of an audience instead of trying to create a series of tools to build a specific type of website. Having Engine Yard help to finance Merb dev and offer support is very reassuring. It’s something already done by many other OSS projects such as Ubuntu, MySQL etc…

The second announcement Yehuda made was about Merb Training. I’m probably pretty biased since I am at the origin of this project. I know for a fact that a lot of people were waiting for 1.0 to get started with Merb. We are also working on getting more documentation out, and 3 books are coming up. Still, the best way to learn is to sit down with people who know Merb who can teach you the way its intended to be used.

Training will allow you to benefit a lot from being with other people who also share the same desire to master Ruby’s most powerful and flexible web framework.

What’s also really exciting is that Yehuda Katz, Merb’s lead developer, agreed to be a tutor for the course. I can’t imagine a better way to learn. Check this page for more information about the next training session or get in contact with me if you want to organize a training session for your company.

Finally, the big news was the announcement of Merb 1.0!

Merb 1.0 went through 5 release candidates and was finally marked as final. In the last few months, the Merb team worked hard to make things easier for people who want to get started in no time.

Let’s quickly look at why Merb is awesome:

  • Merb is Modular. Merb is not a monolithic framework. You can pick and choose what you need. Create a 1 file app “à la Sinatra” or a rich web app “à la Rails”. Merb has many components. Only requires the ones you need and save precious resources. (Merb doesn’t believe in 1 size fits all)
  • Merb is agnostic (kinda). Because people have different needs and different believes, Merb won’t force you to use one ORM or another. Same thing goes for the template engine or for the JavaScript library you want to use. ActiveRecord, DataMapper, Sequel, RelaxDb, Haml, Erb, Prototype, jQuery… choose which one you want and change whenever you want.
  • Merb can be opinionated. Merb offers a default stack using DataMapper and jQuery, authentication, exceptions and caching setup for you. However, creating your own stack is dead easy. As a matter of fact, the guys at are using Merb and were talking about creating their own stack using Sequel.
  • Merb let you reuse your code. Borrowed from Django, Merb has something called “slices”. Slices are mini apps you can run standalone or mounted within another app. A slice is a great way to write code you can reuse. Unlike plugins which extend the framework features, slices are a way to provide encapsulated content. (David Chelimsky, RSpec’s author and maintainer actually said that slices where his favorite feature in Merb 1.0)
  • Merb has an API. You might be wondering why having an API is awesome. Well, the truth is that the Merb Team spent time marking methods public, which are guaranteed to not break until the next major release (any change to the public API will be well documented). There is also a plugin API meaning that plugin developers won’t have to worry about upgrades if they stick to the plugin API.
  • Merb is fast. Even though Ruby the language isn’t really fast and contrary to popular opinion, Ruby for the web is one of the fastest solutions out there. (Even Rails is way faster than all the mainstream PHP frameworks) And that’s what Merb is proving by being one of the fastest web framework available on the market. Jason Seifer will be interested to know that Merb isn’t scared to scale ;) As a matter of fact, Merb is going to scale even better in the next few months as we are planning to integrate Swiftiply and do some totally awesome stuff to spawn/reap workers based load. (more about that in few weeks).
  • Matz likes Merb. Ruby’s daddy, Yukihiro Matsumoto told us he likes the flexibility of Merb and the fact that the framework doesn’t create a DSL on top of Ruby. He even told us that he’s going to introduce his company to Merb! We were obviously very honored and for us, it validates months of work by dozens of contributors. Here is a transcript of Matz comments about Merb and the Ruby web world:
    Yukihiro Matsumoto aka Matz

    Yukihiro Matsumoto aka Matz

    “Everyone outside of the Ruby community understands that we only have 1 web application framework, named Rails, but it’s not true in any sense. We have several post-Rails frameworks, which is very good, and I believe in diversity.

    Merb has a bright future for the people who are not satisfied by the fixed ways in Rails.  I think that Merb will give users more freedom in a Ruby-ish way of programming.

    I’m not really a web-guy, so i don’t judge any of them [frameworks], but Rails does some kind of drastic change on the language itself like in Active Support.  But Ruby has its own culture and technological atmosphere in the language so that keeping that makes me feel easier.”

  • Merb is memory friendly and therefore cheap. Merb is Open Source and free, but hosting an application costs money. Merb memory footprint is tiny compared to other solutions and that means that hosting will cost you less. (interesting when you think that EngineYard help developing Merb :p) Using Ruby Entreprise Edition, you will even use less memory, meaning you save even more money ;) By the way, Matz told me this morning that the Ruby core team is working on their own solution for a better GC and it should be available soon. (Ruby 1.9.x)
  • Merb source code is easy to read. Because Merb code is modular and because Merb has a concept of an API, reading Merb’s source code is pretty easy. On top of that, Merb itself uses RSpec making tests really easy to read and understand.  What’s great when the source code is easy to read is that developers can quickly check the source code if they want to understand how things work. We also get better patches from contributors and we keep our code clean. We believe in the theory of the “Broken Windows” by James Q. Wilson and George L. Kelling:

    “Consider a building with a few broken windows. If the windows are not repaired, the tendency is for vandals to break a few more windows. Eventually, they may even break into the building, and if it’s unoccupied, perhaps become squatters or light fires inside.

    Or consider a sidewalk. Some litter accumulates. Soon, more litter accumulates. Eventually, people even start leaving bags of trash from take-out restaurants there or breaking into cars.”

I guess I could keep on going with other reasons why Merb is so awesome, but let’s keep some for another post ;)

In conclusion, on behalf of the Merb core team, I’d like to thank all the Merb contributors, Ezra Zygmuntowic (creator of Merb), Yehuda Katz (Merb lead developer), Matz (Ruby creator) and finally DHH & the Rails core team. One more thing:

$ sudo gem install merb
$ merb-gen app my-awesome-merb-app

, , , , ,


Merb 1.0 RC5

As you might have noticed, we’ve been pushing a lot of Release Candidates out the door. The reason is that we want to make sure 1.0 is really ready for showtime!

We are also getting a lot of bug reports that help us focusing on the main issues. Today RC5 was pushed to a RubyForge mirror close to you and here is a report from Yehuda Katz, Merb lead developer.

This is the final RC before we ship 1.0 final at RubyConf. Here is a really quick rundown of the bugfixes and improvement added to this release:

  • Webrat integration out of the box. (see example)
  • Improved Merb bundling
  • spec view helpers now use nokogiri (with rexml as fallback )
  • new have_selector spec helper using CSS3 compatible selector.
  • The entire Merb spec suite now runs correctly on JRuby & Windows.
  • Once again improved jRuby support.

In other news, we setup a nightly gem server so people who want to be on Edge don’t have to deal with git and we call also test gem releases before pushing to RubyForge. More about that coming up during RubyConf.

Talking about RubyConf,  Yehuda and I will be in Orlando enjoying a good Ruby meetup. Come and chat with us if you are interested in starting using Merb, or if you have been using Merb. Also, please come and see us if you hate Merb and care tell us why. We’re looking forward to meet you all.

, , , , ,