Fork me on GitHub

Archive for February, 2008

The History Of Mack, pt. 3

Wednesday, February 27th, 2008

Why did I fall in love with Rack and Thin? That’s easy. I love Thin because it lives up to it’s name. It’s thin. It’s incredibly fast, has great clustering support built in, and is the next generation of Ruby web servers. It kicks Mongrel’s ass and it takes names. I’m sure if you asked Zed Shaw he would have no problem with Thin replacing Mongrel.

Rack I love because of it’s simplicity, and it’s uniformity. It’s setting out to create a standard for which any Ruby web application can very easily be plugged into a web server. By abstracting that layer out it makes it easier for developers to focus on writing great apps, and not having to worry about how to deploy them.

Once I started to play around with Rack it didn’t take me more then a few minutes to have a very simple site up and running.

Within a few days I had the basics of a Rails like framework rocking, and within two weeks I had the core of Mack coded, and that’s where I am today.

Mack is a very fast, stable, and extensible framework. It’s designed to be lean and mean and not be all things to all people. It’s meant to get you started on the right path, but to let you have your own opinions. It’s designed to help you build portal applications simply and efficiently, and deploy with just as much ease.

Mack is ORM agnostic, although it does have some special hooks for ActiveRecord and DataMapper. It does not force you to use a certain type of system for doing web services, although it does promote a RESTful lifestyle. Configuration and setup is system, but there’s no reason for you to use it as is out of the box.

Mack encourages experimentation, and  it hopes that you customize it make it your own.

Go and scour through the API and then download the gem and start building your next generation application the way YOU want to, not the way someone else tells you you have to.

ORM Support

Wednesday, February 27th, 2008

If you would like to add ORM support to your application, it’s simple. Out of the box Mack has support for two popular ORMs, ActiveRecord and DataMapper.Our tests show that DataMapper is 10x slower then ActiveRecord, but who knows, your mileage my vary.

When you create your mack app you can do the following which will add ORM support to your generated app:

$ mack my_cool_mack_app -o activerecord

If you already have a mack app you can very easily add ORM support by adding the following configuration parameter to the default.yml file:

mack::orm: activerecord

And also add a database.yml file to your config directory that looks like this:

development:
  adapter: mysql
  database: my_cool_mack_app_development
  host: localhost
  username: root
  password:

test:
  adapter: mysql
  database: my_cool_mack_app_test
  host: localhost
  username: root
  password:

production:
  adapter: mysql
  database: my_cool_mack_app_production
  host: localhost
  username: root
  password:

Getting Started

Wednesday, February 27th, 2008

Installing Mack is pretty simple:

$ sudo gem install mack

This will install a few gems that Mack is dependent on. Once you’ve got all the gems installed you can create your mack app with the following:

$ mack my_cool_mack_app

That should create a folder called my_cool_mack_app with a bunch of files and folders underneath it. Now, to fire up the app:

$ cd my_cool_mack_app
$ rake server

Now point your browser to http://localhost:3000 and you should see a nice “welcome to mack” screen.

That’s it. Now you can start rocking your super cool application.

The History Of Mack, pt. 2

Tuesday, February 26th, 2008

After two years of developing Menderchuck using Rails, I sat down with the VP of Development and the Director of Development and we took at a look at what the future of the company. We reviewed some of the stuff the business would like to build and where the CEO saw the company headed, and we looked at the technologies we were using and determined that it was time to investigate alternatives.

The first things to come under the microscope were Rails/Mongrel. As previously stated we found Rails to be a bit too opinionated for our use. One of the big jokes within the dev team was that I was basically rewriting Rails one section at a time. As sad as that joke is, it’s partially true.

I started to investigate other frameworks, particularly Merb and Ramaze, both of which are great frameworks. Both are lightweight and fast, and are a great alternative to Rails. But, they both didn’t quite offer what Menderchuck needed to grow into the future.

Menderchuck needed a platform that was fast and scalable. We needed something that would allow us to be a portal application. We needed something that was easy to deploy. We wanted to be able to build/deploy separate applications and have them ‘automagically’ linked together. And most importantly we needed something very configurable, and less opinionated.

In the search for a framework utopia, I came across two technologies I really fell in love with, Rack and Thin.

(More to come…)

The History Of Mack, pt. 1

Tuesday, February 26th, 2008

Let me start by answering the question at the top of your head, “why another ruby web application framework?” Great question.

I work for a company that for the time being shall be called Menderchuck. Menderchuck has been using Ruby on Rails since the company started two years ago. I am employee number three at Menderchuck, and was hired directly by the VP of Development. I was hired as the Senior Software Architect. I’m now the Director of Architecture for the company. :) Sorry about the bragging, I just like telling people I’m a director!

Prior to joining the company I had been using Rails for about 6 months, long before v1.0.0 of the now widely used framework. I loved Rails. I still do in fact, well, kind of. More on that later. Rails was the only choice for developing Menderchuck. The VP of Development and myself were huge fans, and having both come from Java backgrounds, we loved the flexibility and fun of Ruby as a language and Rails as a framework.

As I said we’ve spent the past two years developing Menderchuck using Rails, and for the most part things have been OK. I can’t say that they’ve been great, because, well, they haven’t. We’ve had scalability problems, deployment problems, and most importantly problems with the constraints that Rails places on development team.

The idea of an opinionated framework is great, in theory. If you follow and play by their rules things are great. The problem arises if you want to stray from the beaten path. Then you are left out on your own. Left to forge your own path, and as we’ve found at Menderchuck, you end up doing a whole hell of a lot of hacking!

Rails was designed for, and is incredible for building Web 2.0 applications. Menderchuck, although touted by the CEO as a Web 2.0 application, is really more of a complex and large scale web application, in the flavor of Web 1.0 applications. It’s also more of a portal, which can be a very difficult thing to build with the Rails framework.

Now don’t get me wrong, you CAN build a portal using Rails, but it really involves turning the framework on it’s head and kicking it in the neck. That just shouldn’t be the way build things.

Enter Mack. (More to come…)