[ANN] Gusto.com Rails Site

Hello -

I wanted to announce a very large web application that was built with
Ruby
on Rails and runs the site Gusto! http://www.gusto.com/ . It was
deployed
yesterday in a little over 4 months of development with 3 developers.
The
origins of the site were being developed in Java using Hibernate +
Tapestry
and the decision was made to port the 100+ table model to Rails to see
if
there were improvements in productivity and job satisfaction. The
results
were astounding as most of you probably already have found out for
yourselves. Overall we’ve been extremely impressed with the
performance,
ease of development/deployment, and especially the quality of the
framework. Everyone on the development team were all heavy Java
developers and none of them had any Ruby or Rails experience and the
overall
feeling in our group is announced by frequent mumblings allong the line
of
“I love rails…” or “man… I really love rails”.

Thanks to all the great work of the ROR developers and this community
for
doing such a fantastic job of creating such an elegant framework.

Cheers
Mike Engelhart

On 3/14/06, Michael E. [email protected] wrote:

Mike, would you be able to share some details of the decision-making
process
around moving away from Java+Tapestry+Hibernate over to Rails? We’re
all
looking for good case studies and stories that will help us sell Ruby
and
Rails into existing Java shops.

Cheers,
/Nick

Hi NIck -

Sure I would.

Essentially we had been actively designing the back end database for
this
application which BTW, also includes a full-blown content management
system
that controls all aspects of the front facing gusto.com website. We
had a
very large model (100+ tables) built up to support the business goals
and
had started prototyping the web application using Hibernate + Tapestry .
I
arrived at Hibernate + Tapestry from a desire to develop something that
was
“like” WebObjects because at the time there was a lot of uncertainty
around
the fate of WebObjects and I was also concerned that the community was
so
small I felt it would be hard to find skilled developers as we grew.
WebObjects, in my opinion is the best Java based tool for building
database
driven sites but I couldn’t risk using it since it was very poorly
supported
by Apple at the time. So after a pretty good amount of research I
arrived at Tapestry + Hibernate being that me and my team were all Java
developers for the last 5+ years.

Tapestry is a very complex MVC framework that had some points that were
similar to WebObjects but it also had all sorts of bizarre baggage like
the
“rewind” cycle that quickly became unacceptable to have to code around.
Also in Tapestry the push is to make everything a component and most of
the
time, we weren’t getting any reuse out of the components we were writing
and
had the added complexity of having to write and wire up a component
which
weren’t trivial to code in most cases. Also the much touted feature
about
Tapestry that your designers have the ability to preview your templates
in
the browser without having to run the application also quickly became a
farce due to the fact that to make the design work you needed to have a
“fake data” in there. I mean you can’t design a page that requires a

    and yet have no list items so essentially you end up creating all this yucky fake template to be able to preview and in the end we ended up mocking things up in static HTML and moving it back into the Tapestry templates.

    As for HIbernate, well that was just a plain bad decision. Hibernate
    while it does do lots of things and maybe is important if you have a
    legacy
    database that you need to code against, is also a very complex framework
    with which to code your application. All of the developers on my team
    were
    very skilled programmers but everyone agreed Hibernate was not fun at
    all to
    work with. Having to write a ServletFilter to close a database
    connection on the fly because otherwise Hibernate would throw
    LazyLoadExceptions was a constant annoyance. The other thing I found
    irritating about Hibernate was the community. Time after time when
    researching something in the forums I came to the conclusion that core
    developers were the most arrogant SOB’s I’d ever come across. It’s one
    thing to be frustrated with newbies of which there were a lot, but to
    have
    many many threads that devolved into name calling by a committer was
    just
    absurd.

    So after 4-5 months of this, Ruby on Rails came to my attention as the
    news
    surrounding it increased. I had been a big fan of Python and used it
    extensively when writing data mining code so I wasn’t a stranger to
    scripting languages although at the time I hadn’t written any ruby code
    other then hello world a few years ago.
    But after seeing the video, I was tempted to download the framework and
    test
    it out. It was clear pretty quickly that the framework had a lot of
    potential but I wasn’t sure how to go about things so I put in front of
    my
    team an option to take 2 weeks off from further Java development to
    attempt
    a port of our 25,000 lines of code to Rails and to see how far we got
    for
    one and to also assess the flexibility and productivity increase if any.
    Keep in mind that none of us had every coded any Ruby. We armed
    ourselves
    with copies of the PickAxe book, Agile Development with Rails and jumped
    in.
    The first decision made was to adhere to the naming conventions instead
    of
    trying to force our singluar based model and do all the rails
    workarounds. That was one of the best decisions we made. By writing
    some scripts against the schema it took about 2 days to modify the
    schema
    via a bunch of SQL scripts to support the Rails naming conventions.
    Once
    that was done, we quickly ported a huge section of the website in the
    first
    2 weeks. In all it took probably 4 weeks to port both the user site
    and
    the CMS back office application to Rails and it was all done with smiles
    on
    our faces. No more Eclipse, no more XDoclet delays when making simple
    changes to a database table. By the end of the port we had
    significantly
    improved the application while at the same time dropping roughly 15,000
    lines of code from the system which lowered the complexity of our
    application significantly.

    At the end of the day, the risk that we took has paid off in spades. My
    team is happy at work every day and we are pumping out more code and
    features then I ever could have imagined was possible with such a small
    team.

    I think a lot of people worry about performance as did I. Until we
    launched I was nervous about how this was going to scale but now I feel
    like
    it’s going to scale very well and easily. As has been said, the LAMP
    issue
    has been solved and with the application of a memcached our site was hit
    with Siege with 50 simultaneous requests and was delivering the hugely
    database centric pages in under 1 second all from one server. But under
    a
    more realistic heavy load situation of 5 simultaneuous users we are
    seeing
    200-300 ms response times.

    Thanks again to this great community for making development fun again!
    :slight_smile:

    Michael E.
    CTO- Gusto.com

