Blog

Your frequently asked Hilla questions answered

By  
Marcus Hellberg
Marcus Hellberg
·
On Feb 14, 2023 12:00:00 AM
·

I had the pleasure of speaking about Hilla at four events in January: Boulder JUG, Denver JUG, Utah JUG, and a webinar hosted by Vaadin. It was a great opportunity to connect with developers in person and get their initial reactions to Hilla.

The feedback developers shared was overwhelmingly positive. I want to share some of the questions I got here with the wider community.

Compatibility with other technologies

Will Hilla add support for Angular?

Hilla 1.3 added support for React in December 2022. You can now choose between Lit and React for the front end when building Hilla apps. The next logical question for many developers was: when will Hilla support Angular?

We are considering adding support for Angular, but we have not made a decision yet. Our current priority is to finalize the React support (field validation schema, DX improvements), reactive endpoints, and the new TypeScript generator.

I created a GitHub issue for discussing Hilla Angular support. Please upvote it and subscribe to updates if you are interested in staying in the loop.

Will Hilla add support for Vue, Svelte?

We do not have any concrete plans for Vue or Svelte at the moment. Please upvote and comment on the corresponding GitHub tickets to help us better understand how much interest there is in the frameworks:

Will Hilla add support for NextJS?

No. NextJS is also a full-stack framework so it is not something we can naturally integrate with.

Do you plan to maintain both React and Lit support?

Yes. We are going to maintain both React and Lit support going forward.

Can you use Lit and React in the same Hilla project?

No, not at the moment. But we will consider adding this support in the future.

Does Hilla support using 3rd party React libraries like React Query or Material UI?

Yes, the React front end in a Hilla app is a standard React application so you can use any React components and libraries you want with it.

Does Hilla support Kotlin?

Hilla 2.0 has basic Kotlin support. It includes a new Java to TypeScript generator that works on byte code instead of source code and can therefore support other JVM languages as well. The generator does not handle nullability correctly yet: it generates nullable TypeScript types for all non-primitive types at the moment. You can track the status of Kotlin support in this GitHub issue.

Will Hilla add support for Quarkus?

Quarkus support is not currently planned. If you are interested in Quarkus support, please upvote this GitHub issue.

Does Hilla support Gradle?

Not at the moment. You can upvote the GitHub issue and subscribe to it to stay updated on progress.

Technical

How do you deploy Hilla applications? Can you deploy the front end and back end separately?

Hilla applications are deployed as a single application containing both frontend and backend. By default, the app is built as a JAR file, but you can also deploy it as a WAR file. Hilla does not support deploying the frontend and back end separately.

Are all Hilla apps single-page apps (SPA)?

Yes. Hilla applications are SPAs.

What protocol does Hilla use for communicating between client and server? REST? gRPC?

Hilla uses REST-like JSON-based communication between the client and the server. The server calls are made by the TypeScript method. It calls the right endpoint URL and ensures that parameters and return values are properly typed.

Does Hilla support server-side rendering (SSR)?

No. Hilla does not support SSR. But we will consider adding this support in the future.

Project

What problem or challenge originally motivated you to create Hilla?

We saw the need for a frontend framework for Java backends that is optimized for building business applications. The full-stack type-safety, included components, and zero-config tooling are designed to help developers build apps faster and maintain them easier. Read more about why we built Hilla in this blog post by Leif Åstrand.

When should you NOT use Hilla?

Hilla is best suited for complex applications. Like all SPA frameworks, it is not as well suited for building mostly static websites.

Can Hilla be useful in big-scale projects?

Yes. Hilla is well-suited for big-scale projects, both in terms of development team size and the number of end users.

Full-stack type safety helps teams both move faster without breaking things and maintain the apps in the long run.

Hilla applications are stateless on the server. By default, they only store a session id in the session. You can configure the backend to be fully stateless if you prefer. The stateless architecture makes scaling Hilla apps simple.

Hilla is open source. What types of contributions do you need most from the community? Aka where can we help?

We appreciate all your help. Reporting issues you find and features you’d like to see on GitHub is a great way to contribute to the project.

Another way to contribute is to help out other Hilla users on the Vaadin community forum.

Other questions?

If you have questions that aren't answered here, you can always reach us at @vaadin on Twitter.

Marcus Hellberg
Marcus Hellberg
Marcus is the VP of Developer Relations at Vaadin. His daily work includes everything from writing blogs and tech demos to attending events and giving presentations on all things Vaadin and web-related. You can reach out to him on Twitter @marcushellberg.
Other posts by Marcus Hellberg