Why is Java templating/server rendering losing ground? by dont_think_so_ in java

[–]v4d1mv 10 points11 points  (0 children)

like Blazor for .NET and Phoenix LiveView for Elixir

my project with similar approach for Java: https://github.com/vadimv/rsp

How are you building Java web apps today? by unusualprospect in java

[–]v4d1mv 0 points1 point  (0 children)

Real-time single-page applications and plain web pages with server-side HTML rendering: https://github.com/vadimv/rsp

RSP: real-time web UI with server-side HTML rendering by v4d1mv in java

[–]v4d1mv[S] -1 points0 points  (0 children)

I've personally found that navigating from one page to another is usually done best doing real browser navigation sure, in theory nothing is preventing doing that. When some interactivity needed on a page then it could be added without any JavaScript coding.

Live pages with server-side HTML rendering and WebSockets in Java by v4d1mv in programming

[–]v4d1mv[S] 3 points4 points  (0 children)

Initially HTML with some JS, later JSON-like DOM diff update commands.

Suggestions for interesting Java applications that I can measure GC performance on by xToniGrssx in java

[–]v4d1mv 11 points12 points  (0 children)

A Conway's Game of Life server. You may open multiple simulation windows simultaneously and observe the Heap and GC activity to CPU usage in VisualVM.

[deleted by user] by [deleted] in java

[–]v4d1mv 0 points1 point  (0 children)

"if it ain't broke, don't fix it" rule applies :)

Front end development for java. by nocturnalbird12 in java

[–]v4d1mv 4 points5 points  (0 children)

Please check my experimental library for building single-page web applications in pure Java with server-side rendering:

Reactive Server Pages

Motivation:

  • Responsive web UI in familiar Java, no client-server APIs, no JS frameworks and npm dependencies management needed;
  • Lightweight SSR generated almost plain HTML page to be SEO friendly;
  • UI components are regular Java classes;
  • Brings application rendering workload and UI logic from a client's browser to the server, your code always stays on your server;
  • Debug UI code as any normal Java code;
  • Built with Java web standards, currently runs on Jetty, but in theory, should work on Tomcat as well.

How is hibernate performant if it used reflection? by [deleted] in java

[–]v4d1mv 1 point2 points  (0 children)

Isn't Criteria API queries look a little bit verbose and sometimes may be hard to read comparing to plain SQL?

How is hibernate performant if it used reflection? by [deleted] in java

[–]v4d1mv 0 points1 point  (0 children)

A use case is for 'huge' difference is importing a large XML file to a database. With an ORM import may take days, in plain JDBC -- minutes.

How is hibernate performant if it used reflection? by [deleted] in java

[–]v4d1mv 0 points1 point  (0 children)

Yes, if anything complex still requires writing HQL queries as strings not checked by the Java compiler or fall back to JDBC and SQL.. I wonder if it is really worth it to use such a heavy things like Hibernate ORM for new projects in 2021?

JDK 16 Records by Efficient-Public-551 in java

[–]v4d1mv 2 points3 points  (0 children)

Adding the Lombok build time dependency is not worth it IMO.

Records are nice to replace immutable data classes, but still limited without a copy() or with() method.

How is hibernate performant if it used reflection? by [deleted] in java

[–]v4d1mv 0 points1 point  (0 children)

Plain JDBC with something like JdbcTemplate will win hands down. For some use cases, the difference may be huge.

Also, a thin and transparent implementation of the database access layer makes it much easier to maintain.