Ben Allfree :: Painless Programming

Guaranteed results for iPhone, Rails, PHP, .NET, Flash, and more

Rolling your own framework is good

September 20th, 2008 · No Comments

I’m building PrestoScript in Ruby and the more I get into it, the less I am in anyone’s framework but my own. Why is that? Is there a certain class of problems that are frameworkless? I’ve been thinking lately that generalized frameworks could be a farce. I always explain to clients that Ruby on Rails is streamlined toward building data-backed web applications. I stress that all you can really do with technology is optimize it toward a certain problem domain; you can’t really invent anything new (or rarely).

So the deeper I get into my problem domain, the less I like any framework except what evolves naturally from starting with a nice Turing-complete language like Ruby or Lisp. I probably sound a little like Paul Graham now, but the guy has a point: if you roll it yourself, you end up with something that fits the problem domain perfectly. That includes all the exceptions and random rules of life and departures from theory that you end up discovering along the way.

To those who cite the productivity gained from sticking with widespread or standardized frameworks as reason not to venture off the path, I might counter that any problem solved purely within an existing framework is not worth solving. In other words, yes, you can make a great web app with Ruby on Rails, powered by ActiveRecord backed by mySQL. But within that class of problems, what value are you adding? Ruby on Rails came from the Basecamp framework I think. They rolled their own starting from pure Ruby. The Rails community will continue walking the fine line between general utility and optimal solution, but in a bigger sense they’re just swirling around in the same toilet bowl with all the other turds.

When I get far enough into a problem, I find myself spending as much time fitting various “frameworks” together than it would take me to write something from scratch that fits perfectly, is optimal, and perhaps most importantly, makes me feel like I accomplished something good with my time.

Tags: , , , , , , ,

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment