6. Polling, Long-Polling, WebSockets, Angular
What are the benefits of a component-based framework?
A component based framework is either Vue, Angular, React etc... Each of which build upon the idea of modularising a website into reusable components. PROS: - Speed - Fits right into mobile devices really easy as well. - Quite separate front-end and backend - Front-end caching options CONS: Slow loading Hard to make SEO Needs javascript
Why is Busy waiting a bad idea?
Busy waiting is basically a: while(true) { fetch("google.com")} Which is a complete waste of resources on both ends
What are websockets? And what is WS and WSS?
Communication protocol providing full-duplex over a single TCP connection. Also kinda evolve the server into a statefull server. Is initiated as a http request with upgrade header through the handshake. Difficult to scale horizontally, statefull (ws) websockets (wss) websockets secure
What is Long polling and when might it be used?
Long polling are comparable to long "get" request. Instead of returning a response immediately it will wait for the requested data to be ready or until the request would otherwise timeout.
What is polling and when might it be used?
Polling is like asking if the data has arrived at a set interval.
What is the difference between websockets and polling techniques?
Polling techniques are both initiated by client pull, where as websockets and SEE are initiated by a server push. Websockets is where the first bi-directional realtime communication kicks in. Both client and server may terminate connection at any time.
What is the difference between Angular, React and Vue in comparison to traditional web apps?
The main difference between component based frameworks is that they are SPA's Long initial loading times, but highly responsive afterwards. They live on a single url and are essentially one html page. They embrace the idea of seperation of concerns, through modularising a website into reusable components. This increase maintainability and code reuse. Between the frameworks, they differ in size and some are opinionated framework while others are not.