PushMode - HTML streaming for Java
This core streaming capability is then combined with Hookless reactive programming to provide a highly productive platform for development of low-cost and yet fully interactive, high-quality web apps.
Good library is not so much about the features you can use but rather about the headaches you can forget. Here's a short list of common app development problems that are obsoleted by PushMode.
- No refresh button: PushMode implements video-like frame-by-frame HTML streaming. Everything, including database access, is reactive.
- No submit button: Pages are fully interactive. Applications can listen on HTML events and data bind to user-modifiable attributes.
- No SEO woes: PushMode serves fully rendered HTML pages and then adds interactivity on top of that. URLs are SEO-friendly (no fragment IDs). Applications have full control over HTML content.
- No vulnerabilities: There's no application-specific client-server API to secure. HTML is automatically escaped. Only visible HTML is sent to the client. Phantom interactions are rejected.
- No networking: There's no REST API to develop and maintain. PushMode creates an illusion of latency-free mirror browser on the server. Database is a call away.
- No code budget: Server-side code has no practical limit on the number and size of libraries.
- No performance budget: Applications can use unlimited compute power of the cloud. Code is optimized by JVM before the page is even requested.
- No browser-specific bugs: Applications are coded against single server-side API. Only limited range of browser features is used. Browser add-ons have limited scope for interference. Monitoring and profiling of server-side code is straightforward.
- No boilerplate: Code is no more complicated than equivalent PHP template. Reactivity is completely seamless. Data binding replaces many events. Event handlers just update data structures or database, relying on reactivity to update HTML output. PushMode API is fluent, exception-free, and null-safe.
Get PushMode from Maven Central:
<dependency> <groupId>com.machinezoo.pushmode</groupId> <artifactId>pushmode</artifactId> <version>0.7.5</version> </dependency>
Or clone sources from GitHub or Bitbucket. Don't forget to configure your build for Java 8+. Sources and binaries are distributed under Apache License 2.0.
PushMode is still in development. Important APIs may change without warning.
Classes that are not even mentioned in the table are all experimental.
PushMode is being developed by Robert Važan. If you have any suggestions, including requests for documentation, report an issue (GitHub, Bitbucket) or submit a pull request (GitHub, Bitbucket). You can reach the author via email .