Live data from Hacker News

Django 4.0 release candidate 1 released

djangoproject.com

71–80 of 126 posts

Re: Django 4.0 release candidate 1 released

#71

Earlier quoted context omitted.

Django templates are the worst. Django is great. Just don't use its templates or form systems. Indeed react is a great replacement for both.

I disagree. The way you can extend sections of other templates without creating an inheritance chain works very well (and I missed in template systems, for Java, for example)

Have you tried https://pebbletemplates.io/ for Java?

I haven't used it extensively, so I can't speak how it compares to Django in larger setups.

Re: Django 4.0 release candidate 1 released

#72
post #7

There are cooler frameworks, there are more minimal frameworks, there are more "modern" frameworks. Whatever that means. Yes I would like to work with FastAPI, it is great. But... Django gets the shit done. There are plenty of developers to find for it. Lots of good quality plugins. Every problem you have, infrastructure wise, is often already solved and there is a blog post of it. Its good parts and its bad parts ar…

Agreed. Although I usually hate marketing taglines, I think Django quite realizes its tagline of "The web framework for perfectionists with deadlines."

Re: Django 4.0 release candidate 1 released

#73
post #7

There are cooler frameworks, there are more minimal frameworks, there are more "modern" frameworks. Whatever that means. Yes I would like to work with FastAPI, it is great. But... Django gets the shit done. There are plenty of developers to find for it. Lots of good quality plugins. Every problem you have, infrastructure wise, is often already solved and there is a blog post of it. Its good parts and its bad parts ar…

It's also quite easy to swap out the templating engine for whatever front end framework that you'd like to use. Django provides tons of value even when used solely as an API server and ORM.

Re: Django 4.0 release candidate 1 released

#74
post #30

Earlier quoted context omitted.

You could use Django just for the backend and have your frontend code be written in React+Typescript, no?

But that means throwing out a large part of Django and writing lots of "interconnect" code. At that point I think it's better to choose a different backend, one that will generate typed Typescript client code (or use Typescript on the server and some clever metaprogramming).

You can also just generate an Open API spec and use something like openapi-generators to produce typed client code for data fetching (https://github.com/OpenAPITools/openapi-generator)

Re: Django 4.0 release candidate 1 released

#75

Django is good for those who have used it a lot. For beginners, there are much better alternatives and, frankly, Django way of development is severely restricting. Starting off with an API backend and a React/Angular/Vue front end, allows new developers to learn better abstractions (and not merge front ends and back-ends) The very idea of "sending UI code to the front end for every request" is unsuitable for medium t…

What medium to large projects do your speak of? Somehow, Basecamp, Instagaram, Facebook made it to so many users without using any front end framework? Starting of beginners with MVC /MVVM model is not any different than Server API, If you stick to its rules.

Re: Django 4.0 release candidate 1 released

#76
post #73
post #7

There are cooler frameworks, there are more minimal frameworks, there are more "modern" frameworks. Whatever that means. Yes I would like to work with FastAPI, it is great. But... Django gets the shit done. There are plenty of developers to find for it. Lots of good quality plugins. Every problem you have, infrastructure wise, is often already solved and there is a blog post of it. Its good parts and its bad parts ar…

It's also quite easy to swap out the templating engine for whatever front end framework that you'd like to use. Django provides tons of value even when used solely as an API server and ORM.

And the admin framework is great for accelerating development, making it really easy to create test data as you build out your API.

Re: Django 4.0 release candidate 1 released

#77

Earlier quoted context omitted.

While I have no experience with Django, this could exactly be said about Rails. It's great these two exist and are being worked on for so long and have this level of maturity.

yes, they are very similar. I'm not sure if Rails has quite the level of auto-generating admin system, though.

There's ActiveAdmin which basically that.

Re: Django 4.0 release candidate 1 released

#78

Earlier quoted context omitted.

The ORM is great ... but is a question of taste/previous experiences. Once you start playing with annotations, DB-side functions and subqueries, it is very nice. Only frustration I have is the power/possibilities of mysql (which I use 99% of the time for various reasons) versus postgre. The latter seems far better and advanced, and it does reflect in the ORM. But wait, this isn't linked to django, is it? :-)

I agree. I can generally do what I need to with the ORM, except in extreme cases where you probably should be writing custom SQL anyway. I do fight with Subquery and OuterRef now and then, thinking OuterRef isn't being used in a Subquery when it is, but a little debugging usually resolves that. The one thing I really wish Django had after all these years is multi-column PK support. I bring it up every time I see a th…

care to elaborate on that "multi-column PK support" please? :)

Re: Django 4.0 release candidate 1 released

#79
post #55

Earlier quoted context omitted.

You're absolutely right in the sense that the Django and other communities should not stagnate and should also keep an eye on what the other frameworks are up to. Maybe the default template engine should be replaced in Django?

Template engines are already configurable and pluggable for quite a while. The "problem" is that most of the third-party apps that want to provide templates end up using the default, so either you have to reimplement those or stick with the default engine.

You can use both the Django Template Engine and other template engines side-by side in the same project. You can then write your custom templates in whatever you want, and have your third-party apps use whatever template engine they want to.

Re: Django 4.0 release candidate 1 released

#80

Django is good for those who have used it a lot. For beginners, there are much better alternatives and, frankly, Django way of development is severely restricting. Starting off with an API backend and a React/Angular/Vue front end, allows new developers to learn better abstractions (and not merge front ends and back-ends) The very idea of "sending UI code to the front end for every request" is unsuitable for medium t…

"sending UI code to the front end for every request" makes more sense to some than ending up with client-side generated bloat of severe cases of divitis and/or custom tags nested ad infinitum. :-)

Again, question of taste :)

Post reply on HN