Live data from Hacker News

A Beginner’s Introduction to Python Web Frameworks (2018)

stxnext.com

161–168 of 168 posts

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#161

Earlier quoted context omitted.

Don't know why this is downvoted - it's crystal clear advice for beginners - "just use Django".

Django brings a lot of concepts with it. It may be simpler to start teaching with Flask and build up from there until the need for something like Django becomes obvious.

Django projects can be extremely simple.

And most of the "concepts" Django brings with it are extremely important for any non-trivial web application.

Django also makes it harder to mishandle security.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#162

Earlier quoted context omitted.

It is a design decision from a time where the general belief was that template designers played in a lower league compared to "real" software developers. It is 2019 and personally I see no reason to think professional template designers will shoot themselves in the foot if we give them too much power. We are all consenting adults...

A stated reason is: https://django-best-practices.readthedocs.io/en/latest/appli... A common pattern in MVC-style programming is to build thick/fat models and thin controllers. For Django this translates to building models with lots of small methods attached to them and views which use those methods to keep their logic as minimal as possible. There are lots of benefits to this approach. DRY: Rather than repeating the…

Sound reasons but there is nothing preventing you to adopt this pattern with Jinja. :-)

I'm glad that Jinja2 templates are now first-class citizens in Django as I care about performance and don't feel like patronizing template designers with a carefully handicapped template language.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#163

This is a short list I have compiled a few months ago, FWIW: New kids on the block: - Starlette https://www.starlette.io - Vibora https://vibora.io - Xweb https://github.com/gaojiuli/xweb - Storm https://github.com/jiajunhuang/storm - Responder http://python-responder.org - Quart https://pgjones.gitlab.io/quart/ - Sanic https://sanic.readthedocs.io - Bocadillo https://bocadilloproject.github.io/ - Japronto https://gi…

Is there any python framework that optimizes for developer productivity?

for just simple api apps I love hug and flask_restfull

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#164
post #11

This is a great resource, and there are some neat inclusions like Falcon, but I find the main trouble when building python web apps is deployment. I always feel like I've duct-taped my carefully written app to the web-server.

Why, a Docker container. Yes, even on Windows. Pack up everything into a single image, downloadable from nearly anywhere. Your web server (which likely also terminates TLS) has to have fastcgi support, you configure the fastcgi and database ports, maybe mount a directory with config files into the container, and that's it.

or you can run on google app engine seamlessly.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#165

Earlier quoted context omitted.

That seems like a rather extreme statement.

Like any answer here, it's my opinion. If it were not extreme, then it would be not a very strong opinion or worth considering.

Strong opinions should be carefully considered and have compelling reasons behind them. They shouldn't be extreme just for the sake of it.

I say this as someone who happily uses Flask at work.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#166

Earlier quoted context omitted.

Django is a pretty big omission from your list.

Especially considering Django powers Instagram and Pinterest's backends. At some point, Python's creator Guido van Rossum also said "My personal favorite -- and I expect that that will remain a personal favorite for a long time -- is something named Django. ... I highly recommend it." Personally, I use Django with REST Framework ( https://www.django-rest-framework.org ). I've enjoyed using it tremendously for the pas…

[deleted]

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#167

Beginner's guide to choose a Python web framework: Django.

Don't know why this is downvoted - it's crystal clear advice for beginners - "just use Django".

Flask has a very dedicated fanbase.

There seem to be some people who just have a problem with Django choosing sensible defaults for average scale projects.

Re: A Beginner’s Introduction to Python Web Frameworks (2018)

#168

Earlier quoted context omitted.

Right. With Flask, I can simply get to the point where I'm rendering templates, styling with CSS, adding assets and populating template variables with data from simple (or complex) functions I've written. You can take care of a lot with just that.

Eventually, when the application reaches production, you'll have cobbled together a unique subset of Django. That's the downside of Flask.

And good luck with auditing upstream versions and security in general.
Post reply on HN