Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Web UI moved from JSP and server rendering to single-page apps, and now back toward server-driven approaches (htmx, Thymeleaf fragments, Vaadin, server components in JavaScript frameworks). How would you set the long-term UI technology strategy for a Java-heavy company?

The swings between server rendering and SPAs are not fashion; each side trades simplicity against interaction. So I would set the strategy by product type rather than by trend: server-driven UI (Thymeleaf with htmx, or Vaadin) as the default for internal tools built by Java teams, one supported front-end framework for customer-facing products with heavy interaction, business logic always behind service APIs so the UI can change, a deliberately small set of supported stacks, and a review every few years based on delivery speed, defects, hiring and accessibility.

Why this question is asked

Every few years, someone in a Java company asks whether the new UI approach should become the standard. Ten years ago it was SPAs; now it is htmx, server components and Vaadin again. A technology leader has to answer without either chasing every trend or freezing the company on an old stack. Interviewers ask this to see whether we can reason from trade-offs and evidence. In this answer, we will look at why the pendulum swings, set a default per product type, decide how many stacks to support, protect the business logic from UI churn, and define how and when to review the choice.

1Why the Pendulum Swings

Server rendering means the server builds the HTML for each request. It is simple: one codebase, one deployment, fast first paint, good for search engines, and the security model is the familiar one of sessions and forms. Its weakness is interaction. Every change of state means a request and a new page, unless we add JavaScript by hand.

Single-page apps moved rendering into the browser. They gave rich interaction, offline-ish behaviour and a clean JSON API that mobile apps could reuse. But they also brought two codebases, a front-end build chain, client-side state management, API versioning, larger bundles to download and new security work around tokens and CORS. For many applications, that cost was higher than the benefit.

The current server-driven approaches try to keep the simplicity of the server and add just enough interaction. htmx swaps HTML fragments returned by the server, Thymeleaf fragments provide them, Vaadin keeps components on the server, and JavaScript frameworks render components on the server too. None of them removes the trade-off; they move the line.

2Choose by Product Type

Instead of one answer for the whole company, I would set a default per type of product, and let teams deviate with a short written reason.

Default UI approach by product type
Product typeDefaultWhy
Internal tools, back officeThymeleaf + htmx, or VaadinJava teams ship it end to end; little JavaScript
Customer apps with rich interactionOne front-end framework, JSON APIInteraction, mobile reuse, front-end specialists
Content and public pagesServer rendering with cachingFast first paint, search engines, low cost
Anything elseTeam proposes, architecture reviewExceptions are allowed with a reason

Internal tools and back-office apps are mostly forms, lists and workflows, used by a known group of people on desktop browsers. For these, server-driven UI built by the same Java team that writes the backend is usually the fastest and cheapest path. Thymeleaf with htmx covers most screens; Vaadin fits teams that want rich grids without JavaScript and accept session state. Customer-facing products with heavy interaction, offline needs or a shared mobile API are different; there a front-end framework and a dedicated front-end team pay for themselves. Content and marketing pages are a third case, where server rendering and caching matter most.

3Keep the Number of Stacks Small

Every additional UI stack is a long-term cost that is easy to underestimate. Each one needs security patching of its dependencies, a version of the design system and component library, accessibility testing, build tooling, and people who know it well enough to review code. With six stacks, we end up with six half-maintained design systems and teams that cannot move between products.

So I would support a small set, for example two or three: one server-driven option, one front-end framework, and perhaps Vaadin for teams already using it. A platform team owns starters, templates and the design system for each supported stack. Teams may experiment, but anything that goes to production on an unsupported stack needs an explicit decision about who will maintain it.

4Protect the Business Logic From UI Churn

The UI layer is the part most likely to change in the next ten years. Business rules, such as how an order is priced or who can approve a refund, should not change when the UI does. So the most important architectural rule is that business logic lives in application services behind clear interfaces, never in controllers, templates or front-end code.

With that rule, a Thymeleaf controller, a JSON API for an SPA and a Vaadin view are all thin adapters over the same services. Moving one product from server rendering to a front-end framework, or back, then means rewriting an adapter, not the business. This is also what makes the strategy reversible, which lowers the stakes of every decision.

Step throughThin UI adapters over shared services
  1. Thymeleaf and htmx viewsServer-rendered internal screens
  2. JSON API for the front-end frameworkCustomer-facing app
  3. Vaadin viewsRich internal tools
  4. Application servicesBusiness rules, transactions, permissions
  5. Domain and persistenceEntities, repositories, integrations

5 layers, from the top down. Step through them one at a time.

Only the top three layers change when UI fashion changes.

5Review With Evidence, Not Trends

Finally, the strategy needs a review date, every two or three years, or earlier if something big changes. The review should use evidence we collect anyway: lead time from idea to production per stack, defect and incident rates, how hard it is to hire for each stack, accessibility audit results, and page performance numbers such as time to first paint. If a server-driven internal tool ships features in half the time of an SPA equivalent with fewer defects, that is a stronger argument than any conference talk.

Reviews should also check the cost side: how many apps remain on retired stacks, and how much effort patching takes. A strategy that is reviewed with numbers can change without drama, because everyone can see why.

6Follow-up questions

Is htmx mature enough for a company standard?

For internal tools, it is a small library that adds a few HTML attributes to request and swap server-rendered fragments, so the risk is low and easy to reverse. The real dependency is still Thymeleaf and Spring MVC. I would pilot it on two or three internal apps, measure delivery speed and defects, and adopt it as part of the server-driven default if the results hold.

What if a strong team wants a different front-end framework?

Ask what problem the supported option fails to solve. If there is a real gap, consider it in the next review, or allow a time-boxed exception with a named owner. Without a gap, the long-term cost of another stack usually outweighs one team's preference.

7Conclusion

In this answer, we saw that the swings between server rendering and SPAs follow real trade-offs between simplicity and interaction. A good strategy for a Java-heavy company chooses by product type, with server-driven UI as the default for internal tools and one front-end framework for rich customer apps, keeps the number of supported stacks small, protects business logic behind services so UI choices stay reversible, and reviews the choice every few years with evidence on delivery speed, defects, hiring and accessibility.

What to say in the interviewAbout 80 seconds aloud

Open with

I'd start by saying the swings aren't just fashion. Server rendering is simple, fast to first paint and fits Java teams; SPAs gave rich interaction and reusable APIs but added a second codebase, a build chain and client-side complexity.

Then, if they want more

The new server-driven tools like htmx, Thymeleaf fragments and Vaadin try to keep the simplicity and add some interaction. So rather than one answer for the company, I'd set defaults by product type. For internal tools and back-office apps, server-driven UI built by the Java team, Thymeleaf with htmx, or Vaadin where teams want rich grids.

For customer-facing products with heavy interaction or a shared mobile API, one supported front-end framework with dedicated front-end people. Teams can deviate with a written reason. I'd keep the supported set small, two or three stacks, because each one needs patching, a design system, accessibility work and reviewers.

The most important rule is architectural: business logic stays in application services behind clear APIs, so every UI is a thin adapter and changing it later is affordable. And I'd review the strategy every two or three years using our own evidence, lead time, defects, hiring and accessibility results, rather than whatever is trending that year.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Web UI moved from JSP and server rendering to single-page apps, and now back toward...": https://scrivio-interview-library.netlify.app/spring-boot/mvc-architecture/e9d722ec88/