Use Vaadin as a java REST server for mobile apps?

Is it possible to use Vaadin backend code to provide RESTful services to mobile app? For example, when I click a button in iOS/Android client, it makes a GET request which triggers a method to be called in Vaadin backend code. The method returns an object that will be serialized to json and send back to the mobile client?

Thanks! Very new to Vaadin. I hope I can fully use it in my side project. Really like Java.

Not with Vaadin as such, but you could expose a REST service in the same application with many different methods. It’s probably going to be the easiest if you already have a Java application framework (Spring or CDI) and just use the standard REST controllers provided by those, but you could also choose many other ways of doing it. See this blog post for more info:


Well, you would need something like an event bus to which both the REST backend and the Vaadin client subscribe.

Not knowing your requirements you could probably do it much easier: Just call the rest service from within the click event in the Vaadin application’s button.