News for hackers. Stuff that matters.
Re:PHP in 2019 by bayesian_horse on Wednesday May 15, 2019 @07:07AM (#19918215)
Every time I try out Flask, Aiohttp or even Express.js I appreciate more the stuff Django normally does for me.
Re:PHP in 2019 by zius on Wednesday May 15, 2019 @08:29AM (#19918703)
Django abstracts away a bit too much, if you ask me. For a simple REST API it's complete overkill. I prefer Flask or Falcon[0], in which you don't just get better performance[1] but also a lower level of control.

[0] https://falconframework.org/

[1] https://klen.github.io/py-frameworks-bench/ or https://github.com/the-benchmarker/web-frameworks

Re:PHP in 2019 by Daishiman on Wednesday May 15, 2019 @12:58PM (#19921378)
Why exactly do you want a lower level of control?

You want the complete opposite; have as many problems solved for you already with battle-tested ways to break out of the happy path when you need to.

Every sufficiently large Flask app becomes a half-assed reinvention of half of Django, except without the hundreds of thousands of eyeballs and man-centuries of bug fixing.

Re:PHP in 2019 by zeptomu on Wednesday May 15, 2019 @10:25AM (#19919671)
I agree with your parent. When I started with (Python) webdev some years ago I picked Flask, but nowadays I use Django, as it has superb documentation and useful things built-in. In particular I miss the user-management, authentication and authorization in Flask.

Personally I consider Django without any additional apps less complex than Flask with apps (or "plugins" in Flask jargon) to handle basic stuff like auth.

If performance is a concern, both of them are insufficient and I would rather pick another language like Rust, Go or even Java.

Re:PHP in 2019 by robertfw on Wednesday May 15, 2019 @01:11PM (#19921541)
I started with Flask, moved to Django, and now at work am back on Flask. It all depends on what you are building; if you are going to need some ORM, standard auth, etc, Django is a no brainer. However if you are going to be building out much of your own idiosyncratic architecture, Flask gets out of your way and avoids including lots of things you don't need.

For performance, we are building some parts of our system with Clojure. It feels extremely well suited, albeit with some initial learning curve.

Re:PHP in 2019 by azdacha on Wednesday May 15, 2019 @11:16AM (#19920227)
How are you implementing REST using Faclon if I might ask ? fully custom ? or is there anything like DRF hanging around ?
Re:PHP in 2019 by guggle on Wednesday May 15, 2019 @10:51AM (#19919942)
Dito.