Pages

Monday, March 12, 2018

Daily notes

Learning Spring

I'm following the "Spring 5.0 Project: Building a Travel Website" video course from Pack Publishing.
Today, I've learned some new things from the example used in that course:

STOMP

The example from the chapter related with programming web-sockets uses the so called STOMP protocol.
A quite similar example can be found on the Spring Framework website at https://spring.io/guides/gs/messaging-stomp-websocket/

It is the first time when I hear about STOMP, of course is also the first time programming with web sockets.
So, what's STOMP?

STOMP - Simple (or Streaming) Text Oriented Messaging Protocol

The purpose of this protocol is to "provide an interoperable wire format so that STOMP clients can communicate with any STOMP message broker to provide easy and widespread messaging interoperability among many languages, platforms and brokers".

The specification of the latest version of the STOMP protocol can be found at https://stomp.github.io

There is also a very short article about STOMP on Wikipedia


WebJars


Another quite cool thing I've learned is that one can use the so called webjars for specifying the client-side (javascript) dependencies. WebJars are client-side dependencies packaged as jar archive files.
The available javascript libraries can be found at WebJars home: http://www.webjars.org/.
For example of usage, see the following tutorial http://www.baeldung.com/maven-webjars.


Socksjs-client


https://github.com/sockjs/sockjs-client
A javascript library that provides "a coherent. cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server"

No comments: