I am redesigning a web application that was previously passed to the server side into a single page application and started reading about web folders. The web application will use sockets to have new entries and / or messages sent to the client. I was wondering why most of the pages that use sockets do not handle all of their connections through a socket. In most cases, in addition to the web schedule, there is a RESTful backend. Would it be a bad idea to have a client request for new resources over a socket? If so, why, besides this, can a RESTful api be easier to use with other devices?
I can imagine that using web interfaces would probably not be the best idea if the network connection is poor, as on mobile devices, but this should probably work well with a reasonable network connection.
I found this sibling question, however this is from 2011 and seems a bit dated: websocket api to replace rest api?
websocket single-page-application
Steve hummingbird
source share