From the course: Java EE 8: JavaServer Faces JSF 2.3

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

WebSockets

WebSockets

From the course: Java EE 8: JavaServer Faces JSF 2.3

Start my 1-month free trial

WebSockets

- [Instructor] WebSockets are another way for the server side of your JSF code to communicate with the browser without involving client-side code that much. So the same use cases like chat, application, stock quotes, really anything that involves the server pushing data to the client side without the client having to pull or beg for the data. Begging for the data is really inefficient. So, for example, this here is your Traditional JSF Page Interaction, again, JSF Page sends data to their site and the server returns the response. Here's what the WebSockets interaction looks like. It's a constant back and forth between the server side and the webpage. The webpage shoots a request across, server side responds and back and forth and on and on it goes. Now a difference between SSE and WebSockets is browser support. SSE will work with more older browsers than WebSockets. Another thing is that SSE is designed mostly for…

Contents