Live data from Hacker News

Django 2.2

djangoproject.com

211–220 of 257 posts

Re: Django 2.2

#211
post #49

I've been away from Django for a few years, and hope to come back one day. One thing I'm curious about, coming from well-typed JS codebases using Flow, is the quality of typings in major projects like Django, Pandas, etc. Are their APIs well-typed? Can I get quality types for my models?

With Pandas, typically the important data types are the series data type for columns in a DataFrame or what not. Which Python will infer when you read in the data, or manually construct. These are data types provided by the Numpy library. And you can manually convert columns as needed with Pandas functions. If you mean the object itself, then Python is strongly typed and will throw an error if you try to run the wron…

Sorry, I meant static types, like mypy

Re: Django 2.2

#212

Earlier quoted context omitted.

I reviewed these sort of web frameworks some time ago and went with ASP.NET Core because of the language attached being more to my liking and industrial-strength than Python, PHP or Ruby. I go in assuming every project will be 500KLOC someday, because it can happen. I've seen codebases this large in Python, and it was no bueno. Static typing, forward migration / backwards compatibility take top priority for me. Larav…

But then you’re in Microsoft echo system. No bueno.

Would you mind expanding on this?

Re: Django 2.2

#213

Earlier quoted context omitted.

Yes, Python does have a repl, but I've never seen anyone doing real "repl driven development" in Python in my 15+ years of using it (btw, just testing some code in the repl isn't anywhere near repl driven development). See the blog post linked above to understand what I'm talking about. In Python, the repl is an accessory that helps testing small portions of code. In Clojure, the repl augments the editor, becoming an…

Ive never heard the term repl driven development, but I have been doing most of my coding in a jupyter/ipython notebook for around 7 years now and have been advocating it the whole time. The longer I do this the more I realize that I really need to try lisp

Awesome! That's exactly why I pointed out Lisp. Those who enjoy the tight feedback loop of Jupyter might also enjoy a language where this process is the natural way of doing things.

Re: Django 2.2

#214
I'm coming from a systems and desktop background and looking into a web side project. My only experience with backend frameworks is a few months with Django for a small project at work.

Is Django still a thriving development community? And is it able to handle a large amount of concurrent users? Basically is it a good choice for a backend for a new project? The web tech world moves really fast, and I like that Django has been around for years but wondering if it's still a good option.

Re: Django 2.2

#215
post #56
post #49

I've been away from Django for a few years, and hope to come back one day. One thing I'm curious about, coming from well-typed JS codebases using Flow, is the quality of typings in major projects like Django, Pandas, etc. Are their APIs well-typed? Can I get quality types for my models?

The PyCharm IDE has extra support for Django to enable some additional type inference, and it works like an absolute (pun intended) charm. Beyond that, the Django core isn't type-annotated yet likely because of Python version support, but I'm sure you can get typeshed pyis or something.

There's a discussion on the mailing list about this, last updated a few months ago: https://groups.google.com/forum/#!topic/django-developers/tr...

Re: Django 2.2

#216
I really hope Django can provide some front-end integration like Rails Webpacker or Phoenix does. Setting up a smooth SPA and proxy is such a grunt work which always something holds me back when I trying to set up a small project with Django.

Re: Django 2.2

#217
post #85

Whenever I see people still praising Django in 2019, I immediately know that their technical understanding of the current backend and ops technologies is years behind. Django is still okay for small and amateur projects but nothing more than that. It is a curse for a fast moving business. EDIT: even though I stopped writing Django for 3 years now but here are some of my reasons as far as I can remember: 1. mediocre r…

This post is very antagonistic but I can say that point 3 rings very true, even using advanced/data heavy SQL got very annoying for me relative to SQLAlchemy and I don't think you really want to try and pull it out.

It's been a while since I've used SqlAlechmy, but I remember absolutely hating it. Like you said, Django's ORM fails above very simple manipulation and even though SqlAlchemy might be better, it was still awful. I found it better to just write raw sql for my few use cases than to dive into page after page of sqlalchemy documentation.

Re: Django 2.2

#218

Earlier quoted context omitted.

With Pandas, typically the important data types are the series data type for columns in a DataFrame or what not. Which Python will infer when you read in the data, or manually construct. These are data types provided by the Numpy library. And you can manually convert columns as needed with Pandas functions. If you mean the object itself, then Python is strongly typed and will throw an error if you try to run the wron…

Sorry, I meant static types, like mypy

Right, my point was that static typing doesn't seem like a good fit for a library like Pandas, which needs to be flexible enough to handle a wide range of use cases for tabular data where you're cleaning, reshaping, etc. At least not without a total rewrite.

With Flow in JS, how would a JSON library for similar purposes work where you don't know what kind of data it will be and you will be doing a lot of transformations on it?

Re: Django 2.2

#219
post #8

Earlier quoted context omitted.

Django is still by far the best web framework as far as I can tell. Every couple years I check what's out there for GoLang, Rust, Nodejs, and Swift, and it seems like it will be a decade or more before anything else comes even close. Even though a lot of people don't like Django's ORM, at least it does almost everything you would want to do with Postgres. (And if you want more you can always use SqlAlchemy.) Most of…

IMO PHP's Laravel is competitive with Django. I think Django, Laravel, and Rails are really the only 3 frameworks with the levels of ecosystem and built in functionality that these 3 have (unless there's something in Java-land that I'm not aware of). ASP.NET Core is close, but the ecosystem around it is weaker.

I’m quite fond of Phoenix and think it compares favorably with Rails and Django (I’ve never used Laravel).

Re: Django 2.2

#220

I'm coming from a systems and desktop background and looking into a web side project. My only experience with backend frameworks is a few months with Django for a small project at work. Is Django still a thriving development community? And is it able to handle a large amount of concurrent users? Basically is it a good choice for a backend for a new project? The web tech world moves really fast, and I like that Django…

I have an assortment of Django and flask-based websites and Django still works fine for new projects from my perspective, with the normal caveat that it really depends on what you want to do with it. If i had to redo some of my projects I'd probably use the Django rest framework more heavily as I ended up duplicating a lot of that functionality writing Ajax endpoints way back in the day, but I've not encountered issues where Django is the bottleneck in the system. Usually the bottleneck is a poorly optimised database index or something, which Django handles fine to a point.

however, since I've ended up utilizing SQLalchemy and Pandas in a lot of my projects I have since tended to use Flask+SQLalchemy a lot more so my old fuzzy brain doesn't have to try and remember the variations between two different ORM syntaxes.

Post reply on HN