Hacker News new | ask | show | jobs
by drudru11 4880 days ago
I will give you my 2 cents on this argument.

tl;dr - Python had no web frameworks built in or community favorite. Rails was a complete re-think of how to do web apps in the age of XML (acaffolding, convention over config, etc.) Every language since has now realized this and copied Rails. This is a good thing.

if you want a story while drinking coffee, read below...

I was a serious Python guy from 1996 til 2006. I still like and respect Python. Before Python, I was a wanna-be Smalltalk fan. (This is important towards the end)

Python always had a philosophy of 'batteries included'. This means that it will have libraries for just about everything you need as supported parts of the language. Contrast this with Perl where CPAN quality was very hit or miss. Then contrast this with Lua or Scheme. They had too many libraries and none were standard. Most of those were, again, not supported or not of production quality.

As a result of 'batteries included', Python was just a dream to work with. Everything was doable or easy and performant 'enough'. I could go on, but that still wouldn't do it justice. They had a great language design, great libraries, and portability. Python is still a great framework. They didn't have a good 'CPAN'. This was ok, since the built-ins were good. Outside of that, it was a bit of a mess.

However, over the years, it became obvious that Python had a huge flaw. They did not deal with HTTP or HTML well. People don't even talk about this anymore, but the promoted framework was 'Plone'. This framework was so complex and convoluted, that building a simple web app was just not possible. It is not spoken about anymore. New frameworks popped up as a result, and very few of those were much good. This was a huge problem. Most people had to build their own production system. I had to switch languages for a job in 2002, and I didn't deeply follow the web framework discussion in Python for quite some time. I can tell you this, though. There wasn't a single framework that popped up as the winner or as exciting.

I'm typically a conservative. When I see a new thing, my typical take away is "this has been done before, what did they not learn from prior art". For example, lets say someone creates a new OS. If they don't really understand Unix, they will get it wrong.

When the first Rails screen-cast came out, I took a look. There was a lot of buzz that was increasing. I go, 'what the heck, it is only 5 minutes and it is a video.'

What I saw was an excellent architecture for building web apps. This architecture was better than anything else out there by quite a wide margin. They supported modern HTML. Convention over configuration. ActiveRecord was truly a treasure. The default site actually looked relatively decent (vs. the typical programmer, zero whitespace, huge serif, Netscape circa 1998 site). They URL conventions looked good. This architecture was human friendly. These people understood what a modern app should look like.

I was sold. Just from that screencast.

I believe in using whatever language is needed, if the framework is excellent. I wanted to build excellent web apps, so I learned Ruby. Ruby was easy to learn, and it is as good as Python. Much to my surprise it was the first language to pull off having Smalltalk blocks! People didn't even notice this and now they really like it. Everytime I showed this to coworkers, they would go 'what is that? I don't understand'. When people eventually learn Rails, they would go.. "check out these block things. They

So, in summary, Python didn't have a web framework. Rails was an excellent design, compared to any languages framework. Rails is pretty much going to be here for quite some time.

BTW, at this point. Rails is not my first choice. I think it is too heavy and web architecture has shifted a lot. Still, it would be in my top 3 choices.

5 comments

Great summary and a joy to read. Having moved from Django to Rails not so long ago, I do enjoy some things in Rails, but feel the heavy-weight aspects you touched on.

Dealing with some of the deployment and infrastructure aspects of our rails app, I also see how much more memory and resources are consumed. Anything from Unicorn processes through rake tasks, to the time it takes to launch the console or run tests seem an order of magnitude longer. It's like steering a 747 or a cruise-ship. Once it's running it's fast and quite stable, with nice and comfortable features and lots of elegance. But it doesn't feel anywhere near as nimble and responsive as python/django (and django is by no means a small framework).

I'm wondering what's your top 3 choices today.

actually just re-read my post. it makes me cringe a little. I was in a hurry and hit send a bit too fast.

The other choices:

I like node.

I've always liked the async/model on unix. Their community is healthy and a lot of the open source is clean. The npm system is a good system. Even if you aren't running node, people are using node as their toolchain for pure front end development (css transform,asset pipeline). If you are doing anything real-time with a browser, it is my first choice. (Erlang used to be my choice there)

Also, yes Javascript has its pros and cons, but at this point everyone must know it.

As another choice, I still like sinatra with rack middleware. Very light and it works well.

Beyond that, it depends on the application. I might use C,Scala,PHP or ?? who knows what.

I went the other way, started using ruby and then switched to python because of the machine learning libraries and async frameworks. I found rails too bloated and too much magic and fell in love with minimal frameworks like tornado that i have a lot more control over. My productivity increased dramatically using tornado and flask. It seems like each of these languages have their phases to be on top, right now i am using nodejs and twitter storm for a project and i am finding it quicker to build async web services and the amount of async libraries is really helpful.

Scala is allowing access to some good java machine learning libraries and tools such as mahout, scalding, storm, akka, finagle, therefore i believe as a developer we should not define ourselves to a platform or language but we should always be curious and use the best tool for the job. I am not using tornado for my current project because nodejs had the async libraries i needed, that simple.

As business opportunities are arsing around big data, sensors and the internet of things our favourite platforms and languages are going to evolve as well.

Hi, good perspective. I've used Scala as well. Twitter held a meetup with Martin O back in 2007. At the time we started using it, the actor code was not ready for production. I think there is a lot of great activity in that space. I'm sure most of these have been addressed.

I also agree with your last statement. This is not the end of the road.

> I had to switch languages for a job in 2002, and I didn't deeply follow the web framework discussion in Python for quite some time

Good Lord. This is like 11 years ago?

heh - I didn't think about that til you mentioned it. Yes, but during the 2002-2007 time frame, I was aware of what was at the "front of the parade" for python. Nothing really stood out til Rails. If I knew Aaron Swartz, things might have been different.

Oh yeah, this reminded me of another painful thing back then. It was so difficult to find documented, clean MySQL bindings for python. Every experience there was terrible.

Learning Plone was a requirement for an internship I was considering in 2006, fwiw.
You have my sympathies.
Out of curiosity, what's your first and second choice?
Great writeup.

What would be your #1 and #2 choice?

see my reply above