Django-sockpuppet, an interesting alternative to React, Vue, Angular, or another abandoned Djang battery?

Good day to all!

In this article, I would like to very briefly, without details, talk about an interesting project that, being quite simple, greatly increases the capabilities of the Django framework. It seemed to me quite interesting.

Now the hype around modern javascript SPA frontend frameworks is especially hot, and in many ways this popularity is well deserved, these technologies allow you to successfully perform almost any task. The speed of SPA applications can be comparable to desktop applications, this is achieved by redirecting most of the responsibility from the server to the client. Unfortunately, this new approach gives rise to more and more complex technologies, and the work of a developer, which was once exciting and productive, has become much more complicated and monotonous. Are there alternatives to modern SPA frameworks? Is it possible to create full-fledged reactive user interfaces quickly, simply and only in django? Next, I want to draw your attention to an interesting project that can provide answers to these questions.

github: django-sockpuppet


This project makes it easy to get a fully reactive user interface, similar to what is done using SPA frameworks like React, Vue, Angular etc., only you will not have to use almost a single bit of javascript code, and your frontend, if I may say so, will consist of from django templates only.

Here are some examples to roughly show the simple capabilities of this project:

Here are live examples

In a nutshell, html rendering takes place on the server and the ready-made html code is sent to the client using websockets.

The main advantages of this approach are:

  • There is no need to create a separate frontend project.

  • Fully reactive user interface.

  • Fast speed of application development.

  • Vanilla django.

With some modifications, django-sockpuppet can be used in conjunction with wagtail, and any other django projects.

It’s worth noting that out of the box django-sockpuppet will only work with class-based views, so if you need to use function-based views, some manipulation is required.

Here is such a reactive django, thanks for reading, it would be very interesting to know your opinion.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *