Making your oss project more like rails

110
{ OSS Project Friday, April 16, 2010

Transcript of Making your oss project more like rails

Page 1: Making your oss project more like rails

{OSS Project

Friday, April 16, 2010

Page 2: Making your oss project more like rails

{ Rails

Friday, April 16, 2010

Page 3: Making your oss project more like rails

Merb

We were trying to do:

* more choice* more modularity* more performance* toolkit for building other stuff (SproutCore)

These things sound counter to Rails’ philosophy... goes to show that seemingly oppositional OSS ideas may not, in fact, be oppositional.

Solving problems given competing constraints is the truly hard problem in OSS.

Friday, April 16, 2010

Page 4: Making your oss project more like rails

Question

Friday, April 16, 2010

Page 5: Making your oss project more like rails

Why does Rails make devs

happy?Friday, April 16, 2010

Page 6: Making your oss project more like rails

“Optimized for Developer

Happiness”Friday, April 16, 2010

Page 7: Making your oss project more like rails

Friday, April 16, 2010

Page 8: Making your oss project more like rails

Optimizing Locks You In

Friday, April 16, 2010

Page 9: Making your oss project more like rails

Harder, but possible to

optimize laterFriday, April 16, 2010

Page 10: Making your oss project more like rails

Defer Optimizing Measurable

ThingsGathering data will make your measurable optimizations better

Friday, April 16, 2010

Page 11: Making your oss project more like rails

One of the worst things you can do is ask your users to individually bear the cost of an optimization (modularity, perf)

Friday, April 16, 2010

Page 12: Making your oss project more like rails

Dynamic

Friday, April 16, 2010

Page 13: Making your oss project more like rails

Rails’ choice of Ruby was not due to popularity...

Friday, April 16, 2010

Page 14: Making your oss project more like rails

Friday, April 16, 2010

Page 15: Making your oss project more like rails

“If you don’t like it, !x it”

Friday, April 16, 2010

Page 16: Making your oss project more like rails

“For the past !ve days I have been struggling with a bug in the route code in rails 1.2.3. I

!nally monkey patched url_for to essentially force it to

do the obvious”

Friday, April 16, 2010

Page 17: Making your oss project more like rails

“Evil”?

One of the worst things you can do is ask your users to individually bear the cost of an optimization (modularity, perf)

Optimizing for these things at an early stage is essentially doing battle with your users (see: bundler)

Friday, April 16, 2010

Page 18: Making your oss project more like rails

Nothing Beats Adoption

Friday, April 16, 2010

Page 19: Making your oss project more like rails

Users stress-test your application in ways that you would not have thought of, making it more robust

Friday, April 16, 2010

Page 20: Making your oss project more like rails

Users help drive the needed feature-set... the faster you get real users, the sooner you’re basing your project on reality. It’s not easy to reverse course later.

Friday, April 16, 2010

Page 21: Making your oss project more like rails

Business Is Good for the

EcosystemFriday, April 16, 2010

Page 22: Making your oss project more like rails

Why there’s no Rails Inc.Friday, April 16, 2010

Page 23: Making your oss project more like rails

the growth of the Rails ecosystem has been staggering. There are so

many shops out there offering Rails consulting and training. I

believe part of that proliferation is due to the fact that there's no core-

group monopoly that can dominate the market

Friday, April 16, 2010

Page 24: Making your oss project more like rails

We have a tendency to underestimate the network effect.

Reducing the friction for users and businesses to interact results in a network effect.

Stifling it, therefore, stifles the network effect.

Friday, April 16, 2010

Page 25: Making your oss project more like rails

The company I work for, Engine Yard, exists because DHH encouraged businesses to help build the ecosystem.

Not everything we do is OSS, but our existence increases the amount of OSS in the world.

Friday, April 16, 2010

Page 26: Making your oss project more like rails

trademarks of DHHFriday, April 16, 2010

Page 27: Making your oss project more like rails

MIT License

Friday, April 16, 2010

Page 28: Making your oss project more like rails

Attribution and Credit Build

CommunitiesFriday, April 16, 2010

Page 29: Making your oss project more like rails

Nothing Beats Adoption

Friday, April 16, 2010

Page 30: Making your oss project more like rails

PDI

Friday, April 16, 2010

Page 31: Making your oss project more like rails

Please Do Investigate

Friday, April 16, 2010

Page 32: Making your oss project more like rails

Issue is that has_one associations don't cache nils, whereas

has_many do cache the empty array... This results in lots of

unnecessary and unexpected queries for all those

people that don't have thingsNote that this post is in 2006

Friday, April 16, 2010

Page 33: Making your oss project more like rails

Yes, please do investigate something better. I believe it was done

simply because it was easy at the time

Friday, April 16, 2010

Page 34: Making your oss project more like rails

@obie: Gawd, it's lame that unobtrusive javascript helpers

have dropped off the Rails 3.0 roadmap

Friday, April 16, 2010

Page 35: Making your oss project more like rails

@obie Re: Unobtrusive JS. We had someone

volunteering to do the work, but they dropped out. If you

have someone willing and able, PDI!

Friday, April 16, 2010

Page 36: Making your oss project more like rails

DHH != RailsFriday, April 16, 2010

Page 37: Making your oss project more like rails

These programmers share a similar weltanschauung, but they don't need to care only about the things that I care

about. In fact, the system works much better if they care about

different things than I do

Friday, April 16, 2010

Page 38: Making your oss project more like rails

My core philosophy about open source is that we should all be working

on the things that we personally use and care

about.

Sharing a worldview, and waiting a bit for something coherent before opening the doors wide, mitigates against scary shit

Friday, April 16, 2010

Page 39: Making your oss project more like rails

These programmers share a similar

weltanschauungFriday, April 16, 2010

Page 40: Making your oss project more like rails

Shared Goals

Friday, April 16, 2010

Page 41: Making your oss project more like rails

Convention Over

Con!gurationFriday, April 16, 2010

Page 42: Making your oss project more like rails

<abs>situps

</abs>Friday, April 16, 2010

Page 43: Making your oss project more like rails

Propaganda Works

Friday, April 16, 2010

Page 44: Making your oss project more like rails

Market First

Friday, April 16, 2010

Page 45: Making your oss project more like rails

Respond to Objections

LaterThe people with the objections aren’t your early adopters

Friday, April 16, 2010

Page 46: Making your oss project more like rails

Friday, April 16, 2010

Page 47: Making your oss project more like rails

Be High Impact

Friday, April 16, 2010

Page 48: Making your oss project more like rails

Don’t Cheat

Friday, April 16, 2010

Page 49: Making your oss project more like rails

(it will be obvious)

One of the wins of the 15 minute demo was that it got into quite a bit of nitty gritty. There’s some code generation, but you can easily see that the techniques scale

Friday, April 16, 2010

Page 50: Making your oss project more like rails

Cheating also results in

confused usersFriday, April 16, 2010

Page 51: Making your oss project more like rails

Assume Little

Friday, April 16, 2010

Page 52: Making your oss project more like rails

Don’t Try to Explain

Everything Up Front

Prospective users will give you 15 minutes; you’ll lose a ton of people if you ask them to spend days on it.

Show them the quick win.

Friday, April 16, 2010

Page 53: Making your oss project more like rails

Learn Symfony in 24 DaysFriday, April 16, 2010

Page 54: Making your oss project more like rails

Today, we have barely written PHP code but we

have a working web module for the job model, ready to

be tweaked and customized. Remember, no PHP code

also means no bugs!Day 3

Friday, April 16, 2010

Page 55: Making your oss project more like rails

Controversy is Good

Friday, April 16, 2010

Page 56: Making your oss project more like rails

Especially When it’s Not About

Your Core Functionality

Friday, April 16, 2010

Page 57: Making your oss project more like rails

FUD

Friday, April 16, 2010

Page 58: Making your oss project more like rails

You Can Fight it... to a Point

Friday, April 16, 2010

Page 59: Making your oss project more like rails

Pick Your Battles

Friday, April 16, 2010

Page 60: Making your oss project more like rails

And the Terms on Which They

Are FoughtFriday, April 16, 2010

Page 61: Making your oss project more like rails

“Ruby is Slow”We’ve gotten better at this... this section is more about what we’ve learned than us getting it right the first time.

Friday, April 16, 2010

Page 62: Making your oss project more like rails

OK: Productivity

is More Important

Because when it comes down to it, everything in business *is* a tradeoff... velocity always matters

Friday, April 16, 2010

Page 63: Making your oss project more like rails

Better: HTTP Overhead

Makes This Moot

Friday, April 16, 2010

Page 64: Making your oss project more like rails

Best: Actually Win Some

BenchmarksChallenge the FUD head-on... in this case, Rails has basically *never* been slower than PHP frameworks

Friday, April 16, 2010

Page 65: Making your oss project more like rails

Avoid Stockholm’s Syndrome

Friday, April 16, 2010

Page 66: Making your oss project more like rails

Rails Can’t Scale

Friday, April 16, 2010

Page 67: Making your oss project more like rails

Friday, April 16, 2010

Page 68: Making your oss project more like rails

Friday, April 16, 2010

Page 69: Making your oss project more like rails

1 in 200 Page Views on the Internet is to twitter.com

Friday, April 16, 2010

Page 70: Making your oss project more like rails

(not including API)

Friday, April 16, 2010

Page 71: Making your oss project more like rails

API Numbers are Higher than

90%Friday, April 16, 2010

Page 72: Making your oss project more like rails

Tout Your Successes and

Don’t be CowedFriday, April 16, 2010

Page 73: Making your oss project more like rails

Friday, April 16, 2010

Page 74: Making your oss project more like rails

Have a Safe Backup

Friday, April 16, 2010

Page 75: Making your oss project more like rails

Mobilize Around Weak

PointsFriday, April 16, 2010

Page 76: Making your oss project more like rails

Friday, April 16, 2010

Page 77: Making your oss project more like rails

Friday, April 16, 2010

Page 78: Making your oss project more like rails

“We started Engine Yard in early 2006 to meet a genuine need:

customers were developing business-critical Rails applications,

but they didn’t want to worry about application deployment,

management and scaling”

Friday, April 16, 2010

Page 79: Making your oss project more like rails

Businesses

Friday, April 16, 2010

Page 80: Making your oss project more like rails

Businesses+

CommunityFriday, April 16, 2010

Page 81: Making your oss project more like rails

Getting businesses invested means that the money is there without huge companies like Sun...

We can fund important projects, but financial interests keep us grounded

Friday, April 16, 2010

Page 82: Making your oss project more like rails

“Rails is Too Hard to Deploy”

Friday, April 16, 2010

Page 83: Making your oss project more like rails

Identify Your Competition

Friday, April 16, 2010

Page 84: Making your oss project more like rails

It’s useful to know exactly what the target is.

At some point, the Rails community ended up with stockholm syndrome about this and didn’t notice the problem was solved

Friday, April 16, 2010

Page 85: Making your oss project more like rails

The FTP strategy only takes you so far...

Friday, April 16, 2010

Page 86: Making your oss project more like rails

Friday, April 16, 2010

Page 87: Making your oss project more like rails

Friday, April 16, 2010

Page 88: Making your oss project more like rails

Friday, April 16, 2010

Page 89: Making your oss project more like rails

Friday, April 16, 2010

Page 90: Making your oss project more like rails

Friday, April 16, 2010

Page 91: Making your oss project more like rails

Friday, April 16, 2010

Page 92: Making your oss project more like rails

Friday, April 16, 2010

Page 93: Making your oss project more like rails

In short, technical

problems...Friday, April 16, 2010

Page 94: Making your oss project more like rails

...have technical solutions

Friday, April 16, 2010

Page 95: Making your oss project more like rails

Don’t be a slave to FUD

Friday, April 16, 2010

Page 96: Making your oss project more like rails

Know Your Competition

I’ve read, cover to cover, the books on virtually all major competing frameworks

Friday, April 16, 2010

Page 97: Making your oss project more like rails

There’s Plenty to Steal

Friday, April 16, 2010

Page 98: Making your oss project more like rails

Debate is OKThe OSS community alternates from ridiculous to “why are we arguing”

A good vigorous debate, even if it sometimes gets loud, is absolutely OK

But if you’re going to debate, you have to know what you’re talking about.

Friday, April 16, 2010

Page 99: Making your oss project more like rails

ActiveRecord comes from

PPoEAFriday, April 16, 2010

Page 100: Making your oss project more like rails

“Enterprise Architecture”Does that sound like Rails

to you?

The bottom line is that conflicting philosophies can have good ideas.

Friday, April 16, 2010

Page 101: Making your oss project more like rails

One Last Thing...

Friday, April 16, 2010

Page 102: Making your oss project more like rails

Convention over

Con!gurationFriday, April 16, 2010

Page 103: Making your oss project more like rails

Con!guration Options are a

Cop-OutFriday, April 16, 2010

Page 104: Making your oss project more like rails

Trade-Offs are Not Linear

Friday, April 16, 2010

Page 105: Making your oss project more like rails

Experiments?Given the “convention” philosophy, you might expect Rails to experiment very little

Friday, April 16, 2010

Page 106: Making your oss project more like rails

Dynlang + Vibrant Plugin

EcosystemBut actually, Rails people are some of the most bleeding-edge people around

Clojure? Erlang? Evented Programming? Node.JS?

Friday, April 16, 2010

Page 107: Making your oss project more like rails

Pull in Best Practices

But a good plugin ecosystem means you can be fairly conservative.

Friday, April 16, 2010

Page 108: Making your oss project more like rails

Make Sure Defaults Still Make Sense

There will always be people tugging on the defaults. The strength of conventions is in avoiding the tug.

Rails 3 solution (in general)

Friday, April 16, 2010

Page 109: Making your oss project more like rails

Thank you

Friday, April 16, 2010

Page 110: Making your oss project more like rails

Questions?

Friday, April 16, 2010