Open oTree-org opened 5 years ago
I also think the introductory section from Consumers (https://channels.readthedocs.io/en/latest/topics/consumers.html) could be reduced:
While Channels is built around a basic low-level spec called ASGI, it’s more designed for interoperability than for writing complex applications in.
what is "it"? Channels or ASGI?
So, Channels provides you with Consumers, a rich abstraction that allows you to make ASGI applications easily.
I think this can be safely deleted.
Consumers do a couple of things in particular:
- Structures your code as a series of functions to be called whenever an event happens, rather than making you write an event loop.
I think this is obvious and can be deleted.
- Allow you to write synchronous or async code and deals with handoffs and threading for you.
Is this necessary to say? The next section immediately introduces AsyncConsumer and SyncConsumer.
Of course, you are free to ignore consumers and use the other parts of Channels - like routing, session handling and authentication - with any ASGI app, but they’re generally the best way to write your application code.
This seems like something most people won't do, so I think that sentence is not necessary in the intro.
Hi @oTree-org. Thanks for the feedback. I guess the best way forward is individual PRs suggesting changes. I'll leave this open for now to have a read over a few times but it's a bit too big as it stands (if that makes sense).
I am upgrading an old project to channels to 2.x. I found the channels 0.x/1.x documentation very well written and easy to grasp. In contrast, I am having a harder time diving into the 2.x documentation.
First, the intro sections are repetitive. It's a lot of extra text to navigate. For example, these excerpts are all taken from the home page & introduction page:
More examples of repetition:
I also feel the documentation puts too much up-front emphasis on the flexibility of the system, or talking about how it was built, and in doing so, misses an opportunity to start people off with the basics. For example, the "turtles all the way down" section: https://channels.readthedocs.io/en/latest/introduction.html#turtles-all-the-way-down. This is the second section in the intro, so at this point I don't know what the "turtles" are. It's too early to have an "aha" moment.
Another example, the top of the "Routing" page.
I think for newcomers this paragraph is too complex and keyword-heavy, especially since it's talking about something you don't want to do ;) I think the Channels 1.x version was much easier to understand: https://channels.readthedocs.io/en/1.x/routing.html. And the next sentences:
I think that can be safely boiled down to this (the rest of the content is already stated elsewhere on the page):