Why a server-side component framework is still a great choice for business applications – and when it is not.
Your Java developers build the whole app, from the database to the UI. No separate frontend team, no second stack to build, secure and keep up to date.
DataTable, Schedule, TreeTable, FileUpload, Charts and more, with sorting, filtering, inline editing and export built in.
One Maven dependency. No node_modules, no lockfile churn, no second toolchain to keep patched.
Components bind straight to CDI beans. No REST endpoints, DTOs, JSON mapping or CORS rules just to talk to yourself.
JPALazyDataModel turns paging, sorting and filtering of the DataTable into JPA Criteria queries. Large tables without a single query written by hand.
Your Bean Validation annotations and Faces validators run instantly in the browser and again on the server. One set of rules, no JavaScript copy to keep in sync.
@NotNull marks the label as required, @Size sets the maxlength, @Min and @Max bound number inputs, @Past and @Future limit the DatePicker.
Business logic and data stay on the server, the browser only gets rendered HTML. Add a strict nonce-based CSP with one context parameter, on top of the CSRF protection and output escaping of Faces.
A button that is not rendered never reaches the browser and its action cannot be called, disabled inputs are ignored and select values must be one of the offered options. Faces enforces it on the server.
JUnit and Selenium with ready-made page objects for PrimeFaces components. No second test stack in JavaScript.
Aura, Lara, Nora, Material, Metal and Glass, each in light and dark. Change any token at runtime, no build step.
Keyboard navigation, screen reader support, ARIA roles and focus management built into the components.
Jakarta EE servers, Quarkus and Spring Boot, on Mojarra or MyFaces. Your existing runtime, no extra service.
Add PrimeFaces to Jakarta EE, Quarkus or Spring Boot and bind components straight to your beans.
A sortable, filterable, paginated table is a Facelets view and a CDI bean, nothing else:
field alone gives every column sorting and its own filter.
| PrimeFaces | Angular + component library | |
|---|---|---|
| Files for this table | 2 | 6 |
| Toolchains to build and patch | Maven | Maven, Node, npm, Angular CLI |
| Languages | Java, XHTML | Java, TypeScript, HTML |
| API layer for the UI | None | REST endpoints, DTOs |
Angular files shown next to the code, here with Angular Material as component library. Generated tsconfig.json and index.html, auth token handling and CORS not counted. pom.xml not counted on either side: both projects have one, PrimeFaces adds a single dependency.
Read the Docs<h:form>
<p:dataTable var="c" value="#{customerView.customers}"
paginator="true" rows="10" sortMode="multiple">
<p:column field="name" headerText="Name"/>
<p:column field="country" headerText="Country"/>
<p:column field="status" headerText="Status">
<p:tag value="#{c.status}"/>
</p:column>
</p:dataTable>
</h:form>
@Named
@RequestScoped
public class CustomerView {
@Inject
CustomerService service;
private List<Customer> customers;
@PostConstruct
void init() {
customers = service.findAll();
}
public List<Customer> getCustomers() {
return customers;
}
}
import { AfterViewInit, Component, inject, viewChild } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
import { MatSort, MatSortModule } from '@angular/material/sort';
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
import { MatInputModule } from '@angular/material/input';
import { MatChipsModule } from '@angular/material/chips';
export interface Customer {
name: string;
country: string;
status: string;
}
@Component({
selector: 'app-customers',
imports: [MatTableModule, MatSortModule, MatPaginatorModule, MatInputModule, MatChipsModule],
template: `
<mat-form-field>
<input matInput placeholder="Search" (keyup)="filter($event)">
</mat-form-field>
<table mat-table [dataSource]="customers" matSort>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>
<td mat-cell *matCellDef="let c">{{ c.name }}</td>
</ng-container>
<ng-container matColumnDef="country">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Country</th>
<td mat-cell *matCellDef="let c">{{ c.country }}</td>
</ng-container>
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Status</th>
<td mat-cell *matCellDef="let c"><mat-chip>{{ c.status }}</mat-chip></td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="columns"></tr>
<tr mat-row *matRowDef="let row; columns: columns"></tr>
</table>
<mat-paginator [pageSize]="10"></mat-paginator>
`
})
export class CustomersComponent implements AfterViewInit {
private http = inject(HttpClient);
private sort = viewChild.required(MatSort);
private paginator = viewChild.required(MatPaginator);
columns = ['name', 'country', 'status'];
customers = new MatTableDataSource<Customer>();
ngAfterViewInit() {
this.customers.sort = this.sort();
this.customers.paginator = this.paginator();
this.http.get<Customer[]>('/api/customers')
.subscribe(data => this.customers.data = data);
}
filter(event: Event) {
this.customers.filter = (event.target as HTMLInputElement).value.trim().toLowerCase();
}
}
@Path("/api/customers")
@Produces(MediaType.APPLICATION_JSON)
public class CustomerResource {
@Inject
CustomerService service;
@GET
public List<CustomerDto> list() {
return service.findAll().stream()
.map(c -> new CustomerDto(c.getName(), c.getCountry(), c.getStatus()))
.toList();
}
}
public record CustomerDto(String name, String country, String status) {
}
import { bootstrapApplication } from '@angular/platform-browser';
import { provideHttpClient } from '@angular/common/http';
import { CustomersComponent } from './app/customers.component';
bootstrapApplication(CustomersComponent, {
providers: [provideHttpClient()]
}).catch(err => console.error(err));
{
"name": "customers",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "ng serve",
"build": "ng build"
},
"dependencies": {
"@angular/cdk": "^22.0.0",
"@angular/common": "^22.0.0",
"@angular/compiler": "^22.0.0",
"@angular/core": "^22.0.0",
"@angular/forms": "^22.0.0",
"@angular/material": "^22.0.0",
"@angular/platform-browser": "^22.0.0",
"rxjs": "~7.8.0",
"tslib": "^2.8.0"
},
"devDependencies": {
"@angular/build": "^22.0.0",
"@angular/cli": "^22.0.0",
"@angular/compiler-cli": "^22.0.0",
"typescript": "~6.0.0"
}
}
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"projects": {
"customers": {
"projectType": "application",
"root": "",
"sourceRoot": "src",
"architect": {
"build": {
"builder": "@angular/build:application",
"options": {
"browser": "src/main.ts",
"tsConfig": "tsconfig.app.json",
"styles": ["@angular/material/prebuilt-themes/azure-blue.css"]
}
},
"serve": {
"builder": "@angular/build:dev-server"
}
}
}
}
}
Business applications live for a decade. PrimeFaces has been shipping releases since 2009 and plans for upgrades, not rewrites.
Continuously developed since 2009, with regular major and minor releases.
Every major release documents what changed and how to upgrade.
Free for commercial use, source on GitHub.
Optional support and backports straight from the PrimeFaces project lead.
No technology fits every project. Pick the architecture that matches your application and your team.
It is not either-or: many teams run their public site as an SPA or CMS and build the back office with PrimeFaces, on the same Java backend.