Comparison with Bottle?
ChadBailey opened this issue ยท 3 comments
Forgive my silly question... How does itty compare to bottle?
I think adding this explanation to the readme would make a lot of sense. Comparing to Flask and Django (very high level) may be useful too, but itty and bottle seem to exist in a very similar space.
The answer is that there's a lot of overlap. A little bit of history & context is needed.
The very first commit to the original itty was made on March 6, 2009. At this point, there were many fewer web frameworks in the Python world, with the prominent ones being Zope, early Django (pre-1.0) & Pylons/Pyramid.
Around this time, in the Ruby community, they were experimenting with microframeworks, one of which being Sinatra. Being an ex-RoR developer, I was still following their communities closely & loved the idea of a super-lightweight framework for small tasks, but wanted one in Python.
Hence, itty
was born.
Over the following months, @defnull was active with itty
at the time. They helped other community members, suggested improvements & pushed for moving from regex-style URLs to Sinatra-style capture of URL data. I somewhat resisted the idea at the time, preferring the "completeness" (whatever that means) of regex-based solutions (and being closer to Django at the time). I also got unfortunately busy & itty
languished.
Understandably, @defnull decided to go their own way. Bottle's first commit came on July 1, 2009. The very top line references itty
& much of the code seems to have been pulled directly from itty
at the time. Today, very little of that code remains.
I was a touch hurt, in that I felt like my code was directly used without correct attribution (technically in violation of itty
's license). At some point, even that first line disappeared. I never spoke with @defnull about it & decided to just try to let it go.
Time is an excellent, if painful, teacher. What I should've done was made @defnull a full contributor, worked to find a way to incorporate both of our ideas & given itty
more attention. I didn't really understand how to run an open-source project at the time, nor when to let go & let others help. And even Django has moved on to a simpler URL capture method, so itty3
has followed suit, proving that Marcel had the right idea all along about what people would prefer.
For clarity, I think every bit of @defnull's success on Bottle is earned & well-deserved. Bottle had superior documentation, much improved testing over time & a proper community. There's a decade of hard work there.
As a last bit of history, Flask didn't exist until over a year later. In retrospect, both itty
& Bottle
may have missed a big opportunity (or dodged a bullet, depending on how you want to see it ๐ ).
As for itty3
, I was never very happy with the limited work I did to add Python 3 support work done on the original itty
. For ~4 years now, I've been itching to rewrite it specifically for Python 3, but was too burnt out to do it. This year, I finally had the chance & motivation to do it.
Anyways, sorry for the super-long tangent. If you made it this far through my drivel, your patience is to be commended. And I appreciate the suggestion & will be adding comparison docs (as well as a migration guide from itty
->itty3
) for the next release.
===
tl;dr - Bottle's great (and Flask is great & Django is great), so if it suits your needs & you'd like a bigger community, you should use it.
itty3
's main benefits are that it's tiny, easy-to-read, and Python 3-only. I'm proud of it & feel it's worthy of production use, but I don't expect it will ever have a big install base/community in light of the other modern options. But I'm obviously a little biased. ๐
I was a touch hurt, in that I felt like my code was directly used without correct attribution (technically in violation of itty's license). At some point, even that first line disappeared. I never spoke with @defnull about it & decided to just try to let it go.
While bottle was clearly heavily inspired by itty, I'm quite sure that I did not start with a copy of your code. I might have had it open in a separate tab, though ;) But even if I did copy&paste some sections and then edited them, I do not think there is a licensing issue, as the first commit is more or less a complete rewrite. For a library so small some similarities are inevitable. I removed the attribution only after the project was so different that I felt it was appropriate. The attribution is still there, as part of bottles history.
But I also know hat this is not what actually hurt you. Believe me, I know what it feels like to be copied (API wise) and then watching some other guy having more success with it than yourself. Flask started as an April fools joke called 'denied', directly mocking the one-file approach of itty/bottle and perhaps other microframeworks. Armin pulled this joke some time after I had an argument with him on IRC about why I did not 'just use his werkzeug library'. I find it really hard to not see a connection here.
He was seemingly surprised (or annoyed) by the actual demand for such a thing and quickly released Flask after that. For a short time Flasks tagline was "Like bottle, but classy" or something similar if I remember correctly, or at least they discussed it. He then never again mentioned itty or bottle in any of his talks or blog posts as the inspiration of Flask, as I know of. Even when directly confronted with the similarities, he denies any connection, and even called bottle a cheap knockof of TurboGears on HN (in response of 'denied' being called a knockof of bottle). Fun times.
This does not feel nice, and I am sorry that I made you feel like that back then. But that's open source. In the end, for the community, it was the right choice to release Bottle and for Armin to release Flask. Flask won, obviously. Bottle is still growing steadily and found is niche. And itty is also still used by people. Without it, bottle would probably not exist. And without Bottle, who knows if Flask would have happened? You created Flask, indirectly ;)
Wow, I never expected such a small - seemingly innocent - question to unearth this rich history. Thanks so much to both of you for explaining all of that. I did read all of both of your posts lol. It was a joy to hear all of that untold history that I was completely unaware of.
For what it's worth, I can now say I've used and recommended all 3 products at one point or another so there's that lol. I suppose I am a small sample size. This may not be a common or well-understood argument today but I do think soon people will begin considering how a microservices API deployed on a much lighter framework like itty/bottle can mean a financial benefit due to better bin-packing performance.
Me on the other hand, I'm just a little obsessed with the notion of "only take what you need". This mantra has served me well, it's resulted in building faster running applications that require fewer resources.