You have to understand that Michael is coming from Apple WebObjects
which
has EOF as its object relational mapper (and then some). I too have had
Hibernate thrust upon me, and it really is ‘clunky’ (I’m being kind)
compared to EOF - very much akin to operating at the EOAccess layer if
you
know WebObjects. Cayenne is a very good substitute for EOF. But nowhere
is
‘convention over configuration’ better felt than in database mapping.
ActiveRecord is very sweet indeed.

Thanks for the feedback, Michael

Geoff

On 3/15/06, Michael E. [email protected] wrote:

developers were the most arrogant SOB’s I’d ever come across. It’s one
thing to be frustrated with newbies of which there were a lot, but to have
many many threads that devolved into name calling by a committer was just
absurd.

Personally, I found Hibernate to be a fantastic product. It’s well
implemented, with a good API and documentation. It’s also very
efficient at runtime. Most of the problems you’re going to run into
are solved, which is partly where the “learn to search, n00b” attitude
on the forums comes from. If you can get past learning curve, it
really is a great framework.

Having said that, it makes me happy inside to use the new :through
param in edge Rails, knowing how much effort that would take to set up
in Hibernate.

– James

On 15 Mar 2006, at 18:20, Michael E. wrote:

In all it took probably 4 weeks to port both the user site and the
CMS back office application to Rails and it was all done with
smiles on our faces.

That made me remember something. A year ago I was getting so
miserable of coding, so fed up with IT, finding it so frustrating to
write anything in a reasonable timeframe, I considered quitting the
gig completely and going to study law.

Then I found Rails. Now I have my own company. And I smile every time
I open the laptop…

The fact that development has suddenly become fun again is probably
2/3rds down to Matz for making Ruby pleasurable, and 1/3rd DHH for
making it useable in a real-World environment in an easy and friendly
way.

I know we all sound like fan-boys, but that smile on our face we all
have - it’s more priceless than all the Java development in the World.

By the end of the port we had significantly improved the
application while at the same time dropping roughly 15,000 lines of
code from the system which lowered the complexity of our
application significantly.

That’s one hell of an improvement. I was surprised myself the other
day when I was able to write an app that I’d guessed at 4,000+ lines
of PHP got implemented in about 600 lines plus user/login_engine. :slight_smile:

At the end of the day, the risk that we took has paid off in
spades. My team is happy at work every day and we are pumping out
more code and features then I ever could have imagined was possible
with such a small team.

Cool, isn’t it? When you can wake up one morning, think of a new
feature your customers would like, and have it implemented and tested
by lunch, signed off by 2pm and deployed before hitting the bar for
post-work drinks. Who can’t love that?

