Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daphne/channels update #24

Closed
nerdoc opened this issue Jun 11, 2021 · 9 comments
Closed

daphne/channels update #24

nerdoc opened this issue Jun 11, 2021 · 9 comments

Comments

@nerdoc
Copy link
Contributor

nerdoc commented Jun 11, 2021

Hi, just trying to setup reactor.
If I make a plain python project, and just do a pip install django-reactor as recommended, I get:

channels==2.4.0
daphne==2.5.0
Django==3.2.4
django-reactor==2.2.1b0
etc.

But, in your poetry.lock you have channels version = "3.0.3", and daphne = ">=3.0,<4".

How comes this?
(BTW, I didn't get the websockets part working yet... still struggling)

@nerdoc
Copy link
Contributor Author

nerdoc commented Jun 13, 2021

Just saw that daphne 3.0.3 etc is in reactor master, but in the version available on PyPi there is the outdated version 2.4.0. Is there a new release planned?

@edelvalle
Copy link
Owner

@nerdoc I have this project abandoned, sorry...

I'm more in favor of django-unicorn or my own weird stuff https://github.com/edelvalle/djhtmx

@nerdoc
Copy link
Contributor Author

nerdoc commented Jun 14, 2021

Oh, maybe you could mention that in the docs or archive it? Thanks anyway!

@nerdoc
Copy link
Contributor Author

nerdoc commented Jun 14, 2021

BTW and off-topic, unicorn uses Ajax instead of websockets. Isn't that much slower? And is only one-directional? With websockets/channels you can use push notifications - with ajax you need polling.

@jbjuin
Copy link
Collaborator

jbjuin commented Jun 24, 2021

@edelvalle Hi eddy, may i ask what are the reasons for you to stop reactor ?

@nerdoc
Copy link
Contributor Author

nerdoc commented Sep 4, 2021

I'll chime in again here... @edelvalle - did you abandon this project completely? In another comment you are saying you are using reactor in your own company. But https://iskra.ml is down... you sya you're using htmx/djhtmx...
For a long term project, what would you recommend to use ATM?
I've seen and tried many projects now. Sockpuppet, Django-Unicorn, htmx, and 5-10 other small abandoned projects. htmx is good, but not really integrated with Django. Your djhtmx makes things a lot better, but lacks docs, and completion...

So - on long term, on which horse would you bet?

@nerdoc
Copy link
Contributor Author

nerdoc commented Mar 4, 2022

This is solved with the current development version. Thanks for coming back to this fabulous project.

@nerdoc nerdoc closed this as completed Mar 4, 2022
@edelvalle
Copy link
Owner

Anyways let me answer you:

  • I'm no longer doing Iskra, another company
  • We are not using reactor there, we are using https://github.com/edelvalle/djhtmx (that is more like unicorn), but planning to use reactor at some point
  • I had a lot of stress at home lately because I had been alone with the kid and dog, because my wife is studying away from home and I had little time to maintain anything
  • Lately I had been working on this https://github.com/edelvalle/django-triplets

That's why you don't see to much development here but, the project is not dead, is just resting. And I will accept and review any PR anyone makes.

@nerdoc
Copy link
Contributor Author

nerdoc commented Mar 5, 2022

Yes, I know djhtmx, I have tested it too. And pure HTMX, and reactor, and django-unicorn, and django-sockpuppet, extensively. Every project has its advantages and downsides. I think that reactor has a great potential because it combines a few things:

  • websockets/channels (urgently needed, so you can send push notifications from the server,; faster than AJAX)
  • ease of use (like Unicorn)
  • litte bit more flexible than Unicorn (template names/places, etc), less "magic".
  • smaller footprint than Unicorn
  • encapsulation (I like the idea of components. HTMX is great, but tends to encourage unmaintainable spaghetti code in the long run)

What it lacks:

  • Documentation
  • Tests (I know you said you're testing it in production...)
  • Forms support. This is something I miss in Unicorn, see this issue and this, so that Form helpers like Crispy forms can be supported. This is mandatory for a bigger project with maybe dynamic nature of forms, and many forms.

I'm long-term planning for a huge, modular application, and can't find a component framework to rely on. React was my favourite, until you "abandoned" it. Therefore I'm glad you came back. I would prefer HTMX for long-term support - but maintainability of code is much more important than fearing to deal with spaghetti code soon.
So encapsulation is mandatory.

I'm no proffessional programmer (just a MD), but would add some thoughts (and maybe code) to React if I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants