Thursday, January 16, 2025
HomePythonThe State of Django 2024

The State of Django 2024


Internet Improvement

Are you curious to find the most recent tendencies in Django growth?

In collaboration with the Django Basis, PyCharm surveyed greater than 4,000 Django builders from across the globe and analyzed the tendencies in framework utilization based mostly on their solutions.

On this weblog publish, we share the next key findings with you:

  • Each third Django developer additionally makes use of Flask or FastAPI.
  • Most builders use Django for each full-stack and API growth.
  • 61% of Django builders use asynchronous applied sciences.
  • And plenty of extra insights!

Dive in to find out about these findings in additional element and uncover different tendencies in Django growth, whereas additionally benefiting from illustrative infographics.

Latest trends for Django in 2024

Backend: Each third Django developer additionally makes use of Flask or FastAPI

Other than Django, what web frameworks do you use?
Which web framework do you use the most?

Django stays the go-to framework for 74% of builders, although this does signify a minor dip from final 12 months when this determine stood at 83%. FastAPI has managed to keep up its reputation, as 25% of respondents reported utilizing it. In the meantime, Flask noticed a slight decline in reputation (29% in 2022 to 26% in 2023).

33% of net builders who work primarily with Django additionally use Flask or FastAPI, exhibiting numerous backend expertise.

Considering that almost all of totally employed builders (49%) report engaged on a number of tasks on the similar time, this will point out that they select totally different instruments for various functions:

  • Django – for bigger, extra advanced net apps as a result of its “batteries included” method.
  • Flask – for easier functions (particularly static websites) or microservices.
  • FastAPI – to create API endpoints, particularly in case your software consists of quite a lot of IO calls (particularly for real-time net functions).

The truth that solely 11% of all Django builders use all three frameworks would possibly imply that the majority of them use Flask and FastAPI for related functions, shifting to FastAPI as a result of its async capabilities.

Wish to learn the way Django is totally different from Flask and FastAPI? Try our detailed comparisons between Django and Flask, and Django and FastAPI to see which framework will greatest fit your wants.

Growing APIs: Most builders use Django for each full-stack and API growth

What do you use Django for (full-stack or REST API)?

This 12 months’s survey revealed Django is well-liked for each full-stack (74%) and API growth (60%), with a pattern in the direction of API work amongst totally employed devs. Absolutely employed builders are extra possible to make use of Django for REST API growth (65% vs. 60% on common), however much less possible to make use of it for full-stack growth (68% vs. 74% on common).

With the rising reputation of htmx, the pattern would possibly change in favor of utilizing Django extra for full-stack growth. 

Apparently, whereas DRF has retained the pole place amongst third-party packages, its reputation dipped as Django Ninja, recognized for its velocity and typing capabilities, continues to realize floor. Django Ninja gives excessive efficiency and asynchronous capabilities, just like one other very fashionable alternative for creating APIs, FastAPI, however inside the Django ecosystem, which makes the educational curve shorter.

Work with APIs? Learn this tutorial to discover ways to construct APIs with the Django REST framework.

Async: 61% of Django builders use async

Which async technologies do you use?

There’s a transparent transition in the direction of utilizing asynchronous applied sciences amongst Django builders, with 61% now incorporating async of their tasks (up from 53% final 12 months).

FastAPI, which was constructed with async programming in thoughts, is now utilized by 21% of all Django builders who use async applied sciences. Django async views are additionally being utilized by extra respondents (14%), although FastAPI continues to be extra well-liked for async duties. With extra async help deliberate for upcoming Django 5 releases, the curiosity in utilizing async in Django would possibly enhance much more.

Frontend: a shift in Django builders’ preferences in the direction of htmx, Alpine.js, and Tailwind CSS

What other programming languages do you use in addition to Python?

