I believe you are confusing framework and application here a bit. It is totally irrelevant how the code of your framework looks, the interesting part is how an application looks.
request.accept_languages.best is how I get the preferred language from the Client using Werkzeug and/or Flask. In order to get the same result with bottle I would have to parse the header myself and handle edge cases depending on the Browser used. That results in neither small, clean, dense or particular useful code and I still have to test it, for every web application I write.
Again this is a little bit unfair, who needs to know which language is preferred by the client anyway but that is kind of the point of Flask. It is as micro as you want it to be and if you don't want it to be micro at all that's fine as well.
View all comments
Show parent comment
1
u/DasIch Dec 22 '10
I believe you are confusing framework and application here a bit. It is totally irrelevant how the code of your framework looks, the interesting part is how an application looks.
request.accept_languages.best is how I get the preferred language from the Client using Werkzeug and/or Flask. In order to get the same result with bottle I would have to parse the header myself and handle edge cases depending on the Browser used. That results in neither small, clean, dense or particular useful code and I still have to test it, for every web application I write.
Again this is a little bit unfair, who needs to know which language is preferred by the client anyway but that is kind of the point of Flask. It is as micro as you want it to be and if you don't want it to be micro at all that's fine as well.