Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Server-side rendering with templates fell out of favour for single-page apps and is now returning in some forms. How would you decide the long-term front-end architecture for products built on Spring, and what role should Spring MVC views play?

I would choose the front-end architecture per product from its real needs: search visibility, first-load speed, how interactive the screens are, and what the team can build and run. Server-rendered Spring MVC views remain the simplest choice for internal tools and content pages, and can be combined with small client-side parts in a hybrid; single-page apps pay off for highly interactive products but add a separate build, deployment and API contract. Whatever we choose, we should choose deliberately and keep it for years, because front-end migrations are expensive.

Why this question is asked

Front-end fashions move in cycles. Server-rendered pages gave way to single-page apps, and now server rendering is returning, both in JavaScript frameworks that render on the server and in approaches that send HTML fragments from the backend. A Spring-based organisation feels this as pressure to rewrite. Interviewers ask this at the most senior level to see whether we can decide on architecture from product needs rather than trends. In this answer, we will look at what each approach really costs, the questions that decide between them, where Spring MVC views fit today, and how to make a decision that survives the next cycle.

1What the Cycle Was Really About

Single-page apps became popular because they made rich, app-like interactions possible: instant feedback, offline behaviour, complex client state. The cost was moving a lot of work to the browser: large JavaScript bundles, a separate build and deployment, an API for every screen, and slower first loads that needed extra work to fix for search engines.

Server rendering is returning because many products discovered they paid those costs without needing the benefits. A settings page or an order history does not need a client-side state machine. The lesson is not that one style won; it is that each style fits a different kind of product, and the cost of being wrong is a multi-year rewrite.

2The Questions That Decide

We start from four questions about the product. Does it need to be found by search engines and load fast on a first visit, as public content and marketing pages do? How interactive are the screens: forms and lists, or drag-and-drop editors and live collaboration? Who will build and run it: a backend-heavy team that knows Spring, or a dedicated front-end team? And how many clients consume the same data: one web app, or web plus mobile plus partners?

The answers usually point clearly. A public catalogue with SEO needs and simple interactions favours server rendering. A design tool favours an SPA. An internal admin tool built by a Java team favours server-rendered Spring MVC views almost every time. A product with web and mobile clients needs a good API anyway, which lowers the extra cost of an SPA.

Matching products to front-end styles
ProductLeading needFits best
Internal admin toolspeed of delivery, Java teamSpring MVC views
Public content or catalogueSEO, fast first loadserver rendering, light JS
Forms with some live partssimple pages, a few dynamic widgetshybrid: views plus fragments
Rich editor or dashboardcomplex client stateSPA with a REST or GraphQL API
Web plus mobile clientsone API for allSPA or hybrid on a shared API

3Where Spring MVC Views Fit Today

Server-rendered views with Thymeleaf or a similar engine are still the simplest way to build many screens. There is one deployment, one language, no API contract to version, and security is straightforward because pages and data live in the same application. For internal tools and content pages, this simplicity is worth more than client-side polish.

Hybrid approaches close much of the gap. The server renders full pages and, for the interactive parts, returns small HTML fragments that a lightweight library such as htmx swaps into the page, or mounts a small client-side component for one complex widget. Spring MVC supports this well: a controller can return a fragment of a Thymeleaf template, and recent Spring Framework versions added support for rendering several fragments in one response (check your version). The result feels interactive without a separate front-end build for the whole product.

SPAs remain the right choice for products whose core is interaction. They bring a separate build, a deployment pipeline, a versioned API contract, and usually a separate team. Those costs are justified when the product needs them, and they are a burden when it does not.

4Making a Decision That Survives the Next Cycle

The most expensive outcome is switching styles every few years. A front-end rewrite of a medium product easily takes a team a year, during which few new features ship. So the decision is made per product, written down with its reasons, and revisited only when the product's needs change, for example when an internal tool becomes a customer-facing product, not when a new framework becomes fashionable.

Two habits protect us whichever style we pick. First, keep business logic in the service layer, not in controllers or templates, so a new front end can reuse it. Second, where an API exists, design it as a product contract rather than a mirror of the screens, so it can outlive the front end that first used it. With these, a later change of front-end style is a front-end project, not a rewrite of the whole system.

Step throughChoosing the front end for a product
  1. Is rich client-side interaction the core of the product?
    YesSPA on a designed APINocontinue
  2. Do several clients need the same data?
    Yesshared API; SPA or hybridNocontinue
  3. Are a few screens partly dynamic?
    Yeshybrid: views plus fragmentsNoSpring MVC views
  4. Record the decision and its reasonsrevisit when product needs change

4 steps in order. Play them, or step through them one at a time.

5Follow-up questions

Is it a problem to have different front-end styles across products?

A little, because skills and libraries are not shared, but it is better than forcing one style onto every product. The organisation can still standardise within each style, for example one template engine and one SPA framework, which keeps the variety manageable.

How do you argue against a rewrite the team is excited about?

By putting the cost next to the benefit: how many months of features we give up, which user problems the rewrite solves, and whether a smaller step, such as a hybrid page or one new SPA screen, would solve them. If the benefit is real, we plan the rewrite incrementally; if it is mostly fashion, the numbers usually make that clear.

What does an SPA add operationally?

A separate build pipeline, static hosting or a CDN, cache-busting for releases, coordinated deployment of front end and API, CORS or same-origin routing, client-side error monitoring, and an API versioning policy. Each is manageable, but together they are a real ongoing cost.

6Conclusion

In this answer, we saw that the swing between server rendering and SPAs reflects different products needing different trade-offs. We decide per product using search and first-load needs, interactivity, team skills and the number of clients. Spring MVC views remain the simplest option for internal tools and content pages, hybrid fragments add interactivity cheaply, and SPAs pay off when interaction is the product but bring their own build, deployment and API contract. Above all, we avoid switching styles every few years, and keep business logic and APIs independent of the front end.

What to say in the interviewAbout 100 seconds aloud

Open with

I'd say the cycle tells us that neither style won; they fit different products. So I'd decide per product, with four questions. Does it need SEO and a fast first load?

Then, if they want more

How interactive is it really, forms and lists, or something like an editor? Who builds and runs it, a Java team or a front-end team? And how many clients need the same data? An internal admin tool built by a Java team is almost always best as server-rendered Spring MVC views: one deployment, no API contract, simple security.

Public content pages also favour server rendering. A rich editor or dashboard favours an SPA, and if we have web and mobile clients we need a good API anyway, which lowers the extra cost. In between, hybrid works very well: Thymeleaf pages with small fragments swapped in by something like htmx, or one client-side component for one complex widget.

I'd be explicit that SPAs add a separate build, deployment pipeline and versioned API contract, which are worth paying only when the product needs them. The most important point for leadership is not to switch styles every few years, because a front-end rewrite of a medium product can cost a team a year of features.

So we record each decision with its reasons, revisit it when the product's needs change, and keep business logic in services and APIs designed as products, so a future front-end change is just a front-end project.

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 "Server-side rendering with templates fell out of favour for single-page apps and is now...": https://scrivio-interview-library.netlify.app/spring-boot/mvc-architecture/9a9bda61a6/