On the subject of frontend, JavaScript continues to be the most well-liked language, with 68% of builders stating that they use it. That mentioned, it’s steadily conceding its comfy lead (75% in 2021 and 2022) to TypeScript, which has grown considerably from 19% in 2021 to twenty-eight% in 2023. ​​This enhance in reputation might be attributable to its static typing options, which assist catch errors early within the growth course of and thus make code extra strong and maintainable.

What JavaScript frameworks do you use?

Skilled Django builders nonetheless clearly favor JavaScript frameworks over their rivals, with utilization charges of 26% for Vue, 35% for jQuery, and 42% for React, although their general use is declining 12 months over 12 months.

Newer frameworks like htmx (which grew from 16% in 2022 to 23% in 2023) and Alpine.js (which grew from 6% to 10%) are quickly gaining traction, suggesting a shift in the direction of less complicated instruments for contemporary consumer interfaces. There’s a devoted django-htmx package deal developed by Adam Johnson.

Dennis Ivy on htmx:

“Glad to see HTMX right here. I’m not the largest fan (I default to React) however I believe it’s appropriate for a lot of Django tasks that want a little bit flexibility with out having to maneuver to a full fledged JS framework/library.”

What CSS frameworks do you use?

We proceed to see a downward pattern for Bootstrap and vital development for Tailwind CSS, whose reputation has doubled within the final two years. The growing desire for Tailwind CSS over Bootstrap suggests a want for extra customizable and fewer prescriptive approaches to styling in net tasks. Learn this text from package deal creator Tim Kamanin for a guided introduction to utilizing Tailwind CSS in Django

Dennis Ivy on TailwindCSS:

“Like to see the rise of Tailwind-Django utilization. Hope to see extra native integration and academic content material on this space.”

Databases: 75% of Django builders favor PostgreSQL, and 50% depend on Redis for caching

What database backend do you use?

Within the Django ecosystem, PostgreSQL leads the pack as the first database alternative (76%) amongst builders, highlighting the desire for strong, SQL-based methods for net functions. The curiosity in NoSQL databases like MariaDB (10%) and MongoDB (8%) can be notable, reflecting a diversifying database panorama.

The inclusion of the schema-less and scalable MongoDB among the many prime database decisions, regardless of its lack of official Django help, displays builders’ willingness to combine extra versatile, document-oriented databases.

Do you’re employed with MongoDB? Learn this step-by-step information on join Django with MongoDB.

Dennis Ivy on MongoDB:

“This quantity surprises me contemplating the totally different method Mongo takes and the incompatibility with Django. Curious to know the expertise degree of these 8%. I might suspect that these are newer devs and / or devs working experimental tasks. 

After talking to a number of MongoDB crew members I used to be in a position to conclude my ideas on this integration in an article.”

What cache backend do you use?

On the caching entrance, Redis stays the go-to answer (54%) for enhancing net app responsiveness, with Memcached (20%) additionally gaining traction.

Orchestration: Greater than 50% of Django builders use container orchestration 

What container orchestration services do you use in production?

Among the many favored companies, Amazon ECS/Fargate (19%) leads by advantage of its ease of use and integration with AWS, making it a pure alternative for builders within the AWS ecosystem. 

Self-managed Kubernetes (14%) appeals to these looking for flexibility and management over their infrastructure, in addition to the flexibility to simply migrate and share between personal and public clouds. The recognition of Amazon EKS (12%) and Docker Swarm (12%) is perhaps attributable to the steadiness they provide between manageability and scalability, catering to numerous deployment wants.

Take care of Kubernetes infrastructure? Learn this information on deploy Django apps in Kubernetes.

CI methods: GitHub Actions is main the business

What continuous integration systems do you use?

GitHub Actions’ development (45% in 2023 in comparison with 35% in 2021) within the CI area highlights its comfort for builders who already use GitHub for supply code administration. Its simplicity, leveraging simple YAML recordsdata for pipeline administration, makes it an accessible and environment friendly instrument for automating software program workflows immediately inside GitHub’s ecosystem. Furthermore, it gives the pliability of utilizing customized {hardware} configurations that meet your wants with sufficient processing energy or reminiscence to run bigger jobs.

