The Reactive Server Pages (RSP) is a lightweight Java server-state web framework. RSP enables creation of real-time single-page applications and plain

vadimv / rsp

submited by
Style Pass
2021-06-21 07:00:07

The Reactive Server Pages (RSP) is a lightweight Java server-state web framework. RSP enables creation of real-time single-page applications and plain HTML webpages.

Use the RSP Java internal domain-specific language (DSL) for declarative definition of an HTML page markup. For example, re-write the HTML fragment below:

Another overloaded of() function takes a Supplier<S> as its argument and allows inserting code fragments with imperative logic.

An RSP web application can contain a mix of both types. For example, an admin part can be a single-page application page, and the client facing part made of plain pages.

The head() function creates an HTML head tag for an SPA type page. This type of header injects a script, which establishes a WebSocket connection between the browser's page and the server and enables reacting to the browser events.

The plainHead() renders the markup with the head tag without injecting of this script resulting in a plain detached HTML page.

Leave a Comment
Related Posts