跳至主要内容
Hyyan Abo Fakher
Lead Software Architect
查看所有作者

Kotlin web framework: build web UIs with the webforJ DSL

· 一分钟阅读
Hyyan Abo Fakher
Lead Software Architect

cover image

If you want a Kotlin web framework that builds the whole UI in Kotlin, webforJ has one. Add the webforj-kotlin module and the Kotlin Maven plugin to a webforJ project, and you build web UIs with a type-safe Kotlin DSL: flexLayout { button("Save") { onClick { save() } } }. There is no HTML template and no JavaScript.

The DSL has been available since webforJ 25.12. It covers the standard components, nests like the UI it describes, mixes with Java classes in the same project, and works with Spring Boot. This post shows how to build a web app in Kotlin with it, from setup to your own DSL functions.

Natural language search for a Java table with webforJ

· 一分钟阅读
Hyyan Abo Fakher
Lead Software Architect

cover image

Your users know what they want from a table. They just don't think in dropdowns and price fields. They think "laptops under 1000 that are in stock," and the filter form makes them translate that into five separate controls.

Natural language search for a Java table lets them type that sentence instead. The safe way to build it keeps the model away from your data: it only turns the sentence into a small typed filter, and plain Java applies that filter to the table. This post builds the flow with Spring AI and a webforJ Table.

Avoid UI framework lock-in in Java: keep the views thin

· 一分钟阅读
Hyyan Abo Fakher
Lead Software Architect

cover image

Somebody on the team asks the question before the first screen gets built: if we pick this UI framework and it stops fitting in four years, what do we have to throw away? It is a fair question, and a vague answer is worth nothing.

To avoid UI framework lock-in in Java, decide how much of the app is allowed to know about the framework. With webforJ the answer can be small. Business rules live in plain Java classes or Spring services, forms bind to plain beans validated with Jakarta Bean Validation, data comes through repositories, and only the view classes use webforJ components.

JavaFX to web: move your desktop UI to the browser in Java

· 一分钟阅读
Hyyan Abo Fakher
Lead Software Architect

cover image

Your JavaFX app works. Users like it, the domain logic took years to get right, and now someone wants it in a browser: no installer, no JRE on every laptop, access from a phone, or access from a customer site. Rewriting it in JavaScript would throw away the one thing you have plenty of, which is Java.

JavaFX to web does not need a second language. With webforJ, a full-stack Java framework, you keep Java, keep your services and domain classes, and rebuild the screens as routes and components that render in the browser. Screens move one at a time, so the app stays releasable the whole way.