IaC: Infrastructure as code is utilized by 39% of Django builders

What Infrastructure-as-Code tools do you use?

Using infrastructure as code options by 39% of respondents underscores a rising pattern in the direction of automation and infrastructure administration by code. For bigger tasks, IaC can guarantee extra dependable, repeatable, and scalable infrastructure setups. Terraform is probably the most generally used infrastructure as code provisioning engine, with 20% of all respondents preferring it over the opposite choices.

Apparently, an open-source answer, Pulumi, was chosen by 5% of the respondents. The rationale for this may very well be the truth that, proper from its inception, Pulumi has supplied the pliability to make use of any programming language for managing infrastructure. This makes Pulumi broadly accessible to builders and DevOps engineers from any background. Terraform started providing the same possibility by way of a CDK in 2022.

Insights based mostly on Django builders’ jobs and expertise

Django studying sources

Which of the following do you use to follow Django development?
Which of the following do you prefer to use to learn Django?

Absolutely employed builders watch much less YouTube to be taught Django (32% vs. 39% on common) and use fewer AI instruments for this objective (22% vs. 25% on common).

Amongst crew leads, the Django Information publication, HackerNews, Reddit, and even X (previously Twitter) are extra well-liked strategies of staying updated with Django developments. They even report studying extra usually from their pals (16% vs. 11% on common). 

Junior professionals use YouTube and StackOverflow rather more usually for each instructional functions and to maintain abreast of developments within the Django ecosystem. On the subject of their most well-liked studying technique, they have a tendency to make use of new AI instruments extra usually than their senior colleagues (38% vs. 25% on common).

Miscellaneous

  • Absolutely employed Django builders are extra possible to make use of Django just for work (23% vs. 17% on common). 
  • The core part that crew leads and totally employed builders as a gaggle favor most is the opportunity of migration, with their much less most well-liked elements together with authentication, templates, and even class-based views.
  • As their most important editor, crew leads are inclined to desire PyCharm (31% vs. 29% on common) and Vim (12% vs. 7% on common) to VS Code (31% vs. 29% on common).

Begin creating Django apps with PyCharm

Do you’re employed with Django? PyCharm is the best-in-class IDE for Django. Code quicker with Django-specific code insights, code completion, and highlighting. Navigate throughout your venture simply. Hook up with your database in a single click on, and work on TypeScript, JavaScript, and different frontend frameworks. PyCharm additionally helps Flask and FastAPI out of the field.

Strive PyCharm at no cost

Survey demographics

After filtering out duplicate and unreliable responses, the information set consists of round 4,000 responses collected between September and October 2023.

Regional distribution

Which region are you based in?

44% of respondents are based mostly in Europe, 19% in North America, and 17% in Asia.

Age distribution

Could you tell us your age range?

Many of the respondents are within the 21–49 age vary. 38% of all respondents are aged 31–39, whereas 30% are aged 21–29.

Skilled coding expertise

How many full years of professional coding experience do you have?

The vast majority of respondents have been coding professionally for 11+ years. 24% of the survey members have 3–5 years {of professional} coding expertise, and 19% have labored as skilled builders for six–10 years. Those that have been creating professionally for lower than two years signify one other 25% of the survey respondents.

Job roles

What is your job role?

79% of respondents acknowledged that their job roles embrace growth/programming or software program engineering. 16% of respondents are crew leads. 10% of the respondents acknowledged that their job consists of information evaluation, information engineering, or information science. 

The info set consists of responses solely from official Django Software program Basis channels. The responses have been collected by the promotion of the survey on official Django channels, akin to djangoproject.com and the DSF’s X (previously Twitter) account, with out the involvement of any JetBrains channels. With a view to forestall the survey from being slanted in favor of any particular instrument or know-how, no product-, service-, or vendor-related channels have been used to gather responses.

Wish to be taught extra? Discover the Django Builders Survey 2023 to see the complete survey information.

image description



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments