Hacker News new | ask | show | jobs
by exabrial 961 days ago
First thing, this is wicked cool.

I've never heard of LiveViews before, but honestly this is what I think we've been looking for... treat the browser just as a rendering engine, keep your codebase on the server.

I'm curious if the protocol could be implemented on Quarkus, or preferably Tomcat or TomEE... one thing we've come to love in recent years is CDI. It just make writing large applications very easy because they can all be broken down into simple parts and tested individually using Mockito. I could imagine all sorts of cool CDI extensions with this... an 'EventScoped' bean and CDI Events would fit right into the whole concept.

Can you explain a little more about what's happening? Watching the network inspector, it looks like the browser is relaying events back to the server over a websocket (as you said). After that, what's happening on the server side? Somehow it arrives at a diff command for the client. Curious what's happening to calculate the diff!

1 comments

You should check out JPro. It is a JavaFX-based technology where the JavaFX (desktop framework) is rendered in the browser using Web stack technologies. The entire state of the app is maintained server-side, even on a per-user basis. JFX Central is implemented like that:

https://www.jfx-central.com/

The code base is actually a desktop application written in JavaFX, where the browser just happens to be a "monitor screen" showing you the desktop app.

As for server-side state and server-side rendered UI, many other Java frameworks have implemented similar techniques, including but not limited to: JSF, Apache Wicket, Vaadin, etc.

I am not sure this project is truly innovating here, with things like:

    HTML."""
      <div>Hello</div>
    """;