UI Frameworks for Spring Boot
Choosing a UI Framework for Your Spring Boot Application
Choosing a UI framework for your Spring Boot application starts with your users’ needs and how your team wants to build the interface. Whether you are developing a customer portal, a B2B application, or a business management system, the main options include server-side Java components, server-rendered HTML, and a client-side JavaScript frontend. This article focuses on applications with forms, data tables, and interactive workflows.
ZK, Vaadin, Apache Wicket, Thymeleaf with Spring MVC, and React or Angular can all be evaluated with a Spring Boot backend. The important differences are where UI state lives, how user actions reach the service layer, and which parts of the integration your team will maintain.
To make these choices concrete, we draw on the Employee Manager study in our Evaluator’s Guide. That internal management application provides a common example for comparing UI approaches; the same architectural questions apply to other Spring Boot applications.
TL;DR
For a Java-heavy team building interactive business screens, shortlist ZK and Vaadin: server-side UI code can call Spring services without a REST layer created solely for that UI. Consider Thymeleaf with Spring MVC for conventional pages and forms, or Wicket for Java components paired with HTML. Prefer a separate React or Angular frontend when the team already has the relevant expertise or needs an independently maintained frontend and API boundary. Our Employee Manager comparison reuses a common backend to illustrate these choices. The results support a discussion of integration structure, not a universal performance or productivity ranking.
How does the web UI connect to a Spring Boot application?
Spring Boot provides the application setup around Spring services and web infrastructure; choosing it does not, by itself, decide how the browser UI should be built. A UI framework or template engine supplies the view and interaction model on top of those services.
A service layer contains application operations such as finding employees, validating a business change, or saving an order. Keeping those operations separate from UI code allows different views to reuse them. The UI still needs to collect input, invoke the operation, and present the result.
With server-side component frameworks, Java event handlers or ViewModels can invoke a Spring-managed service in the same application. With Spring MVC and Thymeleaf, a controller invokes the service and returns a model for an HTML template. With a separate frontend, browser code typically sends an HTTP request to an API controller, which then invokes the service.
Spring’s official Serving Web Content with Spring MVC guide explains the controller-and-template approach. It is a useful reference for distinguishing HTML rendering from a JSON API.
Which UI frameworks can you use with Spring Boot?
| Option | How UI actions reach business services | Main UI development work | A useful fit |
|---|---|---|---|
| ZK | A Java ViewModel or controller invokes a Spring service | ZUL views, bindings, and Java commands; Java composition is also available | Interactive data screens maintained by a Java team |
| Vaadin | Java views and event handlers invoke Spring services | Java layouts, components, and event handling | Teams that prefer programmatic Java UI composition |
| Thymeleaf + Spring MVC | MVC controllers invoke services and populate HTML templates | Java controllers, HTML forms, templates, and any added browser interaction | Conventional page and form workflows |
| Apache Wicket | Java component code uses Spring services | HTML paired with Java component classes and models | Teams that want Java behavior with HTML markup |
| React + Spring Boot | Browser code calls an API that invokes services | React UI, API contracts, client state, and error handling | Teams with React expertise or independent frontend needs |
| Angular + Spring Boot | Browser code calls an API that invokes services | Angular UI, TypeScript services, API contracts, and client state | Teams already organized around Angular development |
This table describes integration approaches, not the only deployment model each framework supports. In particular, a browser UI can use an API without being deployed on a separate domain or server.
Should you choose a server-side or client-side UI?
How should your team’s skills influence the choice?
Start with the developers who will build and maintain the application. With ZK and the Java-based Vaadin approach compared here, a Java team can define interactions, use components, and call Spring services without maintaining a separate JavaScript frontend application. ZK offers ZUL with Java code or pure Java composition, so teams can choose between declarative layouts and programmatic UI construction.
React and Angular put more of the application’s UI behavior in browser-side JavaScript or TypeScript. They are a natural fit when the team already has frontend expertise, needs extensive custom browser interactions, or wants a frontend that develops independently of the Java backend. The backend team still owns the Spring services and API implementation.
Server-rendered HTML offers another option. Thymeleaf with Spring MVC keeps page rendering on the server and lets developers work directly with HTML templates. Wicket combines HTML markup with Java components. These approaches suit teams that prefer HTML-oriented development, with additional libraries available for more advanced interaction.
How does the choice affect communication and delivery overhead?
A separate frontend can introduce coordination work beyond learning another language. Teams need to agree on request and response formats, validation errors, API changes, and the timing of frontend and backend updates. Even when one team owns both sides, it maintains the API contract and the code that connects the browser application to it.
With a server-side Java UI, the same team can implement a feature from the Spring service to the screen. For example, adding an employee field may involve updating a Java model, service logic, and a ZUL view without also introducing a frontend-specific DTO change and browser-side mapping. This can reduce handoffs and simplify delivery when the application does not need that extra API boundary.
A shared API remains valuable when several clients use the same operations or separate teams benefit from independent releases. The decision is whether that separation serves your application. For Java teams building component-rich business workflows, ZK combines service integration, data binding, and UI components in one development model, which makes it worth evaluating early.
What can the Employee Manager comparison tell us?
The project setup documents six Level 1 implementations on Spring Boot 3.3.4 and Java 17. They use a shared backend module for entities, repositories, services, and seed data. The visible requirements include an employee list, editing, department management, and validation.
The study was built by the ZK team, and its applications and measurement reports are public. This article summarizes that existing work; it does not present a new benchmark or claim that the tested versions are the latest compatible releases.
The most useful finding for this decision is the integration boundary. The ZK and Vaadin implementations call Java services from their server-side UI code. The React and Angular implementations add REST controllers and data-transfer objects, or DTOs: objects that define the data exchanged with the frontend.
The shared business operations stay conceptually separate from those adapters. A change to a screen may therefore involve a ViewModel, MVC controller, or API contract depending on the chosen architecture. That is the work your team should inspect when comparing a UI framework for Spring Boot.
How does ZK connect a business screen to a Spring service?
In the existing ZK application, EmployeeListVM resolves Spring-managed services through ZK’s Spring integration. The following shortened excerpt shows the relevant wiring and command declaration; the method body and unrelated members are omitted.
@VariableResolver(
org.zkoss.zkplus.spring.DelegatingVariableResolver.class)
public class EmployeeListVM {
@WireVariable
private EmployeeService employeeService;
@Command
@NotifyChange({"employeeCount", "searchActive"})
public void search(@BindingParam("keyword") String keyword) {
// Existing search implementation omitted.
}
}
The ZUL view binds its search button to that Java command:
<button label="Search" onClick="@command('search')"/>
In the full implementation, the command refreshes a ListModelList using employeeService.search(...). ZK processes the UI event and updates the component model; the developer does not create a separate JSON endpoint for this button. The excerpt requires the application’s imports, ZUL ViewModel binding, and Spring configuration. See the complete EmployeeListVM source and ZUL view.
This example uses MVVM, or Model-View-ViewModel: the ZUL view uses BindComposer and data bindings to connect components to EmployeeListVM, while @command invokes Java methods. ZK also supports ZUL views with Java composers following MVC, as well as UI composition entirely in Java through Richlets. MVVM is the pattern chosen for this sample, not a requirement for using ZK with Spring Boot. The ZK MVVM reference explains the sample’s binding model.
There is an important data-loading qualification: this particular employee list loads its small result set into memory and lets the listbox page and sort it. That is a sample design choice, not a recommendation to fetch every row from a large production database. For larger datasets, evaluate bounded queries and a model that loads data as needed.
When should the UI use a REST API instead?
In the React implementation, EmployeeApiController exposes operations under /api/employees. Browser requests pass search and paging parameters; the controller calls EmployeeService and returns DTOs. The frontend then renders the data and handles loading, errors, and interaction state. See the API controller used in the comparison.
That separation is useful when several clients need the same operations, when an API is already a product requirement, or when frontend and backend teams need an explicit contract. It can also fit a team that already maintains a React or Angular application.
If one Java team owns the application and no other client needs that interface, a REST layer created exclusively for the web UI may add work without meeting another requirement. ZK and Vaadin offer an alternative. They can still coexist with REST endpoints for mobile applications or external integrations; choosing a server-side UI does not prevent the backend from exposing APIs elsewhere.
How do forms, tables, and dashboards affect the choice?
For conventional forms and page navigation, Thymeleaf with Spring MVC can be a straightforward fit. The team controls HTML templates while Spring controllers handle requests and call business services. Wicket adds a Java component model while keeping markup in HTML files.
When the application adds frequent inline editing, complex component interactions, calendars, or pivot views, inspect the integration effort more closely. The guide’s separate HR Workspace study implemented a calendar, organization chart, pivot table, and dashboard. ZK supplied those views through components and add-ons from its product family; Vaadin used a combination of native components and Directory add-ons with Java APIs. Both required no developer-written JavaScript for those views.
The tested Thymeleaf and Wicket workspace implementations also delivered all four views, using external JavaScript libraries and initialization code. This is a workable approach when the team is comfortable owning that integration. The component comparison shows what was implemented and how.
The workspace is evidence about component integration, not a repetition of the shared-backend experiment: its data setup differs from Level 1, and React and Angular used standalone frontends with mock data. Do not treat its figures as a full production integration comparison.
What should you check before adopting the framework?
Use the same acceptance criteria for each candidate. A short evaluation should cover the business workflow and deployment requirements, rather than only whether a sample application starts.
| Check | What to include in the evaluation |
|---|---|
| Spring compatibility | Verify the selected Java, Spring Boot, servlet namespace, framework integration, and packaging versions together |
| Business rules | Keep authorization, validation, and transaction rules enforced on the server regardless of the UI model |
| Data access | Test realistic filtering, sorting, database paging, and loading behavior |
| User experience | Use representative styling, narrow screens, keyboard navigation, and error messages |
| Deployment | Measure latency, concurrent-session memory where applicable, session routing, and failover behavior |
| Maintenance and cost | Check required editions, add-ons, component licenses, support, and build requirements |
Server-side UI frameworks handle browser communication, but their classic stateful models require deliberate session and capacity planning. A separate frontend requires deliberate API and client-state design. Neither approach removes the application team’s responsibility for secure and reliable behavior.
Frequently asked questions
Does Spring Boot require React or Angular?
No. React and Angular are frontend options, not requirements imposed by Spring Boot. Java component frameworks and HTML template engines provide other ways to build the interface.
Can ZK use existing Spring services?
Yes. The Employee Manager illustrates ZK’s Spring integration by resolving EmployeeService in a Java ViewModel. Use the application’s dependency and configuration files as a reference when integrating your own services.
Do ZK and Vaadin eliminate every REST endpoint?
No. They let server-side UI code call services without a REST endpoint created solely for that interface. APIs may still be appropriate for other clients, public integrations, or service boundaries in the wider system.
When is Thymeleaf enough for a Spring Boot application?
It can be enough when the application mainly displays pages and processes forms. If the central workflow depends on advanced widgets or frequent in-page interaction, evaluate the added JavaScript or library integration alongside component-based alternatives.
Do the comparison results cover the latest versions?
They describe the versions and configurations documented in the study. Use them to understand architecture and implementation choices, then verify compatibility and behavior with the versions your team plans to deploy.
How can you start evaluating ZK with Spring Boot?
Begin with the public Employee Manager application, inspect its Spring service wiring, and adapt one workflow to your own data. Compare that implementation with your strongest alternative using the same requirements. For additional context, the evaluator’s guide links to the individual framework comparisons and full measurement methodology.