|
Re: Library or Framework?
|
Posted: Mar 15, 2006 8:42 AM
|
|
Python, by the way, seems not to lend itself well for programming using frameworks, which is, in my opinion, a good reason to compare it to Ruby yet again (please bear with me :)).
The reason is that Python isn't magical enough (»explicit is better than implicit«, right?). Frameworks like Ruby on Rails can and do build on Ruby's metaprogramming magic, which lets you do a lot of really weird things.
I think that if you want to use a framework that does a lot of work for you in a magical and convenient, but sometimes opaque way, Ruby is the right choice. On the other hand, opaqueness isn't really a nice thing when you want to write an application that doesn't make use of a framework. In that case, Python is much more transparent in its behaviour.
The flipside of the coin, of course, is that frameworks impose a set of conventions and restrictions on the programmer, which is a good thing. As Python comes with a lot of conventions and restrictions already (»there's only one way to do it«), you don't need frameworks for that: libraries are enough.
There's one point left: frameworks are more convenient, but you have to really get into them before using them. If you know Python, you can use all of its libraries instantaneously. If you know Ruby, you can't do anything serious without learning a framework, too. (That's an exaggeration, of course, but it's kind of true.)
Thus, my conclusion: Ruby + framework + learning curve = Python + libraries + inconvenience. Or something like that :)
|
|