Coding at the speed of thought. That’s what you have to love.

I think a lot of people worry about performance as did I. Until
we launched I was nervous about how this was going to scale but now
I feel like it’s going to scale very well and easily. As has been
said, the LAMP issue has been solved and with the application of a
memcached our site was hit with Siege with 50 simultaneous requests
and was delivering the hugely database centric pages in under 1
second all from one server. But under a more realistic heavy load
situation of 5 simultaneuous users
we are seeing 200-300 ms response times.

I keep on eyeing what is going on with all the work around ruby2c and
so on - I reckon within a year we might hit a point where we can
develop in Ruby and easily deploy as compiled native binaries that
run ridiculously quick. There’s going to be some big performance
improvements over the next year or two, so you might be able to get
that response time reduced considerably whilst handling much bigger
loads in the not-too-distant future.

Thanks again to this great community for making development fun
again! :slight_smile:

Here, here!


Paul R.
Vagueware Ltd

Thanks for clearing that up for me Geoff :slight_smile:

Just for the record James, I didn’t say that HIbernate was a bad
product, I
just said it was a bad decision on my part to go with it for an ORM
wrapper
for my company. Hibernate does what it was designed to do in a
perfomant
way. Hibernate is a solid open source ORM wrapper. Working with it
was
not fun and it pales in comparison to EOF.

Rails is a much better solution for my company at this point.

Michael

Michael,

Great story! Could you please tell me what tools you used to develop
your RoR app? - Which OS, what editor/IDE/debugger etc. I’d
appreicate your feed back on this. Thanks,

bakki

On 3/15/06, Michael E. [email protected] wrote:

Hi, I am very interested in the implementation of the panel in the left
side
of such a url as:
http://www.gusto.com/newyork/newyork-CityRestaurantFinder1744251.html?character_id=1041#
The lists are type,theme,features,etc
I think it is ajax style,can the developers tell me how to implement
such a panel? very grateful!

Michael E. wrote:

Hello -

I wanted to announce a very large web application that was built with
Ruby
on Rails and runs the site Gusto! http://www.gusto.com/ . It was
deployed
yesterday in a little over 4 months of development with 3 developers.
The
origins of the site were being developed in Java using Hibernate +
Tapestry
and the decision was made to port the 100+ table model to Rails to see
if
there were improvements in productivity and job satisfaction. The
results
were astounding as most of you probably already have found out for
yourselves. Overall we’ve been extremely impressed with the
performance,
ease of development/deployment, and especially the quality of the
framework. Everyone on the development team were all heavy Java
developers and none of them had any Ruby or Rails experience and the
overall
feeling in our group is announced by frequent mumblings allong the line
of
“I love rails…” or “man… I really love rails”.

Thanks to all the great work of the ROR developers and this community
for
doing such a fantastic job of creating such an elegant framework.

Cheers
Mike Engelhart

I saw that too … it looks to be hand coded against prototype, not
using
the rails helpers.

Yes, this is a custom accordion because the accordions out there weren’t
suitable for our needs. It’s actually relatively simple, if you take a
look at new_accordion.js but the backend implementation isn’t something
that’s explainable in an email. I do have a plan to tighten up and
genericize the javascript a bit better and release it to the rails
community
but at this time we’re all too busy being that it’s so soon after the
launch
to do that.

Mike

We all are developing on Mac OS X 10.4 with TextMate as our text
editor/IDE. We use SVN as our source control system, PostgreSQL 8.1
as
our database and run using Lighttpd 1.4.x for our webservers.

Mike

Hey Mike,

Not a bad site! One bug I caught was the ability to schedule stays that
are impossible - you can set the check-in date in the future for
example,
and the check-out date before the check-in date. This situation causes
an
error that does not explain the situation. (Maybe tell them they need to
have a check-out date that is after the check-in date?)

The calender component is pretty.

Keep up the good work!

It’s not Mac OS X, or CVS really, but incorrect usage.

You have to explicity tell CVS which files are binary
or they will be corrupted. I cannot remember the magic
incantation, though.


– Tom M.

I found a corrupt image… I searched for seattle and the second header
down in the “gusto
picks” box is gobbledeegook. Looks like it was supposed to be the
“restaurants” header.
I’ve seen version control do this before (it was the cvs that comes with
Mac OSX).

b

PS: Snazzy site!