Live data from Hacker News

Flask 1.0 Released

palletsprojects.com

151–160 of 184 posts

Re: Flask 1.0 Released

#151
post #137

Earlier quoted context omitted.

This one trips up every podcast host and blogger. It is not a global object, it just pretends to be with some wrapper magic. Like an attribute method it is not a simple variable.

Which is even more magic... I don't get why the request and context isn't just passed as parameters. Explicit is better than implicit!

> Explicit is better than implicit!

Only if you want DRY to mean "Do repeat yourself".

Re: Flask 1.0 Released

#152
post #137

Earlier quoted context omitted.

This one trips up every podcast host and blogger. It is not a global object, it just pretends to be with some wrapper magic. Like an attribute method it is not a simple variable.

Which is even more magic... I don't get why the request and context isn't just passed as parameters. Explicit is better than implicit!

Agree: passing the request with the full context as parameters to the handler function seems like a more explicit approach.

Re: Flask 1.0 Released

#153

Love Flask in theory. My biggest complaint was trying to do user management with it. Flask-Security was good, but the developer skipped town a few years ago. Did they come back? :D Basically you are left to your own devices, which sounds great, but user+auth is pretty fundamental to be left to a random absentee third-party in my opinion.

Check out Flask-User. It's a lot like the user auth in Django. Developer still around.

Re: Flask 1.0 Released

#154

Earlier quoted context omitted.

Decorators improve dev speed. No need to be constantly switching back and forth between views and urls.py. Still, sometimes nice to see all in one place.

They only improve speed from an initial "get it working" point of view. That's part of the reason flask is rarely taken seriously as a production solution. Not having natural separation between views and urls is a real PITA for anyone trying to create a long term solution or larger project. For what it's worth, I also hate the argument that bad design increases Dev speed. That's only true until you need find somethin…

FYI with flask you don't have to use decorators for routing. You have the option to define all your routs in a single file.

Re: Flask 1.0 Released

#155
post #72

wow, lot of Flask haters here. I personally love it and have used it for a ton of smaller projects. For example, I just deployed this a couple days ago: http://dadjoke.info

FYI your home page refers to "DadJokeJunkie.com promises not to spam you or share your number and you can opt out at any time." but that is not your site :P

Yeah, I know. Was having problems with the domain and bought the .info to just make it work. Once I have a couple minutes, I'll make it work with the other

Re: Flask 1.0 Released

#156
post #48

Earlier quoted context omitted.

In my experience, Django is less suitable for large projects than Flask. The nature of Django encourages tight coupling between unrelated parts of the system - Models intertwine database operations and business logic, ModelViews intertwine db operations, business logic and the interface layer. This is manageable in the small, but when you hit scale, this tight coupling adds a whole bunch of unnecessary complexity to…

Django is great for building Django apps. That is, if you're starting a greenfield project and don't have to integration with an existing database schema, and you like the Django ORM, and you like Django templates, and your data model maps cleanly onto a relational DB, and you can use the admin site more or less as-is without having to customize much, then it's lovely! I'm not being sarcastic: it really is. We've suc…

You don't need Django's ORM, templates, and admin section to build a Django app. Check out this example of a single-file Django project:

https://www.safaribooksonline.com/library/view/lightweight-d...

It's from a good book called Lightweight Django.

Re: Flask 1.0 Released

#157

wow, lot of Flask haters here. I personally love it and have used it for a ton of smaller projects. For example, I just deployed this a couple days ago: http://dadjoke.info

US numbers only :(

I know:(, sorry. Reason is I'm using Twilio for the text messages and non-US numbers are really expensive. Since I'm not trying to monetize it I want to make sure that I am able to fund it out of my pocket.

Re: Flask 1.0 Released

#158

wow, lot of Flask haters here. I personally love it and have used it for a ton of smaller projects. For example, I just deployed this a couple days ago: http://dadjoke.info

Your website looks sleek. Hope dad joke newsletter business goes well for you.

Thanks, this will probably be a net-negative on my part, but was a fun project to work on. It stemmed from a hack day I had at work

Re: Flask 1.0 Released

#159

wow, lot of Flask haters here. I personally love it and have used it for a ton of smaller projects. For example, I just deployed this a couple days ago: http://dadjoke.info

Maybe add Telegram/FB Messenger support? US numbers only is a bit restrictive

Not a bad idea! That was I wouldn't have to pay non-US SMS rates.

Re: Flask 1.0 Released

#160

Earlier quoted context omitted.

Decorators improve dev speed. No need to be constantly switching back and forth between views and urls.py. Still, sometimes nice to see all in one place.

They only improve speed from an initial "get it working" point of view. That's part of the reason flask is rarely taken seriously as a production solution. Not having natural separation between views and urls is a real PITA for anyone trying to create a long term solution or larger project. For what it's worth, I also hate the argument that bad design increases Dev speed. That's only true until you need find somethin…

True in a very large project, false on the rest. Congrats on your one-true-way argument. ;)
Post reply on HN