As web pages aim to be (and are expected to be) more and more interactive, client-side events pose important challenges for web development. There are many ways users can interact with page components. They can hover, click, double click, drag & drop and much more. During development, developers need to specify for each element how the user might interact with them. When a browser event occurs, it needs to be captured and handled by the server. The server in turn needs to decide with which component the user interacted with and how, and what the appropriate course of action might be. Then the server reaches out to the database, performs the appropriate CRUD operations, and finally tells the browser to visualize the changes triggered by the event.
Event management is a complex process that demands considerable time and planning from developers as there are a host of client-side events and each require its own process to be coded from the client to the server and back. A framework can save developers a lot of time by making it easier to capture, handle and respond to browser events. With JBStrap, you can add event handlers very easily to each component. And that’s it, the framework takes it from there: it listens to DOM events, captures them, handles them and visualizes the changes on the client side.
Take a look at this code snippet to see how easily it works: