This is confusing
See original GitHub issueHi,
Sorry to bother you, but I wanted to give you some feedback. As a noob, the whole tutorial feels rather contrived and far from trivial. Here are a few suggestions how it could be made more “friendlier”.
First, emphasize that it’s not raw websockets, but “STOMP” over websockets. Most of us never heard of STOMP. At least a brief introduction of how STOMP works should be provided …and it would be nice to now if raw websockets are possible.
Secondly, the whole is written upside down. You first write controllers, topic subscriptions, message brokers, endpoints, application destination prefix (do we really need that one?!) without really understanding why, and it’s just confusing.
Here as well, an introduction should first be provided. An overview about the flow and the pupose of each “thing”, before diving into the code. Ideally with a nice picture, to help understand how it all fits together.
Lastly, the HTML / js example is bloated, the only thing you need would be something like:
<body>
<button id="connect" onclick="connect()">Connect</button>
<button id="disconnect" onclick="disconnect()" disabled>Disconnect</button>
<hr/>
What is your name? <input id="name" /><button onclick="sendName()">Send</button>
<hr/>
<pre id="greetings"></pre>
</body>
Best Regards
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
Lastly, despite it’s complexity, it leaves big question marks on how to do simple things because of the STOMP abstraction. How whould you:
Using something like raw websockets feels much more trivial:
…I just wonder if it’s well compatible with the rest of spring.
I added a sentence.